diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-05-28 01:31:38 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2023-05-28 01:35:21 +0000 |
commit | e80b99758c51cdaf1593b08681639de02533f363 (patch) | |
tree | 5814ea4e29d7efd36afa083fadba41c15e25d0d4 | |
parent | d441afd9dfffa1f875e87ce9e48068af70824000 (diff) | |
download | servo-e80b99758c51cdaf1593b08681639de02533f363.tar.gz servo-e80b99758c51cdaf1593b08681639de02533f363.zip |
Update web-platform-tests to revision b'4c27189ed2db4ddad8e727d4ea9ae8329c3e1672'
2542 files changed, 30480 insertions, 29347 deletions
diff --git a/tests/wpt/metadata-layout-2020/css/css-backgrounds/background-image-cors-no-reload.html.ini b/tests/wpt/metadata-layout-2020/css/css-backgrounds/background-image-cors-no-reload.html.ini new file mode 100644 index 00000000000..6c63e3e5552 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-backgrounds/background-image-cors-no-reload.html.ini @@ -0,0 +1,3 @@ +[background-image-cors-no-reload.html] + [CORS image from variable doesn't cause re-downloads] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-border-radius-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-border-radius-001.html.ini new file mode 100644 index 00000000000..c4286b08e31 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-border-radius-001.html.ini @@ -0,0 +1,2 @@ +[box-shadow-border-radius-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-inset-without-border-radius.html.ini b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-inset-without-border-radius.html.ini new file mode 100644 index 00000000000..0e7d21410ad --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-inset-without-border-radius.html.ini @@ -0,0 +1,2 @@ +[box-shadow-inset-without-border-radius.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-invalid-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-invalid-001.html.ini new file mode 100644 index 00000000000..429bb096de6 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-invalid-001.html.ini @@ -0,0 +1,2 @@ +[box-shadow-invalid-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html.ini new file mode 100644 index 00000000000..7e3b6770303 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html.ini @@ -0,0 +1,2 @@ +[box-shadow-outset-without-border-radius-001.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-color/oklab-009.html.ini b/tests/wpt/metadata-layout-2020/css/css-color/oklab-009.html.ini new file mode 100644 index 00000000000..1c1ba09c195 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-color/oklab-009.html.ini @@ -0,0 +1,2 @@ +[oklab-009.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-color/oklch-011.html.ini b/tests/wpt/metadata-layout-2020/css/css-color/oklch-011.html.ini new file mode 100644 index 00000000000..fac99a3e651 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-color/oklch-011.html.ini @@ -0,0 +1,2 @@ +[oklch-011.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-color/parsing/color-valid-color-mix-function.html.ini b/tests/wpt/metadata-layout-2020/css/css-color/parsing/color-valid-color-mix-function.html.ini index 5cceaf5ee0a..5fbefaad28c 100644 --- a/tests/wpt/metadata-layout-2020/css/css-color/parsing/color-valid-color-mix-function.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-color/parsing/color-valid-color-mix-function.html.ini @@ -1,5 +1,4 @@ [color-valid-color-mix-function.html] - expected: ERROR [e.style['color'\] = "color-mix(in srgb, red, blue)" should set the property value] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html.ini new file mode 100644 index 00000000000..aceb25fcfc0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html.ini new file mode 100644 index 00000000000..3b87862b88c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-items.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-items.html.ini new file mode 100644 index 00000000000..183f969854f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html.ini new file mode 100644 index 00000000000..c44c1278202 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-table-item.html] + [#target > * 1] + expected: FAIL + + [#target > * 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html.ini new file mode 100644 index 00000000000..3f5445372f3 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html.ini new file mode 100644 index 00000000000..67c3195320e --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-items.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-items.html.ini new file mode 100644 index 00000000000..248c349127a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html.ini new file mode 100644 index 00000000000..073fa50c72c --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-table-item.html] + [#target > * 1] + expected: FAIL + + [#target > * 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html.ini new file mode 100644 index 00000000000..a141785e719 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-lr-column-horz-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html.ini new file mode 100644 index 00000000000..7c87b06fa54 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-lr-column-horz-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html.ini new file mode 100644 index 00000000000..4ba9674c941 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-lr-column-horz-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html.ini new file mode 100644 index 00000000000..50dd662bc0f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html.ini @@ -0,0 +1,3 @@ +[align-items-baseline-vert-lr-column-horz-table-item.html] + [#target > div 1] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html.ini new file mode 100644 index 00000000000..1b52f4b7f52 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-rl-column-horz-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html.ini new file mode 100644 index 00000000000..9f462a05094 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-rl-column-horz-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html.ini new file mode 100644 index 00000000000..21fc2fcfa98 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-rl-column-horz-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html.ini new file mode 100644 index 00000000000..7aff68f608d --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html.ini @@ -0,0 +1,3 @@ +[align-items-baseline-vert-rl-column-horz-table-item.html] + [#target > div 1] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-finished.html.ini b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-finished.html.ini new file mode 100644 index 00000000000..998ff04f252 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-finished.html.ini @@ -0,0 +1,2 @@ +[overlay-transition-finished.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-in-rendering.html.ini b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-in-rendering.html.ini new file mode 100644 index 00000000000..c6a2594e7a8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-in-rendering.html.ini @@ -0,0 +1,2 @@ +[overlay-transition-in-rendering.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-out-rendering.html.ini b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-out-rendering.html.ini new file mode 100644 index 00000000000..eebd31d0478 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition-out-rendering.html.ini @@ -0,0 +1,2 @@ +[overlay-transition-out-rendering.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition.html.ini b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition.html.ini new file mode 100644 index 00000000000..9d4353030d0 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-position/overlay/overlay-transition.html.ini @@ -0,0 +1,6 @@ +[overlay-transition.html] + [Open the popover to be closed and verify computed overlay for both popovers] + expected: FAIL + + [Transition overlays] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-ui/appearance-cssom-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-ui/appearance-cssom-001.html.ini index dededd34688..72b87104d28 100644 --- a/tests/wpt/metadata-layout-2020/css/css-ui/appearance-cssom-001.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-ui/appearance-cssom-001.html.ini @@ -2036,3 +2036,21 @@ [appearance: -moz-window-titlebar-maximized (invalid)] expected: FAIL + + [-webkit-appearance: push-button (invalid)] + expected: FAIL + + [-webkit-appearance: slider-horizontal (invalid)] + expected: FAIL + + [-webkit-appearance: square-button (invalid)] + expected: FAIL + + [appearance: push-button (invalid)] + expected: FAIL + + [appearance: slider-horizontal (invalid)] + expected: FAIL + + [appearance: square-button (invalid)] + expected: FAIL diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index b8872017d44..5a898242a0a 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -3061,6 +3061,15 @@ {} ] ], + "overlay": { + "overlay-popover-backdrop-crash.html": [ + "f59fc5db4ae3fbbd383a1a9a7dfccf9597229119", + [ + null, + {} + ] + ] + }, "position-absolute-in-inline-crash.html": [ "e7b2ef49c713d5ee081b7319d81c4c4b3ee15524", [ @@ -5339,6 +5348,13 @@ {} ] ], + "input-type-change-empty-crash.html": [ + "6e44250ccb79f3a2a06b6ef639914cad656a4bb6", + [ + null, + {} + ] + ], "invalid-datalist-options-crash.html": [ "7cdd55196cecaae8cc64fe7fc86b4f7305e7525d", [ @@ -6837,6 +6853,15 @@ {} ] ] + }, + "webtransport": { + "bidirectional-cancel-crash.https.html": [ + "6919c90aa84d6ecb9d03bb373a6ee85946f909a5", + [ + null, + {} + ] + ] } }, "manual": { @@ -19678,35 +19703,35 @@ "element": { "drawing-text-to-the-canvas": { "2d.text.draw.fill.basic-manual.html": [ - "3652a2191d6c78d3bbf28708eb6e0959708dba86", + "d3f5df9d018f58d112fb0afc7fe260638bc300a9", [ null, {} ] ], "2d.text.draw.fill.maxWidth.large-manual.html": [ - "761679ecf8ff842b91f428d8d3218ea3b715b258", + "96bb2e7de15880dbd8a4e1406d6d1db4cf3bddd5", [ null, {} ] ], "2d.text.draw.fill.rtl-manual.html": [ - "07eeeb497a266a543640f31e404feb5d20446fff", + "6917d7ed6c8ccaa3209d6879319baa6a63e340cd", [ null, {} ] ], "2d.text.draw.kern.consistent-manual.html": [ - "f27c2a7c24465c651986d9969007cea05e5d89b1", + "1840ef01b1ed24bfabef5d252cc4e582e807cea1", [ null, {} ] ], "2d.text.draw.stroke.basic-manual.html": [ - "4481a0d25a977777f06d1cd45ac33fbea6e626a6", + "1db0f0694e8eeb1b4b59e6e68082a439e14af1ce", [ null, {} @@ -19726,14 +19751,14 @@ }, "shadows": { "2d.shadow.blur.high-manual.html": [ - "f5acaa97bed1a6b33458470afd03e1c586fe78e6", + "aae0a163bb152344592755b06f2e78e834092edd", [ null, {} ] ], "2d.shadow.blur.low-manual.html": [ - "ba594cea603ce65efd201e677c29c8a591c781e5", + "9674d6f0dbaa856fb62ca3e28a15611aa84d476f", [ null, {} @@ -19744,70 +19769,70 @@ "offscreen": { "text": { "2d.text.draw.fill.basic-manual.html": [ - "5c364f58a66509118bbd2a08c76766341c032046", + "af1cb9d94a3db8619d297a4bb14f7828bc2baa3d", [ null, {} ] ], "2d.text.draw.fill.basic-manual.worker.js": [ - "b75be08977d6f9b564b2ef76b4d7e9d6132e4cb9", + "ef00236fbb44d7d654872a8e39324ddafd3d435b", [ null, {} ] ], "2d.text.draw.fill.maxWidth.large-manual.html": [ - "838b3f83eeaaa88f7dc707ef2e03a822da051647", + "7a0cf11b394a94cdcb738033b1e5852c978e28fb", [ null, {} ] ], "2d.text.draw.fill.maxWidth.large-manual.worker.js": [ - "e124b08ebcea680dbe75ac62610f6e9e0a72d9be", + "3e200e89eda948d818ca72ecea21e3f409c7b72d", [ null, {} ] ], "2d.text.draw.fill.rtl-manual.html": [ - "7363d734ccf4b34b1cf4bc50b2f9dafd082c7784", + "98e329b0546547610a4a4a03264b74ec6c82e755", [ null, {} ] ], "2d.text.draw.fill.rtl-manual.worker.js": [ - "f52a0cc617e6b3556c642cf0dd0de9b958d669c6", + "ee24a0450fbdfb784a405b5ff09dacb3f3dbccf2", [ null, {} ] ], "2d.text.draw.kern.consistent-manual.html": [ - "e8ee39c655e191be3ff0daefd9d1d2e7b17654bb", + "de456a2b96150aafc173e15d9ae2340f1dc7d81d", [ null, {} ] ], "2d.text.draw.kern.consistent-manual.worker.js": [ - "464cab3ea57bbbe630e1600b7fdfdd1b4c57bf43", + "0d1c9470eeea32f649e28bc464f4fd377730a754", [ null, {} ] ], "2d.text.draw.stroke.basic-manual.html": [ - "5aee6afc0d0dc3fc6782946a92e3c35ca31688d7", + "62ac8884cb4e228446d365cc249ca2b103e39a7f", [ null, {} ] ], "2d.text.draw.stroke.basic-manual.worker.js": [ - "8806e011eab8a1b09b4e11e7a847fc888fdc07cf", + "33d6e32467e2361caa62c6d8f4e4e782535156eb", [ null, {} @@ -20737,7 +20762,7 @@ }, "the-canvas-element": { "2d.scaled-manual.html": [ - "ed91b714e088cb2d7749d0f44cd50dde1b8f1e25", + "28daf0bca5e9c1f3cbc2342085ff188213963ae2", [ null, {} @@ -28879,6 +28904,19 @@ } ] ], + "break-inside-avoid-multicol-001-print.html": [ + "a97ac9f5cdad2d191588dbdc6a2de80607a00a43", + [ + null, + [ + [ + "/css/css-break/break-inside-avoid-multicol-001-print-ref.html", + "==" + ] + ], + {} + ] + ], "break-nested-float-in-table-001-print.html": [ "e4e0a578e9a6c6d763fcb9e80d6ff8b91561f3e5", [ @@ -59742,7 +59780,7 @@ ] ], "float-root.html": [ - "ee7f70e7844d9db7c247a4c7bc14be4634fbdba4", + "944ae7ad5f46296d1ce65088421e25b79eed40af", [ null, [ @@ -114825,19 +114863,6 @@ {} ] ], - "text-align-white-space-003.xht": [ - "947e869223e3c8154197a000d50f0c7e7f0a13a0", - [ - null, - [ - [ - "/css/CSS2/text/text-align-white-space-002-ref.xht", - "==" - ] - ], - {} - ] - ], "text-align-white-space-004.xht": [ "4d8f6b6f2646cda6d47eff7511f740944951369f", [ @@ -128389,7 +128414,7 @@ {} ] ], - "anchor-scroll-fixedpos.tentative.html": [ + "anchor-scroll-fixedpos.html": [ "ee7d22608b65570fe075e02542dbd877cd38cd82", [ null, @@ -128402,7 +128427,7 @@ {} ] ], - "anchor-scroll-nested.tentative.html": [ + "anchor-scroll-nested.html": [ "964b02a5b04845537c2a98c5df2defe5b820483b", [ null, @@ -128415,7 +128440,7 @@ {} ] ], - "anchor-scroll-update-001.tentative.html": [ + "anchor-scroll-update-001.html": [ "9400136e9824a75e2ad99be3d358933d55c97196", [ null, @@ -128428,7 +128453,7 @@ {} ] ], - "anchor-scroll-update-002.tentative.html": [ + "anchor-scroll-update-002.html": [ "4e8fcbe295da59a075caf0a3b94c1fffeb69ab45", [ null, @@ -128441,7 +128466,7 @@ {} ] ], - "anchor-scroll-update-003.tentative.html": [ + "anchor-scroll-update-003.html": [ "0d3ec2830cbc2cda42978bd6102175903dec3797", [ null, @@ -128454,7 +128479,7 @@ {} ] ], - "anchor-scroll-update-004.tentative.html": [ + "anchor-scroll-update-004.html": [ "7d1aadc95dba487890ac89ba2bec93684af52383", [ null, @@ -128467,7 +128492,7 @@ {} ] ], - "anchor-scroll-update-005.tentative.html": [ + "anchor-scroll-update-005.html": [ "5675507a47702ada4c4a738ca15cd57e432d151e", [ null, @@ -128480,7 +128505,7 @@ {} ] ], - "anchor-scroll-update-006.tentative.html": [ + "anchor-scroll-update-006.html": [ "7a8e675baa1b8d5aa3f81c0f4b3c291f93ddb279", [ null, @@ -128493,7 +128518,20 @@ {} ] ], - "anchor-scroll-vlr.tentative.html": [ + "anchor-scroll-update-007.html": [ + "b08bcc53ee7326615b7d3fc8ef2e8de9bbae9b63", + [ + null, + [ + [ + "/css/css-anchor-position/reference/anchor-scroll-ref.html", + "==" + ] + ], + {} + ] + ], + "anchor-scroll-vlr.html": [ "82d167f48d9521348459b67b75e5877616672663", [ null, @@ -128506,7 +128544,7 @@ {} ] ], - "anchor-scroll-vrl.tentative.html": [ + "anchor-scroll-vrl.html": [ "55b7355897447279bbad2a092603c0edf2dd8929", [ null, @@ -136970,6 +137008,23 @@ {} ] ], + "box-shadow-border-radius-001.html": [ + "6f81ca81fac13b590c2538970caaee80c27badcf", + [ + null, + [ + [ + "/css/css-backgrounds/reference/box-shadow-border-radius-001-ref.html", + "==" + ], + [ + "/css/css-backgrounds/reference/box-shadow-border-radius-001-notref.html", + "!=" + ] + ], + {} + ] + ], "box-shadow-calc.html": [ "14011859851b1234674bbdf6374670c674b56968", [ @@ -136996,52 +137051,52 @@ {} ] ], - "box-shadow-inset-spread-without-border-radius.html": [ - "0e74fbf5b64581d3940bd6c374a7972b9a6e7b76", + "box-shadow-inset-without-border-radius.html": [ + "8b2c691ebc8fbd318416a1c4f13461fb2576b702", [ null, [ [ - "/css/css-backgrounds/reference/box-shadow-inset-spread-without-border-radius.html", + "/css/css-backgrounds/reference/box-shadow-inset-without-border-radius-ref.html", "==" ] ], {} ] ], - "box-shadow-inset-without-border-radius.html": [ - "a6ad9440f3ce858f4b6aa5cdcde9da50ca6dec3b", + "box-shadow-invalid-001.html": [ + "acd0bdf41bd7899c45bd424e64127f5e30464ef1", [ null, [ [ - "/css/css-backgrounds/reference/box-shadow-inset-without-border-radius.html", + "/css/css-backgrounds/reference/ref-filled-green-100px-square.xht", "==" ] ], {} ] ], - "box-shadow-outset-spread-without-border-radius.html": [ - "5ebde5519ca445732fef5f3f28a60ecd102ed676", + "box-shadow-multiple-001.html": [ + "e95fb6841ad1c9b21aebf2c51f7690f917e0dd1c", [ null, [ [ - "/css/css-backgrounds/reference/box-shadow-outset-spread-without-border-radius.html", + "/css/css-backgrounds/reference/box-shadow-multiple-001-ref.html", "==" ] ], {} ] ], - "box-shadow-outset-without-border-radius.html": [ - "9f2135417278f6d0528eb3f66d255508a62571a9", + "box-shadow-outset-without-border-radius-001.html": [ + "71735a98ce7ae9d2df7ca7eed7dd7b4020cd72ba", [ null, [ [ - "/css/css-backgrounds/reference/box-shadow-outset-without-border-radius.html", + "/css/css-backgrounds/reference/box-shadow-outset-without-border-radius-001-ref.html", "==" ] ], @@ -137583,7 +137638,7 @@ ] ], "inner-border-non-renderable.html": [ - "46fbcc6c920eec3d95c56cf8b85fb8a1699942d2", + "7c3cff798819b7cc592b807a172a0bbebae32c9b", [ null, [ @@ -150520,7 +150575,7 @@ ] ], "lab-l-over-100-1.html": [ - "fdb3955e96ee4fc00e33db85134fc78adb84002b", + "7d6e0387700ac3226ed87402c5e26f4e9341e763", [ null, [ @@ -150533,7 +150588,7 @@ ] ], "lab-l-over-100-2.html": [ - "f62f9e0559b0c23106a29848bcf3e5515e16ff04", + "6674c41ae9667c7f30ce1e7b743abb21e6a398e0", [ null, [ @@ -150676,7 +150731,7 @@ ] ], "lch-l-over-100-1.html": [ - "9711956242df6e903d8ebcd3eebe2820c7b8b1e6", + "6e0c62330c39d329bb71323caf393e8d4426e535", [ null, [ @@ -150689,7 +150744,7 @@ ] ], "lch-l-over-100-2.html": [ - "a909a49f0c2344e3b8934a9b4d9b80a77ddac8fc", + "7752d0dc0eb4d59cbb12364441b59732d025fd1d", [ null, [ @@ -150818,6 +150873,19 @@ {} ] ], + "oklab-009.html": [ + "49bd916f5d7b5ceadb07ce1bdcde703887c67866", + [ + null, + [ + [ + "/css/css-color/greensquare-ref.html", + "==" + ] + ], + {} + ] + ], "oklch-001.html": [ "f32b7fe888b304576790175a0f7e6b5bbe45b354", [ @@ -150948,6 +151016,19 @@ {} ] ], + "oklch-011.html": [ + "6944867cd8d434eeebe30038cd6ececc26e38428", + [ + null, + [ + [ + "/css/css-color/greensquare-ref.html", + "==" + ] + ], + {} + ] + ], "opacity-overlapping-letters.html": [ "65ab3742de39205341e04b18001deea3f7be192d", [ @@ -153442,19 +153523,6 @@ {} ] ], - "at-supports-047.html": [ - "8ad858581478dad4721079b54c079fd93fab57c7", - [ - null, - [ - [ - "/css/css-conditional/at-supports-001-ref.html", - "==" - ] - ], - {} - ] - ], "at-supports-content-001.html": [ "19c99f504be7766978dc3816d186e7c2dabe126e", [ @@ -153637,6 +153705,19 @@ {} ] ], + "at-supports-selector-placeholder.html": [ + "8ad858581478dad4721079b54c079fd93fab57c7", + [ + null, + [ + [ + "/css/css-conditional/at-supports-001-ref.html", + "==" + ] + ], + {} + ] + ], "css-supports-001.xht": [ "9221309d45fd637e613a1c11519a09fa105a4830", [ @@ -179553,7 +179634,7 @@ ] ], "font-size-adjust-009.html": [ - "765447b22f040b8015789d0a6df532e801e67459", + "133f96f450cd9a45cf0822a7ffc082976371dac4", [ null, [ @@ -179566,7 +179647,7 @@ ] ], "font-size-adjust-010.html": [ - "6ee3ab7d8742b8f5d6bd3f16319ef57911183e67", + "c3b2bc195ec1c3ed067cac3bea60fd4bf446690b", [ null, [ @@ -179579,7 +179660,7 @@ ] ], "font-size-adjust-011.html": [ - "f4ac39c257471a81114f5f32019c65fc24187595", + "3f6afd8a3708aa86d94443b8a1d8bbffe2ffef5d", [ null, [ @@ -182006,7 +182087,7 @@ ] ], "slnt-backslant-variable.html": [ - "4bbe2b157f5cf07c7aacca0d4c2d94afb98dfaec", + "36a4305da72590c01280bee49ba08825cd3bcb59", [ null, [ @@ -182019,7 +182100,7 @@ ] ], "slnt-variable.html": [ - "d81df09c19d1bac0175d0e3e9e095f63165bfb6d", + "ae937037940b4533442777853dd43d76c241ce3f", [ null, [ @@ -190128,6 +190209,19 @@ {} ] ], + "contribution-size-flex-tracks-001.html": [ + "cc99f639686d073dd9c02db9c56c57026e3d225a", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "grid-gap-001.html": [ "0bc8eed4d8e408b18211b38095eecc0d983a96f4", [ @@ -190792,7 +190886,7 @@ ] ], "subgrid-no-items-on-edges-001.html": [ - "e2fe1a366e5cb013842f5730fda4a94cab2ae92b", + "f43c6f785d45a0be6f2da3e73327cd72697b9a19", [ null, [ @@ -190805,7 +190899,7 @@ ] ], "subgrid-no-items-on-edges-002.html": [ - "a2c73b188437434cfd4cb6943f5781413c6ff3a0", + "aa905954b967a3c469724776637194a396a53758", [ null, [ @@ -190855,6 +190949,19 @@ ], {} ] + ], + "writing-directions-003.html": [ + "1df5512d19e89addfcd75abfd94c6e5a9bd0bcaf", + [ + null, + [ + [ + "/css/css-grid/subgrid/writing-directions-003-ref.html", + "==" + ] + ], + {} + ] ] }, "table-grid-item-dynamic-001.html": [ @@ -193178,6 +193285,19 @@ {} ] ], + "image-set-negative-resolution-rendering-3.html": [ + "78eec0f2c1240c183759a267c6c969ba7b341b98", + [ + null, + [ + [ + "/css/reference/blank.html", + "==" + ] + ], + {} + ] + ], "image-set-negative-resolution-rendering.html": [ "416b6929f28125b61a0e767770308706eeda850c", [ @@ -193450,6 +193570,32 @@ ], {} ] + ], + "image-set-zero-resolution-rendering-2.html": [ + "ae1c765049a9624e8073678712f74d9004086a68", + [ + null, + [ + [ + "/css/reference/blank.html", + "==" + ] + ], + {} + ] + ], + "image-set-zero-resolution-rendering.html": [ + "0da39b7581e8626b14fb164033c87c6c74083779", + [ + null, + [ + [ + "/css/reference/blank.html", + "==" + ] + ], + {} + ] ] }, "infinite-radial-gradient-refcrash.html": [ @@ -201500,7 +201646,7 @@ ] ], "two-clip-path-animation-diff-length1.html": [ - "d6d04858b5a808aad9d366b3eae26bd75dc80127", + "f647c1af59095735217eb60e51291a64b79fce70", [ null, [ @@ -201513,7 +201659,7 @@ ] ], "two-clip-path-animation-diff-length2.html": [ - "0d86120ef35db999dd91b3c2cdd709429e907746", + "bc3460111f712d012e68e8b1e0254fa2f7c299af", [ null, [ @@ -201526,7 +201672,7 @@ ] ], "two-clip-path-animation-diff-length3.html": [ - "3c8141ad2defe3cd50bf08942819f9b27481ee36", + "5a66568132ac77ad70f8c6107139e6041782e917", [ null, [ @@ -215345,6 +215491,47 @@ ] ] }, + "overlay": { + "overlay-transition-finished.html": [ + "bf0aefac3f3d26376980bdb48ad8058210d77898", + [ + null, + [ + [ + "/css/css-position/overlay/green-ref.html", + "==" + ] + ], + {} + ] + ], + "overlay-transition-in-rendering.html": [ + "c794ec23a2d9bf9b6a2e44d760fcaef0cc550466", + [ + null, + [ + [ + "/css/css-position/overlay/green-ref.html", + "==" + ] + ], + {} + ] + ], + "overlay-transition-out-rendering.html": [ + "9c658c574cd99a17a2ab9679e925d3438a80491d", + [ + null, + [ + [ + "/css/css-position/overlay/green-ref.html", + "==" + ] + ], + {} + ] + ] + }, "position-absolute-center-001.html": [ "13af3f0e9f7184155b7edf09fb7a7a5580238fb2", [ @@ -217830,6 +218017,19 @@ {} ] ], + "file-selector-button-float.html": [ + "a9299ce3c43b626d4f4664d297fabfce399c7a61", + [ + null, + [ + [ + "/css/reference/blank.html", + "!=" + ] + ], + {} + ] + ], "first-letter-001.html": [ "b1dc5860a39d6c4d7088eccfaaec42898b6b12b3", [ @@ -219710,7 +219910,7 @@ ] ], "marker-variable.html": [ - "3d0a7c8596e0bc51b0421224696925997bc02561", + "eb349c98dfb26fec5917fe1be3c01e404cce5a65", [ null, [ @@ -229714,7 +229914,7 @@ ] ], "fit-content-block-size-abspos.html": [ - "d8ce91f9f626f8569bd9452c9fd90ead9a75ee4e", + "8ed6771483d220665d73f2667bf698f01d249994", [ null, [ @@ -229727,7 +229927,7 @@ ] ], "fit-content-block-size-fixedpos.html": [ - "1f08c6ab9f20747a3ab166a12654e106b5d51efd", + "052435ba93771f146c3875ce868a9b4ae366b2a8", [ null, [ @@ -229961,7 +230161,7 @@ ] ], "grid-item-image-percentage-min-height-computes-as-0.html": [ - "3b5dd2aedd0ce81d771130a7d8b905c75a9a7485", + "ef3da03100229a846ca77156bdf34e5e37c92508", [ null, [ @@ -230507,7 +230707,7 @@ ] ], "nested-flexbox-image-percentage-max-height-computes-as-none.html": [ - "afac4641477a6d7c39c0c682da6d4f3abc461e90", + "06b70f18e3d4e89299281024048f7984ba39a469", [ null, [ @@ -241195,7 +241395,7 @@ ] ], "text-indent-min-max-content-001.html": [ - "99592df5c5ba4fe751f9d21d2c2364847f04598f", + "93ddac50d6b6c8a7f272f208fdec6057d52a383b", [ null, [ @@ -242800,7 +243000,7 @@ ] ], "break-spaces-006.html": [ - "c13a28e95fc8305cec401a2f61da4edc4caaf8ce", + "056aa8a21bcda057df1aef26836c7705c715874f", [ null, [ @@ -242865,7 +243065,7 @@ ] ], "break-spaces-011.html": [ - "8c40a31a35688512742727639c11091ac8163dd8", + "0355d6d6b519bca0e210c0a1151f4deccd1666d7", [ null, [ @@ -245781,7 +245981,7 @@ ] ], "text-wrap-balance-002.html": [ - "7366c6ac0f10ada47f67c7ad35fc073016bccf96", + "cae9d54de0e60c42047f7bffafe729f8aae2b740", [ null, [ @@ -245794,7 +245994,7 @@ ] ], "text-wrap-balance-align-001.html": [ - "b4659613c8552a90bb210292774fab7271a2b6c8", + "b27823b72a4dfec983e0e0eae7a5436d9f958b74", [ null, [ @@ -245807,7 +246007,7 @@ ] ], "text-wrap-balance-dynamic-001.html": [ - "8c7d27d1a347407c82f0602bba105982764729e3", + "76b4cbbb433568b7cc25f7b1fb6e419b9a9570be", [ null, [ @@ -245820,7 +246020,7 @@ ] ], "text-wrap-balance-line-clamp-001.html": [ - "292e655464b750a3c0426fb6c63df8ebdbac5ffe", + "f104a5261bc9837ad0f9af675ba44de28421b824", [ null, [ @@ -245833,7 +246033,7 @@ ] ], "text-wrap-balance-text-indent-001.html": [ - "e06d91e599e6e137d3c178d3553ca82ff370eae6", + "0fe4447acfb0f3a9a0c445723c99071959ff6d6c", [ null, [ @@ -246815,7 +247015,7 @@ ] ], "trailing-space-and-text-alignment-001.html": [ - "011518bdd84defaba71bd32c87b4db1511644013", + "2165e7fe4a84962e37353e4bd102051b1b12cb24", [ null, [ @@ -246828,7 +247028,7 @@ ] ], "trailing-space-and-text-alignment-002.html": [ - "a015c74766a1dbd767fc9770d3ca3cad6654f251", + "30e37908a22b669af58753fbacd3fcaaa2147803", [ null, [ @@ -246841,7 +247041,7 @@ ] ], "trailing-space-and-text-alignment-003.html": [ - "9d0c971830f3a9a17be197a0fdabc5ea0d63a2bc", + "9995e240580994dd836412b2734aba56718d574f", [ null, [ @@ -246854,7 +247054,7 @@ ] ], "trailing-space-and-text-alignment-004.html": [ - "2328afa74922c64a63e8320e5dff8438a89d3756", + "3d7aad05418bce1691ec766a598f6c1d51c00aed", [ null, [ @@ -246867,7 +247067,7 @@ ] ], "trailing-space-and-text-alignment-005.html": [ - "059a2af436d64db772d59d7118273654ba6153a2", + "76348aaf216a0497b565a9db44472cb9dadb7b3a", [ null, [ @@ -246880,7 +247080,7 @@ ] ], "trailing-space-and-text-alignment-rtl-001.html": [ - "5351fdc5f74aaa54371c0ad371966943a9d69782", + "6e70740cdde781c36874c58def741c56bfd39595", [ null, [ @@ -246893,7 +247093,7 @@ ] ], "trailing-space-and-text-alignment-rtl-002.html": [ - "8fdf694390dc137520090f2d33ff98ba3816155a", + "0422506b516abcff0d0bd3b3e422426c67fa1e43", [ null, [ @@ -246906,7 +247106,7 @@ ] ], "trailing-space-and-text-alignment-rtl-003.html": [ - "00186110d7df1e4e7540422e7395bbe71c6a2fba", + "70fc786924a5db12baf3bc47de67da3c0e9e54c9", [ null, [ @@ -246919,7 +247119,7 @@ ] ], "trailing-space-and-text-alignment-rtl-004.html": [ - "628c7fa70f70cc87cdef7836237d05e1b30ce999", + "7705d6dfb147925308590869b061f174503e34ad", [ null, [ @@ -246932,7 +247132,7 @@ ] ], "trailing-space-and-text-alignment-rtl-005.html": [ - "bb69506714610acce46ab15fad50d8d31ca501c2", + "31afbe4b3a8022872468310424c1c1efc2225843", [ null, [ @@ -247118,7 +247318,7 @@ ] ], "white-space-intrinsic-size-017.html": [ - "9c2bc31947ed1b269d123a88679cb3ed20189399", + "978dfb8ba4a3cf55d3da56fe669e267db28148d3", [ null, [ @@ -247138,7 +247338,7 @@ ], [ 0, - 3958 + 4400 ] ] ] @@ -247147,7 +247347,7 @@ ] ], "white-space-intrinsic-size-018.html": [ - "cc9117f88b570ee5e489bb18017c1d78a295eedd", + "707e19adc0e8e857dbe175746aa047f29a0c6346", [ null, [ @@ -247167,7 +247367,7 @@ ], [ 0, - 3958 + 4400 ] ] ] @@ -247331,6 +247531,58 @@ {} ] ], + "white-space-pre-wrap-justify-001.html": [ + "2ceb8d7293690086675e55741485df4e6c921e3e", + [ + null, + [ + [ + "/css/css-text/white-space/reference/white-space-pre-wrap-justify-001-ref.html", + "==" + ] + ], + {} + ] + ], + "white-space-pre-wrap-justify-002.html": [ + "785ebef2272fcc7caa5ce612cedec6fe3469c59b", + [ + null, + [ + [ + "/css/css-text/white-space/reference/white-space-pre-wrap-justify-002-ref.html", + "==" + ] + ], + {} + ] + ], + "white-space-pre-wrap-justify-003.html": [ + "a00f9c381860a09e4a1ebcac90e38b3340a03e03", + [ + null, + [ + [ + "/css/css-text/white-space/reference/white-space-pre-wrap-justify-003-ref.html", + "==" + ] + ], + {} + ] + ], + "white-space-pre-wrap-justify-004.html": [ + "e1611a3143f3596c89776a61909e19aae6556c12", + [ + null, + [ + [ + "/css/css-text/white-space/reference/white-space-pre-wrap-justify-004-ref.html", + "==" + ] + ], + {} + ] + ], "white-space-pre-wrap-trailing-spaces-001.html": [ "82fbfbc976cd02629d1180e4470170a533aa27e9", [ @@ -261559,7 +261811,7 @@ ] ], "transform-rotate-003.html": [ - "6bd015ae181684613a87a485dec0bac31a2a9ad1", + "40b69fb35bf0e888a6ef0478570918fc9e0e821b", [ null, [ @@ -261583,7 +261835,7 @@ ], [ 0, - 10 + 11 ] ] ] @@ -261592,7 +261844,7 @@ ] ], "transform-rotate-004.html": [ - "a7943e64bd590fd84499955bf615035b942c435a", + "58f8103ab176d10428deb915557c16356e0a566f", [ null, [ @@ -261616,7 +261868,7 @@ ], [ 0, - 4 + 10 ] ] ] @@ -264611,19 +264863,6 @@ {} ] ], - "appearance-push-button-001.html": [ - "3aecbb079809bb0f1e8c2a0786dee51bc6eb61d4", - [ - null, - [ - [ - "/css/css-ui/appearance-auto-ref.html", - "==" - ] - ], - {} - ] - ], "appearance-radio-001.html": [ "5a64ba7b0132201d5928837847aee446149a5663", [ @@ -264663,32 +264902,6 @@ {} ] ], - "appearance-slider-horizontal-001.html": [ - "4d5b1a94fc9485b3aad8744d09dfe7d8c4ea12eb", - [ - null, - [ - [ - "/css/css-ui/appearance-auto-ref.html", - "==" - ] - ], - {} - ] - ], - "appearance-square-button-001.html": [ - "8f8c84355d22ab332695f5092321b4f5768db774", - [ - null, - [ - [ - "/css/css-ui/appearance-auto-ref.html", - "==" - ] - ], - {} - ] - ], "appearance-textarea-001.html": [ "5c55ff9fbf6fd993aaf51114c175414a9ec8fe0b", [ @@ -276498,19 +276711,6 @@ {} ] ], - "webkit-appearance-push-button-001.html": [ - "6f44498d4660f58e6df2b32efd218c729edc0fc8", - [ - null, - [ - [ - "/css/css-ui/appearance-auto-ref.html", - "==" - ] - ], - {} - ] - ], "webkit-appearance-radio-001.html": [ "52d9fb22ac144c2ba932e4a97bc65796760414b7", [ @@ -276537,32 +276737,6 @@ {} ] ], - "webkit-appearance-slider-horizontal-001.html": [ - "a9375b5088ca995c545fb441cccef281242836dd", - [ - null, - [ - [ - "/css/css-ui/appearance-auto-ref.html", - "==" - ] - ], - {} - ] - ], - "webkit-appearance-square-button-001.html": [ - "f486329943bfba60fdf69dba0ef0065876b3b361", - [ - null, - [ - [ - "/css/css-ui/appearance-auto-ref.html", - "==" - ] - ], - {} - ] - ], "webkit-appearance-textarea-001.html": [ "cf3a15f4db6c9745de687cb38f593132d5ddf2f8", [ @@ -282674,7 +282848,7 @@ ] ], "old-content-captures-clip-path.html": [ - "a2faa7f1575af4c6ac3f65b3fb303f6dbab875d3", + "467b19d928d62492dbb33a54edebdc9f92f8bcf9", [ null, [ @@ -282683,7 +282857,27 @@ "==" ] ], - {} + { + "fuzzy": [ + [ + [ + "/css/css-view-transitions/old-content-captures-clip-path.html", + "/css/css-view-transitions/old-content-captures-clip-path-ref.html", + "==" + ], + [ + [ + 0, + 1 + ], + [ + 0, + 500 + ] + ] + ] + ] + } ] ], "old-content-captures-different-size.html": [ @@ -303320,19 +303514,6 @@ {} ] ], - "file-control-button-float.html": [ - "a9299ce3c43b626d4f4664d297fabfce399c7a61", - [ - null, - [ - [ - "/css/reference/blank.html", - "!=" - ] - ], - {} - ] - ], "first-letter-flag-001.html": [ "dc23dda1741b154a7af3f48677b0fbe0744d06d4", [ @@ -303632,6 +303813,84 @@ {} ] ], + "has-style-sharing-001.html": [ + "bf45e98cf2d40700c40cacec84edfb26b6cdb55f", + [ + null, + [ + [ + "/css/selectors/has-style-sharing-001-ref.html", + "==" + ] + ], + {} + ] + ], + "has-style-sharing-002.html": [ + "630a136186af4472e3ace0b084bf8ccf05696ed1", + [ + null, + [ + [ + "/css/selectors/has-style-sharing-002-ref.html", + "==" + ] + ], + {} + ] + ], + "has-style-sharing-003.html": [ + "480a23e368219e69fde2434559fa194089702fa8", + [ + null, + [ + [ + "/css/selectors/has-style-sharing-003-ref.html", + "==" + ] + ], + {} + ] + ], + "has-style-sharing-004.html": [ + "c0879f70ec7644196bfb9f35e8cbfd1e97f96ec6", + [ + null, + [ + [ + "/css/selectors/has-style-sharing-004-ref.html", + "==" + ] + ], + {} + ] + ], + "has-style-sharing-005.html": [ + "d6b05fc33d8a7df0e77373818a24eda28747d169", + [ + null, + [ + [ + "/css/selectors/has-style-sharing-005-ref.html", + "==" + ] + ], + {} + ] + ], + "has-style-sharing-006.html": [ + "e0d824f359f91aec0d30049e4312d3accf7281f5", + [ + null, + [ + [ + "/css/selectors/has-style-sharing-006-ref.html", + "==" + ] + ], + {} + ] + ], "has-visited.html": [ "8fe322c8b1751b2f4232e9898fa71bab5e203cde", [ @@ -303753,7 +304012,7 @@ ] ], "nth-child-containing-ancestor.html": [ - "7266cd5a2518bb533e2729859f43d21ac59f1279", + "a7f246328c8f5f48c7f32822ea8dfdecde474022", [ null, [ @@ -303779,7 +304038,7 @@ ] ], "nth-child-of-attr-largedom.html": [ - "76bc4542dae30ec1d7cbd4856875dc63def90015", + "07d87d2d4b4ae7448725890cc27f8ac0bc334c88", [ null, [ @@ -303792,7 +304051,7 @@ ] ], "nth-child-of-attr.html": [ - "d929d6a50db02d3e34d024d83200649573ca20a4", + "d4e82ff78c01832f2531d0b0e0a720b7fb9115fc", [ null, [ @@ -303805,7 +304064,7 @@ ] ], "nth-child-of-class-prefix.html": [ - "ac7757db3eb03bbc11e01911d857baca63b1b4a8", + "2ea57c099f815399ec1d2f1a7839b08901e00f54", [ null, [ @@ -303818,7 +304077,7 @@ ] ], "nth-child-of-class.html": [ - "dc1e8cec82ed334d75c51351775fa001b3cddb4e", + "1171f25c0a448a233580e7552fa5bb06ef721ec3", [ null, [ @@ -303831,7 +304090,7 @@ ] ], "nth-child-of-has.html": [ - "1a548315cc09c49bf3c5177172adf771ec0a350c", + "8473828973def17ad8859fd1167ba364c5c4b41b", [ null, [ @@ -303844,7 +304103,7 @@ ] ], "nth-child-of-id-prefix.html": [ - "fadb8f38514e1cf2c143a5bdd586687a28c64537", + "b07b1cfc411c3b002f991ef5e13021880d225969", [ null, [ @@ -303857,7 +304116,7 @@ ] ], "nth-child-of-ids.html": [ - "033205283c46d43bc1f6f7f8f3dd79991e1a8b82", + "8e94aa3e22c68e2fdb8c4787949dab8bd999ef59", [ null, [ @@ -303870,7 +304129,7 @@ ] ], "nth-child-of-in-ancestor.html": [ - "7311c3e301155620b05cde7ffecd9d829d20618a", + "2ae80061b05deff92ae2805634530ee4e2b212d0", [ null, [ @@ -303883,7 +304142,7 @@ ] ], "nth-child-of-in-is.html": [ - "31276e6ef9eb0bf9990d548d576ab30b82b14e48", + "f004195c83e226c02fe87c0b70a0a8e74d59eaa1", [ null, [ @@ -303896,7 +304155,7 @@ ] ], "nth-child-of-in-shadow-root.html": [ - "1e949a3bd0e991d97d3ae87fc7420c81047477e6", + "4195a14a3ed80583ace772854fcbbf6e84388614", [ null, [ @@ -303909,7 +304168,7 @@ ] ], "nth-child-of-is.html": [ - "e230a30d177627139a327f09f93c3e66319f5fc8", + "4473845a7a09d97acd5dacd1fbc51e50b679222c", [ null, [ @@ -303935,7 +304194,7 @@ ] ], "nth-child-of-sibling.html": [ - "5beaad6a58108dde8607e9940c4fb017e4056ab2", + "68e46518ec2bf1bb82b56572b58bde61377120b4", [ null, [ @@ -303948,7 +304207,7 @@ ] ], "nth-child-when-ancestor-changes.html": [ - "4d2b4fbce076a1ea1d651e4a86afdd0da0decf07", + "c4a97ee7e805c24e74874c330a9ed1f260229267", [ null, [ @@ -303961,7 +304220,7 @@ ] ], "nth-child-when-sibling-changes.html": [ - "a0025be95a2bcab29d77e4a9e1b789304fa31055", + "43374df917423e7ec9860011b2ce6e1915e52289", [ null, [ @@ -304013,7 +304272,7 @@ ] ], "nth-last-child-of-class-prefix.html": [ - "f9fc196c2136e600e84c0116aa58ffa3938ea316", + "da12246926d72293893330a041592130ddd4663c", [ null, [ @@ -304052,7 +304311,7 @@ ] ], "nth-last-child-of-id-prefix.html": [ - "1a9e6a9aa319b6d690771e1b9fae96fa3db9bb37", + "747236aca0b8818bce370626f359c779dcf4a0ac", [ null, [ @@ -304065,7 +304324,7 @@ ] ], "nth-last-child-of-ids.html": [ - "cd682ed5fb547b2238b1eaa591b67d103f60999b", + "def336119a5c2143a3330afc265325f3cfb46c1d", [ null, [ @@ -304091,7 +304350,7 @@ ] ], "nth-last-child-of-in-is.html": [ - "90c8860c87f5028cf5f5cea5988dd66cc6ef147d", + "370883ecf1c44412f8978980296ad30c0f547977", [ null, [ @@ -304117,7 +304376,7 @@ ] ], "nth-last-child-of-is.html": [ - "ac1ec316c74c8bea13f668804c290e7a1548f91f", + "0db7347698db341f4c11adf2203efd909410ed39", [ null, [ @@ -304313,7 +304572,7 @@ ] ], "nth-child-and-nth-last-child.html": [ - "455063f916013a47b7034dfff7b553fd8bb0f036", + "1379b4c706de2e3353f0ecc4bb5e2bbe00e24b25", [ null, [ @@ -304352,7 +304611,7 @@ ] ], "nth-child-of-classname.html": [ - "8ec3f43f7f481e4f3c65d03f6dfd2e12f6f59961", + "1cfb01056c96390771aa07c1e704113f689188fd", [ null, [ @@ -304378,7 +304637,7 @@ ] ], "nth-child-of-complex-selector-many-children.html": [ - "72f58cd93a0476cec88dad5c4b79cdc36f949437", + "ab958c9d8844c485cb78401051840dba688d224e", [ null, [ @@ -304391,7 +304650,7 @@ ] ], "nth-child-of-complex-selector.html": [ - "b751d83de2228ccfe6ed25e53d80b34be76732b2", + "f06680a57f7260b275b8205d878b9febd6b37fb1", [ null, [ @@ -304404,7 +304663,7 @@ ] ], "nth-child-of-compound-selector.html": [ - "5efefe6eadfedfe3b2c670a31a26d1268ddfb8eb", + "50bdba0b83ee53ff6b6c8e5e7d6f8b2ea37b333a", [ null, [ @@ -304430,7 +304689,7 @@ ] ], "nth-child-of-nesting.html": [ - "851260623d6d402016070b5081994ca6474c00c0", + "78c5cde1cc6e359ef45cb7d2f2505944c0e7a5c4", [ null, [ @@ -304443,7 +304702,7 @@ ] ], "nth-child-of-no-space-after-of.html": [ - "613593ce668db7a97220d08932dbd2281c2bca4d", + "997b07c27dc52c12ec5e279a2f1b19aae09682bd", [ null, [ @@ -304481,8 +304740,21 @@ {} ] ], + "nth-child-of-pseudo.html": [ + "7113af901042966053b5484a5a9e3d09139e006d", + [ + null, + [ + [ + "/css/selectors/nth-child-of-pseudo-ref.html", + "==" + ] + ], + {} + ] + ], "nth-child-of-tagname.html": [ - "107e834296f7b457afda9394fdbb7838e3591594", + "cc92ad6df99c532d69e788710a756b4533a52cc4", [ null, [ @@ -304508,7 +304780,7 @@ ] ], "nth-child-specificity-1.html": [ - "d0b084a719daf95d8a94ad34e6d1c58c557a089f", + "64d9eb27c0e34feda152a613dc8d20894ec20a76", [ null, [ @@ -304521,7 +304793,7 @@ ] ], "nth-child-specificity-2.html": [ - "a467e5e056a2daceb5f0a814416334e1e1d53f39", + "10467e7408ffcd42586982c89fb0b1443295aedc", [ null, [ @@ -304534,7 +304806,7 @@ ] ], "nth-child-specificity-3.html": [ - "f9c23b27ca17105380cba780644cf2b933050f2b", + "8649f4fc4a058ad452a7cb4abf613a4b044dcde1", [ null, [ @@ -304547,7 +304819,7 @@ ] ], "nth-child-specificity-4.html": [ - "6286b01f7ea7f6932eb24431a769add3db075ca2", + "de856c28249de80672b577835461d727457dc601", [ null, [ @@ -304560,7 +304832,7 @@ ] ], "nth-last-child-of-classname.html": [ - "770fda381f0c5f27806c17cc2caec1b6d939c350", + "80770b08a60b006a391331ab6bc46b59170d359a", [ null, [ @@ -304573,7 +304845,7 @@ ] ], "nth-last-child-of-complex-selector.html": [ - "0f1262c746f7341c1e59dfdbb9866e753eb03bb4", + "ae8fc6ebfad500c13ec77d39b9440980e87b9ca6", [ null, [ @@ -304586,7 +304858,7 @@ ] ], "nth-last-child-of-compound-selector.html": [ - "a7aa40f50a28e09a36481a2c565d9c75c66a0341", + "df1d58347b73bb277b64fdc221217106147833cf", [ null, [ @@ -304599,7 +304871,7 @@ ] ], "nth-last-child-of-nesting.html": [ - "0dd18f2c4b99396bdb34c75551a8aca512d53e99", + "e1ce3ce2038f33640c32bf11d7064273bd922e4b", [ null, [ @@ -304612,7 +304884,7 @@ ] ], "nth-last-child-of-no-space-after-of.html": [ - "d79d5733a5c3986e0c3560420471a24dba313052", + "5ce99119b91c0df63ac1d1360e6bd7684ce9e3ee", [ null, [ @@ -304625,7 +304897,7 @@ ] ], "nth-last-child-of-style-sharing-1.html": [ - "de3e26325619a06406fca1db96e1a9fd38987739", + "17ea008b2d8da04d709b2bba11041b9fa91a368e", [ null, [ @@ -304638,7 +304910,7 @@ ] ], "nth-last-child-of-style-sharing-2.html": [ - "19fc9af414eb5e7745e333af9ab1eb9baeaf724d", + "2c586956b4a5afd38608fe4a98828f3797daee1e", [ null, [ @@ -304651,7 +304923,7 @@ ] ], "nth-last-child-of-tagname.html": [ - "ddfd6528cc5c51d1e2afaea578473a947da769de", + "385d12948c011365717342494cef0f24a49230ff", [ null, [ @@ -304664,7 +304936,7 @@ ] ], "nth-last-child-specificity-1.html": [ - "cc4f542fff3ed8397a1c9f605a591f0964d022e1", + "18e00f1ca57dbe6be1f1af10650023f8f3e8e020", [ null, [ @@ -304677,7 +304949,7 @@ ] ], "nth-last-child-specificity-2.html": [ - "3ddb43b62bd65a53f86ad1e73bd32182196d3bf1", + "3c3c8739f37b8190b0f0745b23395223d9a18e37", [ null, [ @@ -304690,7 +304962,7 @@ ] ], "nth-last-child-specificity-3.html": [ - "673b4350443b50c1cd0d53683a32ffc722c54678", + "93a7007a48bf114a51ff4f05f88d9b2ac7e190d0", [ null, [ @@ -304703,7 +304975,7 @@ ] ], "nth-last-child-specificity-4.html": [ - "b690ea2b01714bfb6ee042dcbac728f77005cc4e", + "f556b994b06b894e1b9cf68854f5e87b0283630d", [ null, [ @@ -311039,7 +311311,7 @@ ] ], "dir_auto-textarea-N-between-Rs.html": [ - "ddae91054ae94e36becb70b3a3637be4714eaabd", + "b5850e1c3c91ebc192590d0330c06e94c0be915a", [ null, [ @@ -312533,6 +312805,19 @@ {} ] ], + "table-bordercolor-001.html": [ + "014abe3567a7ab5dd15cf4024753abaeb4e32a62", + [ + null, + [ + [ + "/html/rendering/non-replaced-elements/tables/table-bordercolor-001-ref.html", + "==" + ] + ], + {} + ] + ], "table-cell-nowrap-with-fixed-width.html": [ "65962ac2734c5573f172b7303d95a20d33534905", [ @@ -321371,6 +321656,19 @@ {} ] ], + "deferred-timeline-composited.html": [ + "239c0ca50a97458f01402a104c40a4c4a8c2254e", + [ + null, + [ + [ + "/scroll-animations/css/deferred-timeline-composited-ref.html", + "==" + ] + ], + {} + ] + ], "scroll-animation-initial-offset.html": [ "34ae52d47927ee73c9c41c6f608bcd988e8f0cd7", [ @@ -321489,7 +321787,7 @@ ] ], "view-timeline-range-update.html": [ - "5400d8314b087d479f0a6270c6c0b8c07af5a4a7", + "e1938caf5007daa13467a0197cb7a8ff674ecb51", [ null, [ @@ -323935,6 +324233,19 @@ {} ] ], + "pattern-text-01.svg": [ + "16c053590d0df65c01f57e3b454793bc93fbbc0a", + [ + null, + [ + [ + "/svg/pservers/reftests/reference/green-100x100.svg", + "==" + ] + ], + {} + ] + ], "pattern-viewbox-01.svg": [ "618b8fc29e69d2624d5556d6bbcdba600ce21a4a", [ @@ -328764,7 +329075,7 @@ }, "support": { ".azure-pipelines.yml": [ - "a21ebce6bc7abf9ab36066631637fc8ccbae23f7", + "efa5ee18a1dc79fdaf56abac879db39c85da5cd9", [] ], ".gitattributes": [ @@ -328782,7 +329093,7 @@ ], "workflows": { "documentation.yml": [ - "14c52ebc40c8f1a9acc83df17e65aecb4e5c6cca", + "4f1f3b2ed3846fc79b080fde2330162af7757d78", [] ], "epochs.yml": [ @@ -328812,7 +329123,7 @@ [] ], ".taskcluster.yml": [ - "c80e92af204939fa8734b9b72832bccba4afeb0f", + "c817999b8e6f752b050928fce9e2370748d7c7f2", [] ], ".well-known": { @@ -331536,7 +331847,7 @@ [] ], "reports.py": [ - "9682a6dd24d6a2484456f7ae3c9ba14675e0c39e", + "2511dd67cd7a2882392fbf695f8e5db91c4702c0", [] ] } @@ -331901,12 +332212,12 @@ "71064a90c5b04ce6fa7f154da440c2dcc62a3602", [] ], - "intercept-request.js": [ - "c19efb5f2f3fe5469b63b5772c875d9e62fb47b5", + "header-util.sub.js": [ + "c38e5aa59d8b2a995f907aeb91ef7e971104b7d9", [] ], - "navigation-header-util.sub.js": [ - "b3bec79651d0cfca140176a5527327d86d780ad5", + "intercept-request.js": [ + "c19efb5f2f3fe5469b63b5772c875d9e62fb47b5", [] ], "permissions-policy-util.sub.js": [ @@ -353763,7 +354074,7 @@ [] ], "userinfo-iframe.html": [ - "1a38c405af12cf3b42bf3137dab0f15fa1539d6f", + "45a1a34ce9e360e8eae13cb1e79c011c9b74db4a", [] ] }, @@ -373570,7 +373881,7 @@ ] }, "inner-border-non-renderable-ref.html": [ - "e4e3d3455f2086121be013d317bf36bd05d90518", + "b88cf1547afef62e5947d432b1528a1815b7d19c", [] ], "inset-box-shadow-scroll-ref.html": [ @@ -373882,20 +374193,24 @@ "d2ae1ebd84b7ed80bcee9e0b457a41c0b8f17cf9", [] ], - "box-shadow-inset-spread-without-border-radius.html": [ - "5e9cf0d34ec1510d8f8c879baf88720b861a75a5", + "box-shadow-border-radius-001-notref.html": [ + "fd0c1eb803613e6eaa78da174b2a5fd1122068d6", + [] + ], + "box-shadow-border-radius-001-ref.html": [ + "ff99f43feec9f2929d381e4682058c36115a293b", [] ], - "box-shadow-inset-without-border-radius.html": [ - "5e9cf0d34ec1510d8f8c879baf88720b861a75a5", + "box-shadow-inset-without-border-radius-ref.html": [ + "dca329fafe54c0fb5d93887ee29bb80dd0670464", [] ], - "box-shadow-outset-spread-without-border-radius.html": [ - "f62399abce0f0c2f745ef63849bc54fcf952cce9", + "box-shadow-multiple-001-ref.html": [ + "ada9dbac1f3587be917f26772b52904885a0277e", [] ], - "box-shadow-outset-without-border-radius.html": [ - "2bca4c6961b88faaafb8d621ca222faee48256ef", + "box-shadow-outset-without-border-radius-001-ref.html": [ + "7dfef37a704d8a8d334da69a61e363137124ae90", [] ], "box-shadow-overlapping-001-ref.html": [ @@ -374685,6 +375000,10 @@ "70c4049131f7c4f458398c40bb0c1d575a6fa071", [] ], + "break-inside-avoid-multicol-001-print-ref.html": [ + "baf114d35c9d86ec0708f070e269d965f47bc972", + [] + ], "break-nested-float-in-table-001-print-ref.html": [ "3459e25edd64ca8d90cebd4a44f68aa9b4106e25", [] @@ -380834,7 +381153,7 @@ [] ], "font-size-adjust-009-ref.html": [ - "b0d269a49aec2440878aac4f33aa35eed018e4dc", + "2ee9d0a0c8b71353293795c03a57c987e025d857", [] ], "font-size-adjust-012-ref.html": [ @@ -389379,6 +389698,10 @@ "writing-directions-002-ref.html": [ "cd1ee527ab1053bc5aa4b3e10466b09cfaa605e0", [] + ], + "writing-directions-003-ref.html": [ + "b8038a2b5095cbbf03ff82c667b759587a3a6389", + [] ] }, "support": { @@ -394071,6 +394394,12 @@ [] ] }, + "overlay": { + "green-ref.html": [ + "bef7405e96f8181f88fb073ebd212b4af6382e33", + [] + ] + }, "position-absolute-iframe-print-ref.html": [ "d89bb93cf9fb14caefee7a4bf27a15d4cc4f7615", [] @@ -394910,7 +395239,7 @@ [] ], "marker-variable-ref.html": [ - "d966437560d2599544dd500fac76fa03fa10b314", + "d2ea847faf6fd14a86c5395ddc2d989804bd2db3", [] ], "marker-word-break-ref.html": [ @@ -396752,7 +397081,7 @@ [] ], "grid-item-image-percentage-min-height-computes-as-0-ref.html": [ - "296cc59331946d45a56b0813afdc44c060747ed7", + "7a8319d65460ea4b16d6ce06b107aa074e83607b", [] ], "hori-block-size-small-or-larger-than-container-with-min-or-max-content-1-ref.html": [ @@ -396808,7 +397137,7 @@ [] ], "nested-flexbox-image-percentage-max-height-computes-as-none-ref.html": [ - "6a290b23a80155f7989c148a3cca4a68df51012e", + "34e2ed01e5221369db8669548ec732099bef43e8", [] ], "range-percent-intrinsic-size-1-ref.html": [ @@ -400627,6 +400956,22 @@ "b920bdb111274bac29825e53b68005e1bf7ad6e9", [] ], + "white-space-pre-wrap-justify-001-ref.html": [ + "82b10ac6a4a372a155364f1aabd8e5c3fdc60e5f", + [] + ], + "white-space-pre-wrap-justify-002-ref.html": [ + "cd228e234cdfbef4a565f97f93a84c1145be3f52", + [] + ], + "white-space-pre-wrap-justify-003-ref.html": [ + "d72988230e65abe430552c45461d6a71613372ce", + [] + ], + "white-space-pre-wrap-justify-004-ref.html": [ + "be487e6f3c63edc66be5f0332670b2041a14b174", + [] + ], "white-space-pre-wrap-trailing-spaces-001-ref.html": [ "8db147766bc3fa769df5601b8b32964fb59bcbc1", [] @@ -400719,6 +401064,12 @@ "942bd8fe92d2973dd568eabbc2b959c9b80c628c", [] ] + }, + "support": { + "trailing-space-and-text-alignment.css": [ + "3bb9b369fc74b8fec5139895ffafe5ebb840e3e0", + [] + ] } }, "word-boundary": { @@ -410295,6 +410646,30 @@ "6ab36318796dfebc78b62b258e261282fc6c9b98", [] ], + "has-style-sharing-001-ref.html": [ + "6013cb47d3f4ed5c490bca27ee017aba0cf1afeb", + [] + ], + "has-style-sharing-002-ref.html": [ + "c916ab074f38d6a5e663a12d59889f48062e3c26", + [] + ], + "has-style-sharing-003-ref.html": [ + "36aae7a103ee8761c22f5d3121241218094cce71", + [] + ], + "has-style-sharing-004-ref.html": [ + "f710924e31429903092a062ff08dea68ae679d5c", + [] + ], + "has-style-sharing-005-ref.html": [ + "eb95d473735b91f486ab0483cd0c3f48fa4e7e23", + [] + ], + "has-style-sharing-006-ref.html": [ + "4c03f2150ad15fdf08b49a2dee138d25e6e91aa1", + [] + ], "has-visited-ref.html": [ "3f54e2e3914f62a81c3199bbe3d8c0339b9c2ba8", [] @@ -410319,7 +410694,7 @@ [] ], "nth-child-containing-ancestor-ref.html": [ - "4dc7247e41ef83e0640828bdb6887f29c3c8ee98", + "6e6680d8c3f63b0539a62c7eb0bb010d48bc4409", [] ], "nth-child-in-shadow-root-ref.html": [ @@ -410327,27 +410702,27 @@ [] ], "nth-child-of-attr-largedom-ref.html": [ - "6ddc204b83aa8e21d2275352a3aac238bb3baa62", + "07617c53ad183adbd4d3f6633b3178d16f820536", [] ], "nth-child-of-attr-ref.html": [ - "41205174eb0ad5bfca3189f6e03912530c990f9e", + "5207cc987d10203bbc7ef282e519462abf0a15fc", [] ], "nth-child-of-class-ref.html": [ - "7a8247c469ea86fd4e8ea32a961d4e1b0741c986", + "d4e2dfb71d9847329e84388377f201c17bbc63b5", [] ], "nth-child-of-has-ref.html": [ - "ab3931d6ef46532ca1aa4e5d25683e9d5e12ed8e", + "39f0501b826126898a0552c538feed305d3f7b54", [] ], "nth-child-of-in-ancestor-ref.html": [ - "a4e4b7fd9fc44bd189aba0423d536dcb82201a9f", + "bc7ecb9ff7c1f7b16f13f2e062b378de24ff613a", [] ], "nth-child-of-in-shadow-root-ref.html": [ - "f28d358cdc53d71501fd35c0c6dc2db41e042b2b", + "060c07decac51542a483c4c8206070fd1cbf4933", [] ], "nth-child-of-pseudo-class-ref.html": [ @@ -410355,15 +410730,15 @@ [] ], "nth-child-of-sibling-ref.html": [ - "0388fc7c5ab112271e3b2d54293765c8ad87eff0", + "ed7fefc59fe20e9453f64d47b1e14de7a613f944", [] ], "nth-child-when-ancestor-changes-ref.html": [ - "8b7d32906d9c2766bc2c6d60451b84246e355d5c", + "7e3f7f0c98ae3b05dbab44da655b2533d6b16868", [] ], "nth-child-when-sibling-changes-ref.html": [ - "9a397529900cbb8e6248d94dccd1e52670f83ec5", + "f30a853cae7e4fe735099422fd192e6a930d12c1", [] ], "nth-last-child-in-shadow-root-ref.html": [ @@ -410455,6 +410830,10 @@ "94dbc67a851f40879c78735960fece8cba10e820", [] ], + "nth-child-of-pseudo-ref.html": [ + "7e816b5f18875bb18a625ee65ee5b91ee39f4da3", + [] + ], "nth-child-of-tagname-ref.html": [ "99c8262b4f36dd60e9bf6ee1afa5229579eb22a1", [] @@ -411121,7 +411500,7 @@ [] ], "Dockerfile": [ - "bf5b7088a58b4339980e4c50042501c5e10720a9", + "757552686661f8a28d99a1befc7ea1b6626396b8", [] ], "META.yml": [ @@ -411138,7 +411517,7 @@ ], "admin": { "index.md": [ - "dd7dfe2e72ae3aa2284cea498c0e36bbd7ab16fb", + "f42d3075b6b7011ec3966ecb2b9cfd8ef54e5609", [] ], "pywebsocket3.rst": [ @@ -411268,7 +411647,7 @@ [] ], "chrome.md": [ - "45293af65ef3bb0e57cd59ee4f3f44961266df07", + "aca93ea2e590c6dbfe6f56618364fbb42cba636e", [] ], "chrome_android.md": [ @@ -411288,7 +411667,7 @@ [] ], "from-local-system.md": [ - "3865038ef6877238bc372fba5c635ff438f9293b", + "f40f8e5ece9b0bc677e49ad6bb269e118c0f1eed", [] ], "from-web.md": [ @@ -411428,7 +411807,7 @@ [] ], "testdriver.md": [ - "24159e82cc8ec3b21bb929f676e944c39dcee641", + "e482452aef39a56952f1a51ff875c1d04aa66a41", [] ], "testharness-api.md": [ @@ -414467,6 +414846,30 @@ "afe7b4f317dfacad8c25661dbe4dd2bf07b5b86e", [] ], + "config-cross-origin-apis-inner.https.html": [ + "79e9affe996cadc0b881464da752d99b4526aafb", + [] + ], + "config-cross-origin-apis-inner.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "config-cross-origin-iframe.https.html": [ + "b6e390a583d99d45920e80f22837802e16536b54", + [] + ], + "config-cross-origin-iframe.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], + "config-embed-cross-origin-iframe.https.html": [ + "f21afee011aa08d2b9195480551d79698d22430c", + [] + ], + "config-embed-cross-origin-iframe.https.html.headers": [ + "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", + [] + ], "content-index-sw.js": [ "c2759d9630ea309b7ab2df65691df339a75c2d62", [] @@ -414547,11 +414950,11 @@ "821ebf69e367b2cd95edf2e736fc4d44008442d4", [] ], - "default-enabled-features-redirect.https.html": [ - "000b1eb6dd712f480054a3055b7bb4badc4741ad", + "default-enabled-features-navigate.https.html": [ + "6bfb033400ed4651b8dd70a4dab4b8973a3af56d", [] ], - "default-enabled-features-redirect.https.html.headers": [ + "default-enabled-features-navigate.https.html.headers": [ "1b63235b7cdffe9ebb43bfac3a01d5220e1519fb", [] ], @@ -414696,7 +415099,7 @@ [] ], "get-nested-configs-inner.html": [ - "a83ba93aa6d14dd9d03a77f9097c376810d25c3c", + "122debfe27f41e661b3f13808e6b1a3157a28281", [] ], "get-nested-configs-inner.html.headers": [ @@ -418153,7 +418556,7 @@ [] ], "rc-helper.js": [ - "53bcdccf7c65b0b33cd7150c20e461325a8b6a10", + "cb73f52e15b0c27e7f7dacb9415d158e14291af0", [] ], "service-worker.js": [ @@ -420068,7 +420471,7 @@ [] ], "window-name.sub.html": [ - "55fb8ebbbc5957cbabf7ce57ba9c6e818cced034", + "5bb8ebda8f85134ac2dd02fc5862e49ec7c76b8d", [] ], "window-opener.html": [ @@ -421857,19 +422260,19 @@ [] ], "gentest.py": [ - "bca7b9ecfcb72dccec216b5435f9071f47fde0be", + "6574ff53238375b9018a8c307572efadf9259fd9", [] ], "gentest_union.py": [ - "62c1cde6a1154bcc0908e21442b7ee6735123736", + "bde7c1bc061d431cde3cc09122989760f13a9b04", [] ], "gentestutils.py": [ - "27412e40df5f523e78cde28cc1c32b8b82047c3e", + "8fa33e3975c821ce085aaf09d8b5af6e4a9b764e", [] ], "gentestutilsunion.py": [ - "bf5fdeee506055248a5b94fcad4d036ee697f11a", + "cf154c41894bd9c0863ccf7d3619efc74e5e3871", [] ], "name2dir-canvas.yaml": [ @@ -421884,12 +422287,38 @@ "d6871f285298ee7051634a3404ce3bb67c8546a2", [] ], - "templates-new.yaml": [ - "7d8ebfccf565a293138aecc3eaecc54d0176c573", - [] - ], + "templates": { + "reftest.html": [ + "8f98e1648459bd6470f69705df7ed0b8fd9b0b18", + [] + ], + "reftest_element.html": [ + "25445af6a4f59bed783587428db3d95e41acc241", + [] + ], + "reftest_offscreen.html": [ + "4d8b7c9de548a1edc127af36b9085db1874dc9ae", + [] + ], + "reftest_worker.html": [ + "7ce9ca5b15962b2ac242d2c674946837cabcd8a5", + [] + ], + "testharness_element.html": [ + "521fece50c4364a9ce74d83c4194e82c050628dc", + [] + ], + "testharness_offscreen.html": [ + "a6de83c41954e8e7906ad20c06c94f485d32ae55", + [] + ], + "testharness_worker.js": [ + "b6575b95a67b0efd71be46f9315da36c2f89399c", + [] + ] + }, "templates.yaml": [ - "cb11f76db623c13993835a104eee3a58a0762218", + "0806872cbd1d8edeed8eda21a7c4fc440c8a79ba", [] ], "yaml": { @@ -421952,11 +422381,11 @@ }, "yaml-new": { "color_space.yaml": [ - "ba5d93e0b02bcf72d4233b61b5b0093fadf4a301", + "39556caf0a4bd5c2fa64b888f4a4b0d08b300ace", [] ], "compositing.yaml": [ - "0051f07db23132b0c2ad174dd1ae5918bf9110d6", + "bd7fae1d62911835a74cb3315b708bff89ff9562", [] ], "conformance_requirements.yaml": [ @@ -421964,7 +422393,7 @@ [] ], "drawing-images-to-the-canvas.yaml": [ - "e1837342e6a54d8a88b82af2982edb962d805575", + "91b92b0092fc9de2d6729215aa192aef6aca07dc", [] ], "drawing-rectangles-to-the-canvas.yaml": [ @@ -421972,11 +422401,11 @@ [] ], "filters.yaml": [ - "dd84f913f9ba04480759b9f2010006e97902f13d", + "9a90bed24820b7f3aad7f214641f441c2ed78ea1", [] ], "layers.yaml": [ - "fe1902c61b7548a33e8b6d39c35c0c4ce270e85c", + "e0d2b3d793b80d70eb31973820ab1564f99e83e3", [] ], "line-styles.yaml": [ @@ -421988,7 +422417,7 @@ [] ], "pixel-manipulation.yaml": [ - "b9bdf3d2bdb5ca065b7bf58e35c30c09e8ac9405", + "0643b047b173f1ea31b87af2c11496618a070380", [] ], "reset.yaml": [ @@ -427181,6 +427610,10 @@ "c8d6a20726fd84900f192b34206954eeec57f61d", [] ], + "table-bordercolor-001-ref.html": [ + "1b128e617151ec2e33e7b504249b3e3a9ef705bc", + [] + ], "table-cell-nowrap-with-fixed-width-ref.html": [ "5b2ea91fe5fa635c221adc8801605f3b14fb66c7", [] @@ -433428,6 +433861,10 @@ "f4c01cfa0f6964b867ddace2c6b4a1c80b081053", [] ], + "README.md": [ + "6491564709fb35a82ab0e2d10592db28b19ebf25", + [] + ], "anim-gr.gif": [ "45263e0afba7b708417510df24cadf70d82d9116", [] @@ -433566,6 +434003,38 @@ "b8c7189d628b7bf761f884bb747ae617595bf235", [] ], + "lcp-100x50-alt.png": [ + "2fdd47cb6d1fafde8ee7ed66cb9b9646b7628d87", + [] + ], + "lcp-100x50.png": [ + "0e4722139e365b5cf31ba2e854bceabd3ea270f5", + [] + ], + "lcp-133x106.png": [ + "fb61e8db851e3e41d57efb57cc0c5c6c0fe16efc", + [] + ], + "lcp-16x16.png": [ + "f8ca4fae684a81b1677e354fa98720c6e0b24c86", + [] + ], + "lcp-1x1.png": [ + "82863b859ac841c8886dabdc92d957e7e2fd5290", + [] + ], + "lcp-256x256.png": [ + "944f10f87611dbc623691a304a32f630da426486", + [] + ], + "lcp-2x2.png": [ + "5b628e0734c1e7a3a9b414850237e658aafdb9c1", + [] + ], + "lcp-96x96.png": [ + "66464b77575e882aaf79edba88c3e6fc507e3625", + [] + ], "movie_300_frame_0.png": [ "b712825093805d1052b01047b1dbb102f0af8f0f", [] @@ -434846,8 +435315,12 @@ "38cedac40cddc71ea754df7171d68018d1a0854b", [] ], + "document-picture-in-picture.idl": [ + "742f65e6f06b309521bdc8ebbe213bd6605c9eb3", + [] + ], "dom.idl": [ - "c5b5c94dbccac17f1e2ee51a20cabaded63e34b6", + "c2def872fa23ebb281fd6eadf2d37f975fa6bc30", [] ], "edit-context.idl": [ @@ -434879,7 +435352,7 @@ [] ], "fenced-frame.idl": [ - "6b0734d1f7be28a29ab26b8ca6a17fe623fa249c", + "440ec2bbaa10604d6cfa982242ce6fdb40b530c6", [] ], "fetch.idl": [ @@ -435099,7 +435572,7 @@ [] ], "notifications.idl": [ - "bfcfa2e66afb96f4d356067b1ceb750387418f59", + "4300b1710714e4c3f3df6dce4247d112d7c3ede8", [] ], "orientation-event.idl": [ @@ -435143,7 +435616,7 @@ [] ], "permissions-policy.idl": [ - "a789d41738c157a92ee96d9b56269f5e6f1fd657", + "16945e3a9b7cded5610d9d2e2cb53acbb8d6b831", [] ], "permissions-request.idl": [ @@ -435231,7 +435704,7 @@ [] ], "resource-timing.idl": [ - "aa17003493eb2bd32dc1be241aa88323cb1889c5", + "33fed05b75683891047785f7521b7a250086c645", [] ], "sanitizer-api.idl": [ @@ -435247,7 +435720,7 @@ [] ], "scheduling-apis.idl": [ - "9ed49cfb689eb353156dac0e38025f4ab17186ca", + "1e84e79cd1503946088888d02a5da45d5af7c5fe", [] ], "screen-capture.idl": [ @@ -435439,7 +435912,7 @@ [] ], "webauthn.idl": [ - "c7f72eacfd079e1555c355c4648692787ab1a3c6", + "9a37207ba2cbc0c1e6c48c9a325156f959919177", [] ], "webcodecs-aac-codec-registration.idl": [ @@ -435491,7 +435964,7 @@ [] ], "webgpu.idl": [ - "34f78a1d8cd52b59eff807de7ab383afda60d53d", + "25943d99c35b57bee2d5cc70d249a190e59207f3", [] ], "webhid.idl": [ @@ -435507,7 +435980,7 @@ [] ], "webnn.idl": [ - "d2b973a624b46f86299ad65d05e515e3d3c4b773", + "17e30803b886c88339a755a60e4c1ab001c3f8a4", [] ], "webrtc-encoded-transform.idl": [ @@ -435527,7 +436000,7 @@ [] ], "webrtc-stats.idl": [ - "a5fb3294b7e64b56b0afec24ab25112ab3cac4cd", + "b398c73e3f414bf3b35281fae3910bf4569d60ac", [] ], "webrtc-svc.idl": [ @@ -435535,7 +436008,7 @@ [] ], "webrtc.idl": [ - "578cbe92974fd711f1d96154ed6b6f3bef5c6cdb", + "4c31d3be67aa9db5fa3094b7aa015854b4ac147c", [] ], "websockets.idl": [ @@ -435543,7 +436016,7 @@ [] ], "webtransport.idl": [ - "2bea483e1b91f78569d80c706c20f95bd44978ac", + "a9f514e2366e1ea2200989aef84abe612596f369", [] ], "webusb.idl": [ @@ -435836,7 +436309,7 @@ [] ], "mouseover-utils.js": [ - "1836f2e4ad2ae3b169ffc59abc1b7955f91fb255", + "60a29ed04e5d3c67909f8154f4fe08829f9548c9", [] ], "slow-style-change.py": [ @@ -435906,7 +436379,7 @@ ] }, "lint.ignore": [ - "1672f3b52e7a09b0e98ff6bd14c1ca6a9a5ab160", + "4e52e323fd9e43652b3a1547857801de3fe6b5f6", [] ], "loading": { @@ -442891,7 +443364,7 @@ [] ], "testdriver.js": [ - "446b033b0a4880759ca4b4aad38b33c7ca600cf1", + "e582477da9ba9785a714c77fd2d302b9450c1398", [] ], "testdriver.js.headers": [ @@ -443047,6 +443520,10 @@ "7e375a1df7f063ba6cdbbdad92beb73915b84d6e", [] ], + "deferred-timeline-composited-ref.html": [ + "088e93750afb9b502ae4183632b4b3a739b2887f", + [] + ], "printing": { "animation-timeline-none-with-progress-ref.html": [ "09bcba2fd4d94085fab9dd5cd453aee7ffd259d0", @@ -443120,7 +443597,7 @@ }, "view-timelines": { "testcommon.js": [ - "65301215c4732720f578140b32b6207a7325f400", + "a798fe918ddc46781ad59d53e44f17cc5812bdf9", [] ] } @@ -446256,7 +446733,7 @@ [] ], "util.js": [ - "838885a56570fca26e08e168b8a078928e131b62", + "2ad668c85a108064840519c703c9a8a8ebfb98cb", [] ] }, @@ -448564,7 +449041,7 @@ [] ], "requirements_tc.txt": [ - "9ab88012762a02398a80f8a5e4cb77c50f382450", + "59a0000a0e4616898740075256467bc861620dbf", [] ], "run_tc.py": [ @@ -448606,7 +449083,7 @@ ], "tasks": { "test.yml": [ - "9526a8b8fa8e550d73b602274800e1592210fa0f", + "35dbbb1cb6456077b4b834ea449c611e337576b6", [] ] }, @@ -448676,7 +449153,7 @@ [] ], "Dockerfile": [ - "73db14699945f20dcf1aeee18ae323905c536e32", + "5fd75c5fc3e6adff2200d4b6c67e5c4b89f0f78c", [] ], "README.md": [ @@ -448696,7 +449173,7 @@ [] ], "requirements.txt": [ - "fee00749e854e4f0e04306f8c6638f76d355572d", + "88b70f37a0dd43764086632d468d351350b28973", [] ], "retry.py": [ @@ -449075,15 +449552,15 @@ [] ], "requirements_mypy.txt": [ - "b027108a81f322214d5ee99f2181733ab6f92426", + "19a81dd3a5ca01d3e5fc4cabef73b5911720882f", [] ], "requirements_pytest.txt": [ - "afab5448312a17b47920b9dbb1d18858dc525e0b", + "6dc497515bc452414df067fef55c72ac8f8b76fd", [] ], "requirements_tests.txt": [ - "ed41215bcc1bc16b3221dd80cfbe66e2521efe69", + "614aa3e8625b4543f64daa2d02d3bef225b4a489", [] ], "runner": { @@ -457004,7 +457481,7 @@ [] ], "error.py": [ - "6a02e65ba5a88eb65e6aca6696ed4f5369910e99", + "21c9f720a8eb3c004fcb9148b3f151057995279e", [] ], "modules": { @@ -457021,7 +457498,7 @@ [] ], "input.py": [ - "5240bbb584306338eb26beeebd1af897961c359e", + "0670d1ebab48a207a40febb7f0667922cc042bbd", [] ], "script.py": [ @@ -457051,7 +457528,7 @@ [] ], "transport.py": [ - "47d0659196c75a8fa80793ece30b8f21b427b9fd", + "774c1c56686f7f5609ffbeeb49424d7a8c7d1e14", [] ] } @@ -457106,7 +457583,7 @@ [] ], "browser.py": [ - "e40739e4b74cff467d764ecaa27cd10024fd4167", + "5e8bfdab160137cab305c8f124195724deddc069", [] ], "commands.json": [ @@ -457130,7 +457607,7 @@ [] ], "requirements.txt": [ - "becc27ff2e02f26b19133cd3224759d1e8578b79", + "2c24336eb3167f69afa069e02a2e44f55162039d", [] ], "requirements_install.txt": [ @@ -457254,7 +457731,7 @@ [] ], "virtualenv.py": [ - "59f422a6ef54f3199e3a0f0ad070f740371aa579", + "87f5d4281fe528c0d840f56e05f21bbc7d320402", [] ], "wpt.py": [ @@ -457298,7 +457775,7 @@ ] }, "requirements.txt": [ - "28be0b3c6e10e5881bc6acfe700d17f514167979", + "3e5467a5f45b11842c5224d31982a38c5a610957", [] ], "requirements_chromium.txt": [ @@ -457326,7 +457803,7 @@ [] ], "requirements_sauce.txt": [ - "f7f06f366c4a32d2e2c3238cabd6d717ca668602", + "abc64ec5085debc16a33c92549dd26d42fa5fd48", [] ], "setup.py": [ @@ -457468,7 +457945,7 @@ [] ], "actions.py": [ - "6a4a0b889e4ce082af7ea398b7b0f8242783ca99", + "f3fe970484e57d596a04cb11eb7ff6e20a5ad382", [] ], "base.py": [ @@ -457500,7 +457977,7 @@ [] ], "executorwebdriver.py": [ - "9a771f11c6ca9db2b1641af20cfdd9c9525477f5", + "46b98d4df13c9f1ca5c8436ce8899387f0a2d026", [] ], "executorwktr.py": [ @@ -457512,7 +457989,7 @@ [] ], "protocol.py": [ - "4cef0134027b31532434a12c1b9e4f1a4006ad2f", + "170c27cd687d62cfb15014794e37768cc694a16b", [] ], "pytestrunner": { @@ -457619,7 +458096,7 @@ [] ], "products.py": [ - "0706a2b5c86930379cc200da39432f88874f8dfb", + "5b26557aa1724506c06cb973cb75faec031b4271", [] ], "stability.py": [ @@ -457627,7 +458104,7 @@ [] ], "testdriver-extra.js": [ - "716da040bbc508e2c1880c4ee64b8afdae526ea1", + "b5cc9cdbbbf176f6fc97e29a479d70f45b500004", [] ], "testdriver-vendor.js": [ @@ -457663,7 +458140,7 @@ [] ], "testrunner.py": [ - "30b51366c26cb08d385324c187cdf3e64a86dc97", + "b1346d51df1fe68d8813ec926fb440b026a06e28", [] ], "tests": { @@ -457765,7 +458242,7 @@ [] ], "wptcommandline.py": [ - "1c5895eec6ea8b19274a4fc6800d87efcb2c5c09", + "1e3ae7a0615727c9ea5dca5e4a10f5d9a7a3319d", [] ], "wptlogging.py": [ @@ -457835,7 +458312,7 @@ } }, "wptrunner.py": [ - "987cf058cca281d49b90a740177990994818628a", + "687a9d46c8e21601e603901803af1ab77ce79547", [] ], "wpttest.py": [ @@ -459014,7 +459491,7 @@ [] ], "urltestdata.json": [ - "58f6b87a8624bf024bef48fa16b21cbbb755aa5c", + "1aa42a514555dfa6c1007a2fa0b309fc3cc8b0ac", [] ] }, @@ -459561,7 +460038,7 @@ "animation-model": { "animation-types": { "property-list.js": [ - "b41ca90eef447e4fe02544c29fe004fa88a3490c", + "bb75ab5f7ad0e92c9cccb9baec16dc839e80a3b5", [] ], "property-types.js": [ @@ -459627,7 +460104,7 @@ ] }, "testcommon.js": [ - "0b318714a51662111486235c717a0aeff6d94c9d", + "8597ca28df9a6cc9c17fe21b40eab000bf606b05", [] ], "timing-model": { @@ -460773,7 +461250,7 @@ }, "webdriver": { "META.yml": [ - "8475a173abd14ea94ef2cc70c4c07804a450af9b", + "806ba3dec3c480b0584aa05bfbbdda62d4dcea74", [] ], "README.md": [ @@ -460785,28 +461262,6 @@ "0ba172ff2e2734e5cbf324e816867be0a26b278e", [] ], - "accept_alert": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "add_cookie": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "back": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "conftest.py": [ - "bd5db0cfeba7bbc8aaf23c3151109cf48094ff09", - [] - ] - }, "bidi": { "__init__.py": [ "625cd3a6304c4d7d9118aa8071b66aaa970d9182", @@ -460950,7 +461405,7 @@ }, "network": { "__init__.py": [ - "ea7472cfd3d7b7368e051ab7592c3774b80b8a40", + "70f4eb2712f2dbd7e8fad8702286f81b5a01ba16", [] ], "before_request_sent": { @@ -461101,396 +461556,450 @@ } } }, - "close_window": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "conftest.py": [ - "fe9f5cd268240662d0d7a6753e58a7fbedecad4e", - [] - ], - "delete_all_cookies": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "delete_cookie": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "delete_session": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "dismiss_alert": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "element_clear": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "element_click": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "support": { - "input.html": [ - "e2c6dadd1218e0a7d8b7d243a1c49b7f47092d77", + "classic": { + "accept_alert": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "add_cookie": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "back": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], - "test_click_wdspec.html": [ - "a9451ec82bec97654896f697704218bb6068d14e", + "conftest.py": [ + "bd5db0cfeba7bbc8aaf23c3151109cf48094ff09", [] ] - } - }, - "element_send_keys": { - "__init__.py": [ - "a7facf6fcf70309251757e3fb90b89255e13133f", - [] - ], - "conftest.py": [ - "17bdd162a772bb0a5a4d14a2c2627a25ded9eca3", - [] - ] - }, - "execute_async_script": { - "__init__.py": [ - "9cd37ecdca13921d71b70c9ce335e93fc0e0d799", - [] - ] - }, - "execute_script": { - "__init__.py": [ - "1ab36eb054143df81bd41140f844916d9e2949c1", - [] - ] - }, - "find_element": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "find_element_from_element": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "find_element_from_shadow_root": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "find_elements": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "find_elements_from_element": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "find_elements_from_shadow_root": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "forward": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "conftest.py": [ - "bd5db0cfeba7bbc8aaf23c3151109cf48094ff09", - [] - ] - }, - "fullscreen_window": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_active_element": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_alert_text": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_computed_label": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_computed_role": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_current_url": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_element_attribute": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_element_css_value": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_element_property": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_element_rect": { - "__init__.py": [ - "8b137891791fe96927ad78e64b0aad7bded08bdc", - [] - ] - }, - "get_element_shadow_root": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_element_tag_name": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_element_text": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_named_cookie": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_page_source": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_timeouts": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_title": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_window_handle": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_window_handles": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "get_window_rect": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "is_element_enabled": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "is_element_selected": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "maximize_window": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "minimize_window": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "navigate_to": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "new_session": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "conftest.py": [ - "d67fdba449dea79fb5113b39f795d874a53ffc40", - [] - ], - "support": { + }, + "close_window": { "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] + ] + }, + "delete_all_cookies": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "delete_cookie": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "delete_session": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "dismiss_alert": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "element_clear": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "element_click": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "support": { + "input.html": [ + "e2c6dadd1218e0a7d8b7d243a1c49b7f47092d77", + [] + ], + "test_click_wdspec.html": [ + "a9451ec82bec97654896f697704218bb6068d14e", + [] + ] + } + }, + "element_send_keys": { + "__init__.py": [ + "a7facf6fcf70309251757e3fb90b89255e13133f", + [] ], - "create.py": [ - "a0d0ce37b57d396621729c2966748514039e84ad", + "conftest.py": [ + "17bdd162a772bb0a5a4d14a2c2627a25ded9eca3", [] ] - } - }, - "new_window": { - "__init__.py": [ - "e16014597cf88f465e910358c27f72381292bd6d", - [] - ] - }, - "perform_actions": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "conftest.py": [ - "0694cce494f25df68c4def8aec170586adb0f7d4", - [] - ], - "support": { + }, + "execute_async_script": { + "__init__.py": [ + "9cd37ecdca13921d71b70c9ce335e93fc0e0d799", + [] + ] + }, + "execute_script": { + "__init__.py": [ + "1ab36eb054143df81bd41140f844916d9e2949c1", + [] + ] + }, + "find_element": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "find_element_from_element": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "find_element_from_shadow_root": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "find_elements": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "find_elements_from_element": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "find_elements_from_shadow_root": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "forward": { "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], - "mouse.py": [ - "b3672eb213af68a9e4d9f931ca6499723a1a5019", + "conftest.py": [ + "bd5db0cfeba7bbc8aaf23c3151109cf48094ff09", + [] + ] + }, + "fullscreen_window": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_active_element": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_alert_text": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_computed_label": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_computed_role": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_current_url": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_element_attribute": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_element_css_value": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_element_property": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_element_rect": { + "__init__.py": [ + "8b137891791fe96927ad78e64b0aad7bded08bdc", + [] + ] + }, + "get_element_shadow_root": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_element_tag_name": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_element_text": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_named_cookie": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_page_source": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_timeouts": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_title": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_window_handle": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_window_handles": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "get_window_rect": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "is_element_enabled": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "is_element_selected": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "maximize_window": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "minimize_window": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "navigate_to": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "new_session": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], - "refine.py": [ - "35c962b9ecbfa21c61535683c094e17884770e9f", + "conftest.py": [ + "d67fdba449dea79fb5113b39f795d874a53ffc40", + [] + ], + "support": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "create.py": [ + "a0d0ce37b57d396621729c2966748514039e84ad", + [] + ] + } + }, + "new_window": { + "__init__.py": [ + "e16014597cf88f465e910358c27f72381292bd6d", [] ] - } - }, - "permissions": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "print": { - "__init__.py": [ - "eb9a890cc45592c0566b0004440225d162332687", - [] - ] - }, - "refresh": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "release_actions": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "conftest.py": [ - "8275efc23b70de3f06eb9d081d4fa2d3c13d7fc5", - [] - ], - "support": { + }, + "perform_actions": { "__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], - "refine.py": [ - "d40520974938b1dd226021be40a79e1661860249", + "conftest.py": [ + "0694cce494f25df68c4def8aec170586adb0f7d4", + [] + ], + "support": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "mouse.py": [ + "b3672eb213af68a9e4d9f931ca6499723a1a5019", + [] + ], + "refine.py": [ + "35c962b9ecbfa21c61535683c094e17884770e9f", + [] + ] + } + }, + "permissions": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "print": { + "__init__.py": [ + "eb9a890cc45592c0566b0004440225d162332687", + [] + ] + }, + "refresh": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "release_actions": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "conftest.py": [ + "8275efc23b70de3f06eb9d081d4fa2d3c13d7fc5", + [] + ], + "support": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "refine.py": [ + "d40520974938b1dd226021be40a79e1661860249", + [] + ] + } + }, + "send_alert_text": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], + "conftest.py": [ + "b080761bde881d236aed87dbfcd03963051ba443", + [] + ] + }, + "set_timeouts": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "set_window_rect": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "status": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "switch_to_frame": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "switch_to_parent_frame": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "switch_to_window": { + "__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ] + }, + "take_element_screenshot": { + "__init__.py": [ + "9a82cc48eab7993dcd6588d89b5aae9ed4ebfc82", + [] + ] + }, + "take_screenshot": { + "__init__.py": [ + "f3001d946df56e58c4e3fa1319db12bf29f3e341", [] ] } }, - "send_alert_text": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "conftest.py": [ - "b080761bde881d236aed87dbfcd03963051ba443", - [] - ] - }, - "set_timeouts": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "set_window_rect": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "status": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, + "conftest.py": [ + "fe9f5cd268240662d0d7a6753e58a7fbedecad4e", + [] + ], "support": { "__init__.py": [ "a7b33cc15f4652b9fec16cf202d0801e053beb55", @@ -461620,36 +462129,6 @@ "015ebd37a0966860a452a6f69420ba6787b4877e", [] ] - }, - "switch_to_frame": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "switch_to_parent_frame": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "switch_to_window": { - "__init__.py": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ] - }, - "take_element_screenshot": { - "__init__.py": [ - "9a82cc48eab7993dcd6588d89b5aae9ed4ebfc82", - [] - ] - }, - "take_screenshot": { - "__init__.py": [ - "f3001d946df56e58c4e3fa1319db12bf29f3e341", - [] - ] } } }, @@ -462144,7 +462623,7 @@ }, "simulcast": { "simulcast.js": [ - "4682729233b28687c8e290219d1963294fa70993", + "3aa0fc42870a9d5c99ba0bdb261c6e776ad71f95", [] ] }, @@ -462253,7 +462732,7 @@ [] ], "RTCRtpSynchronizationSource-helper.js": [ - "10cfd651554a259817cd34521ab44556063f4f44", + "c8a3e45aae9ff952215d68a4a2b5cfdfc6278e4f", [] ], "transfer-datachannel-service-worker.js": [ @@ -480824,7 +481303,7 @@ ] ], "enumerateDevices-with-selectAudioOutput.https.html": [ - "51da44286a760b1f6df84d7cfdb24f6dbdf6f6a9", + "c1a825592a6030fb76c7b5cbd765973ecb1eb49c", [ null, { @@ -484610,7 +485089,7 @@ ] ], "max-length-exceeded-name-unicode.https.window.js": [ - "23de63d293f667db98533ae8533ee3c5df57205f", + "3458c92b65efa8314a2af6ab00c7084d469a103b", [ "bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-name-unicode.https.window.html", { @@ -484662,7 +485141,7 @@ ] ], "max-length-exceeded-namePrefix-unicode.https.window.js": [ - "aa832b2e764d5f897cf5d6114efa6c62ce630993", + "b2e6668e4b98a9a0e8a23803327a890f86e593ca", [ "bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-namePrefix-unicode.https.window.html", { @@ -484714,7 +485193,7 @@ ] ], "max-length-name-unicode.https.window.js": [ - "1232a030e9d52435d0b96923484228b9a2fc4fcc", + "6a3cf5bead0eefd561064785f3289797cb0a01e3", [ "bluetooth/requestDevice/canonicalizeFilter/max-length-name-unicode.https.window.html", { @@ -484766,7 +485245,7 @@ ] ], "max-length-namePrefix-unicode.https.window.js": [ - "2932dc1cde5c9b78191f04da5787c4c3fbf67b7b", + "2061e9863b4026024a4170fb9794f42692cba0f7", [ "bluetooth/requestDevice/canonicalizeFilter/max-length-namePrefix-unicode.https.window.html", { @@ -488020,21 +488499,21 @@ }, "browsing-topics": { "browsing-topics-permissions-policy-default.tentative.https.sub.html": [ - "884ad9276a1d087684d06ed1b03bbdc57d3f7d8c", + "8467ab656919e95c8d3b31e352c28a6aa5117740", [ null, {} ] ], "browsing-topics-permissions-policy-none.tentative.https.sub.html": [ - "2f80daa27142c6a2ccd7b0e33005a4659180bf1b", + "23bac4381f0956824775403b8cfe1717e42c4123", [ null, {} ] ], "browsing-topics-permissions-policy-self.tentative.https.sub.html": [ - "601266794797ebf8b7a7bdacfd3b3c5cb1c92f2c", + "91ee4f05f3a64b5f990f66481d77f0087c4e2a32", [ null, {} @@ -488069,7 +488548,7 @@ ] ], "fetch-topics.tentative.https.html": [ - "e5dd1d9b98688637ce96230a10aaa9a66212eaf6", + "c33d4dd11d8788ec3dd584e6b8c83befbd8ce011", [ null, {} @@ -488083,14 +488562,14 @@ ] ], "iframe-topics-attribute-insecure-context.tentative.http.sub.html": [ - "19c79e0d7f001b592a93214ee89dcdf15afbe5dc", + "8e25b769cecedbda90d1b250ec62901bf9639711", [ null, {} ] ], "iframe-topics-attribute.tentative.https.html": [ - "b90f967146ce49235d216ef7a18056b1b282d263", + "7b3b6c70450dfb83cb07b6c36443de63d474da2b", [ null, {} @@ -488111,7 +488590,7 @@ ] ], "xhr-topics.tentative.https.html": [ - "532a0404240593173a79b0d1009bacc1d85ff02d", + "fcca74a1ce5888bb2930c4001733588cef6c4f30", [ null, {} @@ -490006,6 +490485,105 @@ } ] ], + "compression-large-flush-output.any.js": [ + "c7455807fb2b2acc6d74d2ebf9540a81cf09647c", + [ + "compression/compression-large-flush-output.any.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "third_party/pako/pako_inflate.min.js" + ], + [ + "script", + "resources/concatenate-stream.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "compression/compression-large-flush-output.any.serviceworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "third_party/pako/pako_inflate.min.js" + ], + [ + "script", + "resources/concatenate-stream.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "compression/compression-large-flush-output.any.sharedworker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "third_party/pako/pako_inflate.min.js" + ], + [ + "script", + "resources/concatenate-stream.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "compression/compression-large-flush-output.any.worker.html", + { + "script_metadata": [ + [ + "global", + "window,worker" + ], + [ + "script", + "third_party/pako/pako_inflate.min.js" + ], + [ + "script", + "resources/concatenate-stream.js" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ] + ], "compression-multiple-chunks.tentative.any.js": [ "f43f13b5411033e53884017d7de70608017be854", [ @@ -500389,6 +500967,13 @@ {} ] ], + "credentialscontainer-prevent-silent-access.https.html": [ + "5a83e556a738594d47b12b54521806648ed26262", + [ + null, + {} + ] + ], "fedcm-cross-origin-policy.https.html": [ "808b7f6ea775d10e26dfbd48169a3464d87e89b6", [ @@ -500504,7 +501089,7 @@ ] }, "fedcm-network-requests.https.html": [ - "73d83de9119ef34dae2a1b2b864cf876f9e8cbaa", + "62c0791ab48e6ef91ea011531f2f413e50112c2a", [ null, {} @@ -501120,7 +501705,7 @@ ] ], "justify-no-interpolation.html": [ - "a242fb73e901d2a2bc933b9cf0b6a57afef70090", + "b72ccdc435513d93750d3c690ecb4ba2e9a6cf8b", [ null, {} @@ -501996,7 +502581,7 @@ ] ], "anchor-getComputedStyle.html": [ - "cce571c4d0d395073449981dceb1aaffe071c3ea", + "6d77cf9a9d4cc34f5b2c787502f0d7753ff41c94", [ null, {} @@ -502324,6 +502909,20 @@ {} ] ], + "anchor-scroll-003.html": [ + "87d8153e7e37d845196dc0c3b6d58e92abf95a56", + [ + null, + {} + ] + ], + "anchor-scroll-004.html": [ + "ce66a27422cac8f15eb1715c1f941d28703accfd", + [ + null, + {} + ] + ], "anchor-scroll-basics.html": [ "6b2d96708bd44808f0cb7ce10a1b52e708e09eba", [ @@ -502408,7 +503007,7 @@ {} ] ], - "anchor-scroll-js-expose.tentative.html": [ + "anchor-scroll-js-expose.html": [ "f19d010d35931bba86d39988d3f0d4db385cbd8b", [ null, @@ -502458,21 +503057,21 @@ ] ], "anchor-transition-001.html": [ - "b5849510e838b47fd5ddcf30489842e755225d5b", + "e69a38820518289b769864fd6c85b30c0df3ce12", [ null, {} ] ], "anchor-transition-002.html": [ - "b6a1ff4511ac9ddfb20a531086137741b137b36b", + "b0fddc4943a8665ead1ea5844774b77735e27486", [ null, {} ] ], "anchor-transition-003.html": [ - "e7441275141176078e14fc16aadf134bf9b65a37", + "e7624575da56a47983f1a3aa17de3fb89a0e057f", [ null, {} @@ -502756,14 +503355,14 @@ ] ], "animation-composition-keyframes.html": [ - "86a27a2b526a1ff28a77927177b2eb648c7d8d56", + "7051186f8b265452e5a74d4ca4cbc9b8c4d88d52", [ null, {} ] ], "animation-composition.html": [ - "48e757c59818d317762c3ed4d9308fc5c0707785", + "c46d55a877eb22f580e329d65a08294e6772138f", [ null, {} @@ -503567,6 +504166,13 @@ {} ] ], + "background-image-cors-no-reload.html": [ + "964ca0919c9dfbcbce95c8eb1e4b7a239e429bfd", + [ + null, + {} + ] + ], "background-origin-001.html": [ "a951bdd370a0127270a873b3c9fb8f26755216cf", [ @@ -504236,21 +504842,21 @@ "margin-trim": { "computed-margin-values": { "block-container-block-end-nested-child.html": [ - "2d36e75c2637d96428fbce5df86a8351f3d63a34", + "8a3b03c2e502c1f92ba43ac49ae0f4a304f60538", [ null, {} ] ], "block-container-block-end-with-self-collapsing-children.html": [ - "d03c2fe1422d55345839fb513b2c57c8d000533f", + "26d46628effdf6bcfcef7191a2f01d6623940606", [ null, {} ] ], "block-container-block-end.html": [ - "dcf8ba6fe2ef54dde882709b0304b371ad872cc1", + "6cd0cce2634d5d966d2f73277ad967afc2c6840a", [ null, {} @@ -504418,35 +505024,35 @@ ] ], "grid-block-end-column-auto-flow.html": [ - "c491301c8a6eaf987f60192d43c85ad85e7f296e", + "f49f036a639b993b539e7e598d6d4aadc401c399", [ null, {} ] ], "grid-block-end-item-spans-multiple-rows.html": [ - "4ae597760b3228673e84912574ba830227d5ed9c", + "d44085ed8a47bf70af5f81c3be7b16618fdca473", [ null, {} ] ], "grid-block-end.html": [ - "a0143364aab48c43c2cb8d9138b8976cf604f9d0", + "a7d5f44f377d18ecd7b18084daf09ad60f2ce098", [ null, {} ] ], "grid-inline-start-item-negative-span.html": [ - "4dc553e15b2c679fdf7de9d3144d1d2b34149733", + "80b97e9cd0d10526c713e58887733e51bad62ffb", [ null, {} ] ], "grid-inline-start.html": [ - "7d4157acfed5d1592b0bb80d29dd42eeb46187ea", + "380090f3a9f0de6f491229b6d52814021dd1da5e", [ null, {} @@ -505631,7 +506237,7 @@ ] ], "color-valid-color-mix-function.html": [ - "659117a23b0ddd073d7f8a243e4f2dd86a7e4bff", + "1df42804996f3e23daf5bec7752a31e2b7ae1ec8", [ null, {} @@ -505726,14 +506332,14 @@ "css-color-adjust": { "animation": { "color-scheme-no-interpolation.html": [ - "306b4b3da1241b724573bb7d968c664598534210", + "c2f7f91b68a9a2bda6d6fbd3b583bb19bb9120c1", [ null, {} ] ], "forced-color-adjust-no-interpolation.html": [ - "bcd2bdf223a98cb9635af1fa2059bb35594b7f5e", + "3e1fcc22b977f54e0895b28257da6721003aadfd", [ null, {} @@ -506474,6 +507080,13 @@ {} ] ], + "nested-size-style-container-invalidation.html": [ + "8d04bf589a2e03e2f89b69c69f0d5d3a38a2872f", + [ + null, + {} + ] + ], "never-match-container.html": [ "9d5ff6d2272c809cd2b95aeedb3b86896c469e37", [ @@ -506607,6 +507220,13 @@ {} ] ], + "style-container-invalidation-inheritance.html": [ + "b7aef69d3e1b2a32cc64bf754a0c3fb8fe2cd08a", + [ + null, + {} + ] + ], "style-not-sharing-float.html": [ "7c76bb32bf2a5db0352ea6fcdaaae4c6247a06db", [ @@ -507822,6 +508442,118 @@ {} ] ], + "align-items-baseline-column-vert-lr-flexbox-item.html": [ + "d1a35af62f6bc8e819e198e654f9a83fd009eebc", + [ + null, + {} + ] + ], + "align-items-baseline-column-vert-lr-grid-item.html": [ + "62fae7e5659da61396e615d0a6bee30bd870a528", + [ + null, + {} + ] + ], + "align-items-baseline-column-vert-lr-items.html": [ + "4b268373d779181eb748e90ce7d68f38c914f924", + [ + null, + {} + ] + ], + "align-items-baseline-column-vert-lr-table-item.html": [ + "c19925cd8104ec250982734261889f1015bd3c7a", + [ + null, + {} + ] + ], + "align-items-baseline-column-vert-rl-flexbox-item.html": [ + "4304ebe01c48273edb2e73744cd6680f773e5347", + [ + null, + {} + ] + ], + "align-items-baseline-column-vert-rl-grid-item.html": [ + "3711a159426bca166dec4079a46b2a7abd4342c3", + [ + null, + {} + ] + ], + "align-items-baseline-column-vert-rl-items.html": [ + "14f165b8b5ff779d3352b193dd0f3a6108c23ec8", + [ + null, + {} + ] + ], + "align-items-baseline-column-vert-rl-table-item.html": [ + "0bf1ab95fd711336ffeada9429417d10f811f1d6", + [ + null, + {} + ] + ], + "align-items-baseline-vert-lr-column-horz-flexbox-item.html": [ + "14ec99809e4fe5fe273ba5846aeff850b8926a96", + [ + null, + {} + ] + ], + "align-items-baseline-vert-lr-column-horz-grid-item.html": [ + "a17c42a0328e272acf6e79bff79a6a7cb4827e67", + [ + null, + {} + ] + ], + "align-items-baseline-vert-lr-column-horz-items.html": [ + "f1194f99551580a38f23439fa10b26a5ed138e3b", + [ + null, + {} + ] + ], + "align-items-baseline-vert-lr-column-horz-table-item.html": [ + "817896cd4b63855635afdec24e03cb43322b9b3d", + [ + null, + {} + ] + ], + "align-items-baseline-vert-rl-column-horz-flexbox-item.html": [ + "249ba95f033fab901e93d1282db15ae26508efc4", + [ + null, + {} + ] + ], + "align-items-baseline-vert-rl-column-horz-grid-item.html": [ + "4efebabfb318a0c9e7db498e90994ad6f9191980", + [ + null, + {} + ] + ], + "align-items-baseline-vert-rl-column-horz-items.html": [ + "a29e2d8f6d7f2158bc1e5a5697e35eb810f2a3c3", + [ + null, + {} + ] + ], + "align-items-baseline-vert-rl-column-horz-table-item.html": [ + "bc69ad2dc2e233ea67d9881dc227bfa7fa8cb691", + [ + null, + {} + ] + ], "align-self-014.html": [ "945d9d1935f03ea8d37367757edd32f2885f8aaf", [ @@ -512934,7 +513666,7 @@ }, "animation": { "grid-no-interpolation.html": [ - "1293cdb9d5d6807f8483dd4cdc723b0d93088d74", + "33806b85860241b7a6f26519c9d4d67ed8e346e8", [ null, {} @@ -514420,7 +515152,7 @@ "css-images": { "animation": { "image-no-interpolation.html": [ - "1f9faf7fbb512e76f5c938b8ea927f44e8b053db", + "1f7f68ade2646ca746739e23412f5d8a3c127fd8", [ null, {} @@ -514489,7 +515221,7 @@ ] ], "image-set-parsing.html": [ - "2f56fcf74b446b24fdf3bc86903324338ab37b7a", + "2dad36e88179dd3ef3ab5f2e89f8297de93a77cc", [ null, {} @@ -514656,14 +515388,21 @@ "css-inline": { "animation": { "alignment-baseline-no-interpolation.html": [ - "8cbe0c98d814bdf86a6004ea82fdd6e1cbcd4120", + "8cacf54ff996022e2e26930016fd74924656f63b", [ null, {} ] ], "dominant-baseline-no-interpolation.html": [ - "7f6be5aac2bf47a1f66047ef91e5a6a4e0929fa7", + "19266dc168db52d509db017a44e9c125581c2c98", + [ + null, + {} + ] + ], + "initial-letter-no-interpolation.html": [ + "2d57ce2aa4438255f8491eb3a08d7733c3b59761", [ null, {} @@ -514758,34 +515497,27 @@ ], "initial-letter": { "initial-letter-computed.html": [ - "e46306259a7088c3637597907a4b9f6d76933717", + "eae4aad9fb98fa69fec234233bdeb17a811f63f2", [ null, {} ] ], "initial-letter-invalid.html": [ - "574a347bda88b5bf6084bbd6485131ff1a3e8ae4", + "645372c0a95faa8616291013c1b5ed5e18f2555c", [ null, {} ] ], "initial-letter-valid.html": [ - "3c1e32811d80927b0e4017bfec3f98ef55f22fee", + "b02c564504f4fcbea363c6780b27b0be2353ac68", [ null, {} ] ] }, - "initial-letter-no-interoplation.html": [ - "1efc4123ca2e983d1b9bf4ed1a2c251ea05989e8", - [ - null, - {} - ] - ], "inline-crash-chrome-001.html": [ "cfc0fdd269fd334c8c76dfd357ff984df40e3064", [ @@ -516385,7 +517117,7 @@ ] ], "column-rule-valid.html": [ - "4743988f7d5217fb07ddb37457f31902bb946cab", + "30da6380fcb09d06cedf085978db4af34e42b4a6", [ null, {} @@ -516576,7 +517308,7 @@ }, "css-overflow": { "inheritance.html": [ - "976406be413b9bdc8cef4acab0a0cd29df2dd43d", + "ffc6b2f881965883e74d53b49c2495b141724a06", [ null, {} @@ -516773,7 +517505,7 @@ ] ], "scrollbar-gutter-invalid.html": [ - "4f669225ee4e57e878d13c18b7f0a91d0468dd1d", + "e59790c32eb6767f3a2d9594434f7886f57a532b", [ null, {} @@ -517306,6 +518038,13 @@ {} ] ], + "overlay-transition.html": [ + "2d641c5466709626572072737461737128f39f61", + [ + null, + {} + ] + ], "overlay-valid.html": [ "8d808ac6dcf582628f782b2e228b261a654ba212", [ @@ -518291,7 +519030,7 @@ ] ], "at-property.html": [ - "b91b143e368ff5371bce34d9b0e43ca78ed358cf", + "95d30af15a21ed431e3960a3592909fa05f475f5", [ null, {} @@ -518591,7 +519330,7 @@ ] ], "marker-variable-computed-style.html": [ - "c50ee33ae91863704eeab8d5c7ac89d804ed7d25", + "c706edc02fc9253b2a26fdd537e7544c311d509c", [ null, {} @@ -519983,6 +520722,13 @@ {} ] ], + "scrollbar-color-parsing.html": [ + "17b649d54c8f12cb490bdd732770c95cec02273d", + [ + null, + {} + ] + ], "scrollbar-width-001.html": [ "21dfd3d1165ffeba35762a35f41014ff33042635", [ @@ -521154,7 +521900,7 @@ ] ], "height-no-interpolation.html": [ - "902fe2e22f876db4ae989033cf9a467fc239a335", + "5738ae0301122b0a10347e47ef5ce0d08ff367d8", [ null, {} @@ -521456,7 +522202,7 @@ ] ], "contain-intrinsic-size-033.html": [ - "68192a837909bbdab267ab860630d69cfb3a7ba6", + "f98a48a0a973f942a24341713ab6f89b678ca616", [ null, {} @@ -521968,6 +522714,13 @@ {} ] ], + "non-ascii-codepoints.html": [ + "c416955d4e65e87bb13da784e8d51186152b8017", + [ + null, + {} + ] + ], "serialize-consecutive-tokens.html": [ "f6e220de64bb9565cac18d6ac2e2ab17e838ce1e", [ @@ -522915,7 +523668,7 @@ "css-text": { "animations": { "hyphen-no-interpolation.html": [ - "e1e89d1772382aed394fb0217397546764a31d70", + "95a3ff5ee5639061a73b54822b098e5d323687e4", [ null, {} @@ -522936,7 +523689,7 @@ ] ], "line-break-no-interpolation.html": [ - "937b2483662f008cce6ab51fe131d6fc5f922d52", + "b6fc5f932ec0b1c1324315d66005714ac756a117", [ null, {} @@ -524368,7 +525121,7 @@ } }, "inheritance.html": [ - "c94f7c5ee28e182a615fe46309ac6e56dbb6f1e5", + "83d1d4971eaf0fe9a1982df3c930cd8545944c87", [ null, {} @@ -524464,21 +525217,21 @@ ] ], "hyphenate-limit-chars-computed.html": [ - "cf18f25ba74800327dd590cd6192552936aee06d", + "bc265c8e81ea82dba6725bc5f8d4ec44963cb394", [ null, {} ] ], "hyphenate-limit-chars-invalid.html": [ - "5a797fa8181d1ca16280067b6ed7031b2796d881", + "db68f403c111211c387cb4a98e0d56357d1f4f7d", [ null, {} ] ], "hyphenate-limit-chars-valid.html": [ - "699ddd4ab0724095b5ab7ac80aeaba906051b84d", + "2f10e33f1dec9994ed7489decd98bb3cce62248e", [ null, {} @@ -524779,14 +525532,14 @@ ] ], "white-space-shorthand-text-wrap.html": [ - "0600b8249e5c17e3feee30eebe854043c60ccb49", + "de6d9f5145d558397bea8e37caeb5a9b897723eb", [ null, {} ] ], "white-space-shorthand.html": [ - "518f81fdbf268d20e78b9f226391ecc9be46b69d", + "a7788f74ae30f930de4865aaa07d0806973394c4", [ null, {} @@ -525104,7 +525857,7 @@ ] ], "text-wrap-balance-001.html": [ - "3360681d0fc771e30730479fdf3262f4565dcd32", + "4e1829f49997aac964e3bc62ff5b514ae0882e86", [ null, {} @@ -529477,7 +530230,7 @@ ] }, "appearance-cssom-001.html": [ - "36402da51cf27dcb515ccc805eda2088f85fbd12", + "895ed2437390df435743e9d79f4359f692ab74ee", [ "css/css-ui/appearance-cssom-001.html?exclude=Invalid", {} @@ -529956,7 +530709,7 @@ ] ], "user-select-inheritance.html": [ - "38a57e0285698475fefe208cc8a71ca7d04226f3", + "28bf2abc3b2c04c88c39d1296c75fc8210adbc65", [ null, {} @@ -530009,7 +530762,7 @@ ] ], "acos-asin-atan-atan2-computed.html": [ - "dc8ecce621d69f950846219f698dbe477cb14833", + "bc547d588e74d9962d1c803d4e53d86fc573df63", [ null, {} @@ -530023,7 +530776,7 @@ ] ], "acos-asin-atan-atan2-serialize.html": [ - "c867f34d475ac4cc8e34cf0c47123421ca19cc01", + "8462fb2e5a5594c5ba7727eb28131ebb978ef5c1", [ null, {} @@ -530571,7 +531324,7 @@ ] ], "round-mod-rem-computed.html": [ - "4c365eb2a1420d40b1f74ef587409a7d261db226", + "2210f6e1fb57591974cb14cfdd1b10d6f5400068", [ null, {} @@ -532857,7 +533610,7 @@ ] ], "xml-stylesheet-pi-in-doctype.xhtml": [ - "d25ca1765617f1457b90d31451925adc9817a084", + "59911eb52c2d6f646e985e7680fa08c0b937b0b3", [ null, {} @@ -534417,7 +535170,7 @@ ] ], "dynamic-range.html": [ - "babe1b9f0d44089da93f20e307638b1264d4c702", + "75b3015b8e76298767c19dfbaf775a53c8d9b706", [ null, {} @@ -534744,7 +535497,7 @@ ] ], "offset-parsing-valid.html": [ - "3ec10a7918f4c54197801a854df8a325b878af7a", + "7a5d9c94f057f2c20baa68a246e98424967c0d14", [ null, {} @@ -535767,6 +536520,13 @@ {} ] ], + "defined-in-has.html": [ + "d691c4a53fd063e5e361cef9ae12536d32b78076", + [ + null, + {} + ] + ], "defined.html": [ "565ed552e1bf9bf56934a2fc397b0bd7769ec21d", [ @@ -535867,6 +536627,13 @@ {} ] ], + "has-with-nth-child.html": [ + "e8d7d062304e8e4f169cb732c9d620b4ab1f9fa2", + [ + null, + {} + ] + ], "has-with-pseudo-class.html": [ "4dc4c1a6a26e6bbbaf299a55b28a45e542ce672b", [ @@ -535945,7 +536712,7 @@ ] ], "media-loading-pseudo-classes-in-has.html": [ - "62b18c1e0efbee8d87919e7abc91237dc7cda939", + "07ab6083e092220b5aadad3d9e852dce071dbf59", [ null, { @@ -535954,7 +536721,7 @@ ] ], "media-pseudo-classes-in-has.html": [ - "f0df71534aef8b63743d1874c59980f82031900c", + "881ba8f30ee822250e89aff4944b9ca161e52957", [ null, {} @@ -536135,7 +536902,7 @@ ], "media": { "media-loading-state.html": [ - "b48cfc13fb7a3c2cedcaa6de250c04a4bec5f790", + "6bead20a98aefb5453e6ad5c3687c0463772b65a", [ null, { @@ -536144,14 +536911,14 @@ ] ], "media-playback-state.html": [ - "628daa25214231570affc02f47f5f0d2078a50fd", + "c034dbbdc08bda87832c36c57b0db4cd6cfc0c73", [ null, {} ] ], "sound-state.html": [ - "d9eb86a5ebe3935359040b6478046a2dd4ffee0b", + "527bb30b97c63cccc2a907bab71bb9c06ffc1f78", [ null, {} @@ -536189,7 +536956,7 @@ ] ], "nth-of-type-namespace.html": [ - "aa67afd00a4347a0d651a6fc93573d0b4553478b", + "f5d81a5df3ac1380749a075cb5588897d6816c58", [ null, {} @@ -542256,9 +543023,17 @@ ] ], "exec-command-with-text-editor.tentative.html": [ - "f2c1fce52222c2d683728f91425a746df25cdc3b", + "207e74aef2dd62ed5bf8eb6d975170d873dbed2d", [ - null, + "editing/other/exec-command-with-text-editor.tentative.html?type=password", + {} + ], + [ + "editing/other/exec-command-with-text-editor.tentative.html?type=text", + {} + ], + [ + "editing/other/exec-command-with-text-editor.tentative.html?type=textarea", {} ] ], @@ -560020,6 +560795,13 @@ {} ] ], + "config-cross-origin-apis.https.html": [ + "2d6b97e1aa00aadc7ed2a1b8a96f3f17132d015b", + [ + null, + {} + ] + ], "config-installation-triggers-navigation-of-navigated-fenced-frame.https.html": [ "74f810f6d2faa381ef89e3933864ab8dfb4437c6", [ @@ -560146,7 +560928,7 @@ ] ], "default-enabled-features-allow-all.https.html": [ - "f5084cf3861e37a540ff5f23ea43c304be99e7db", + "00044a4c85664956e3ce2ab10856390b3315cdd9", [ null, {} @@ -560160,7 +560942,7 @@ ] ], "default-enabled-features-allow-self.https.html": [ - "0360963a0b8f8aec0df19084071137c9803df1de", + "c212a6f44c307cbc0b91dd21fdadcdd162e35acd", [ null, {} @@ -560395,7 +561177,7 @@ ] ], "get-nested-configs.https.html": [ - "ed9f953e74a304f4b99e3a8e688866cb3a0365c3", + "da77f94a76302ac540b3d4f10ba3d9702da4703f", [ null, {} @@ -560739,6 +561521,13 @@ {} ] ], + "report-event-inactive-document.https.html": [ + "d6b91c937934e5f0ebbe8a2d40b890e9bd73420a", + [ + null, + {} + ] + ], "resize-lock-input.https.html": [ "261c9a737eff4b85723214b7f4735b8fe9423a65", [ @@ -561788,7 +562577,7 @@ ] ], "integrity.sub.any.js": [ - "56dbd4909f6a43e489ee5b6c50054d2b44d0709e", + "e3cfd1b2f6e66629cccfafac9d2b55f1e1505787", [ "fetch/api/basic/integrity.sub.any.html", { @@ -563582,7 +564371,7 @@ ] ], "cors-preflight-star.any.js": [ - "e8cbc80b808adfde7e50bf4c9d46b06a4393b344", + "f9fb20469cffa3642f38afe4febb11c702e4a35b", [ "fetch/api/cors/cors-preflight-star.any.html", { @@ -567474,7 +568263,7 @@ ] ], "response-cancel-stream.any.js": [ - "baa46de4039b176c30e0e8a49ee75acbd20e6450", + "91140d1afd183b2b6ba2e5fa24bb85c1a7ae40ab", [ "fetch/api/response/response-cancel-stream.any.html", { @@ -583285,6 +584074,15 @@ } ] ], + "dangling-markup-window-name.tentative.html": [ + "1bc8bb9f7ff558f60bda1dbacda617e34dfe2d19", + [ + null, + { + "timeout": "long" + } + ] + ], "document-domain-nested-navigate.window.js": [ "f51eed5ca941f591536c70187e4201c464f02ab3", [ @@ -583528,168 +584326,168 @@ ], "compositing": { "2d.composite.canvas.clear.html": [ - "40685597c95df022537560110ceb8b6de477a4c0", + "cb805b692e2d61232f81bc603f17459c5091969c", [ null, {} ] ], "2d.composite.canvas.copy.html": [ - "ac022f95e0855f65952e76decca0a7a73cd348a5", + "d4e75b7bacf3f9f75cf15b8339c91d278adf2179", [ null, {} ] ], "2d.composite.canvas.destination-atop.html": [ - "29cf9bcc53064d9579dfad643eb9e5c42c46d6e2", + "6fded39e44f85560b4ca70e58937420ad05c939d", [ null, {} ] ], "2d.composite.canvas.destination-in.html": [ - "dc748df15370bf619abe20d399ad0535475c76c3", + "7277286d8bf0bfc35e75dab99d8094b3200d693c", [ null, {} ] ], "2d.composite.canvas.destination-out.html": [ - "ebf33f3eba1a6852d33ba90daadf4a28dcbb89ef", + "5860c3d5cb2fe25619abca296f4f5195f39bba9a", [ null, {} ] ], "2d.composite.canvas.destination-over.html": [ - "6727e324c63d65c315e60338e872132ca583928b", + "76bad843929b219153d77c1b97b6246a24c7cbc9", [ null, {} ] ], "2d.composite.canvas.lighter.html": [ - "abb1fe0ea740d5bd53d5f06b7b146f66a3dff3a8", + "8d706df67e702b0910c23b0535d86f2e6699d175", [ null, {} ] ], "2d.composite.canvas.source-atop.html": [ - "76ee7db0534cdb1f8ffb8757e8ddc51dc7831955", + "cf3e449123bc69dec70c898c2486c425c3ef4b47", [ null, {} ] ], "2d.composite.canvas.source-in.html": [ - "77cbb5e0a63d44bca981408fe229a149093a29e0", + "dabcced9dd32eb1fe8f0de24fbd624000326c42a", [ null, {} ] ], "2d.composite.canvas.source-out.html": [ - "353dcd443810e6212c63f9cbe6fbb7c18f344db9", + "2fcf708796326f462f2404abfc4349982e6d606e", [ null, {} ] ], "2d.composite.canvas.source-over.html": [ - "06516cb75193a91b1d84996d514c02f0fc9375f3", + "b9dca65744e02d2955d5dfb0a781a9ebf453cc83", [ null, {} ] ], "2d.composite.canvas.xor.html": [ - "3bc6eb5d7908cab756fd58540cc5232d9b6bc7da", + "c252e17a7edc61f21da28d48abbc91ea42d5e88a", [ null, {} ] ], "2d.composite.clip.clear.html": [ - "1757870e9960c0453317f645c1fd998bd6ad0e12", + "65cfd951e81c288ff1bb4d0fcb0b74005cee1657", [ null, {} ] ], "2d.composite.clip.copy.html": [ - "ace0618cca4c14ae9fc623ffd1a75f8a17aff77c", + "b38397a2c7d5fe768cc8220aa6c00b5b767b973b", [ null, {} ] ], "2d.composite.clip.destination-atop.html": [ - "45301941d7ce0ceaecca83b6e5955c7c30f1a79e", + "79fb3af54c288855437556594809cda822299109", [ null, {} ] ], "2d.composite.clip.destination-in.html": [ - "2ace910253b56b1e4ae7e80f6f05265610944573", + "63e8d3acfdec143d507c97d93fbf35e6ff83a1f9", [ null, {} ] ], "2d.composite.clip.destination-out.html": [ - "4b3acf9b86f0bed688e6799347af7e6152bec3a4", + "839246427f79ac79d33ed217144c86ca2c961745", [ null, {} ] ], "2d.composite.clip.destination-over.html": [ - "0b1f9b52711fd177ca589051abae4c20744d69eb", + "fc7f1ab7286f6b644392bfd6ca4b511b278e725e", [ null, {} ] ], "2d.composite.clip.lighter.html": [ - "4d2525d75132c164f99fbc518b130983e208d281", + "b3acab02315f947e752dad65b3ceac22ebfe3b63", [ null, {} ] ], "2d.composite.clip.source-atop.html": [ - "db722a8983aa80077c0f83295822d2f6c433dfe4", + "49c3eb0bb566bc6fd7326763faf9111d91a6a879", [ null, {} ] ], "2d.composite.clip.source-in.html": [ - "43479240529a4d00f338e813b0a2883a73ef9f17", + "afe92ba4bf73fc93fd77c96b2e90ea19e48fc725", [ null, {} ] ], "2d.composite.clip.source-out.html": [ - "358dad372ec3ef47754b6b76a0cb00f8d98fcb47", + "43b352fb466ef51220b7051c039a52050f2cfbe4", [ null, {} ] ], "2d.composite.clip.source-over.html": [ - "542f889e7f389b198adb5171164396658f4abf00", + "4973f8e6e609d3a366ec274812c55d35aa7e11c3", [ null, {} ] ], "2d.composite.clip.xor.html": [ - "edbf6b0be2a82bccd7270a732ef483d9c34df43f", + "5239d6fd1052c2e93616fff0ddc59698d0a77afe", [ null, {} @@ -583759,84 +584557,84 @@ ] ], "2d.composite.image.clear.html": [ - "b9ab69b838540feda22283d0ca23a0a506246b4b", + "a44f8e35b02582d9e6afa85b678c48e001da7c25", [ null, {} ] ], "2d.composite.image.copy.html": [ - "f32e03bbaefabb9ce2f84223d1a3db3e4a5d70b5", + "d3c972b6d22d5b3d907cfad5a0ac219713470958", [ null, {} ] ], "2d.composite.image.destination-atop.html": [ - "2da0d198d058172c9c468590a6e79e8efb2a0a5f", + "7c6f93448bb08c164c902ebb9eb2e7449f95f4dd", [ null, {} ] ], "2d.composite.image.destination-in.html": [ - "63871b2d8e7de22bbba9614f4e7e0342731bef34", + "a2bf972bb90bfef2e2d714c6cc8b0ba30322fca4", [ null, {} ] ], "2d.composite.image.destination-out.html": [ - "3d96b191ecba0215a7cd107ad54486d98a8910e8", + "d0d08fa09ea713a61a119a5fe545bb30e1a20c5e", [ null, {} ] ], "2d.composite.image.destination-over.html": [ - "8e3dafb6357239a5e95a49b768007b6ea16474fd", + "7ac98904f3bf6e59d9668f986ffcd497484ef638", [ null, {} ] ], "2d.composite.image.lighter.html": [ - "6271a77594ed8aa4a7d19ee6715ece2f43a21da2", + "1df4c683dfac160dd311a5d7f77096dc1f39aa0b", [ null, {} ] ], "2d.composite.image.source-atop.html": [ - "eb7d75449dd0440bf403a49fc3251947a3fef7b5", + "86833df6b2b861e899104a5e54dfe1d556f691bb", [ null, {} ] ], "2d.composite.image.source-in.html": [ - "0f2fdad979f9879757e8450c1160c096f449df74", + "0b6ca4b52e3aa9887debb15916bfa785062c73a8", [ null, {} ] ], "2d.composite.image.source-out.html": [ - "fd920855d403fa5cd79641c7b3c561af064d5b7b", + "31dfe471e53efb0d2000d28944c455c2a7831905", [ null, {} ] ], "2d.composite.image.source-over.html": [ - "ce5b6c631b805ff56e538b2c488cf40d66287805", + "e396faa5d7cd2b8aa10a5f3a8d00b2c76bd8028a", [ null, {} ] ], "2d.composite.image.xor.html": [ - "68ce901d2af7ed78864cf0807933879dae651efa", + "d43742c272fd38a15a62c82f575158e3224423d1", [ null, {} @@ -583906,308 +584704,308 @@ ] ], "2d.composite.solid.clear.html": [ - "e270df33aba178adb0fc16e5c71a8711e1ec65fb", + "a94698954455fb1d43f0c6edff3753dc44e43ad6", [ null, {} ] ], "2d.composite.solid.copy.html": [ - "74d9ad5cc2eb7152601a7729059414bf4ed702c9", + "14bee74452410797916226ff290bf99a8cba75f1", [ null, {} ] ], "2d.composite.solid.destination-atop.html": [ - "5e8f60474ea5722d878fb4d54d2f6f6d20f08839", + "d82fb44ccebf9e040488176cf385600165b852c8", [ null, {} ] ], "2d.composite.solid.destination-in.html": [ - "246bdee5450f2b217b40c8f04a39cbbecc9012ee", + "6a491f57c74bbc3f7b1f35cd8046b7fe1d2cc78d", [ null, {} ] ], "2d.composite.solid.destination-out.html": [ - "7227cf41d82556e8dc0ca0b8f9ac5c04e1b0c38b", + "bcc7f24e7a5f1cc072cca10229317235642f8d4f", [ null, {} ] ], "2d.composite.solid.destination-over.html": [ - "48671cee5bedab06177e862aaae2a517a5dc65a4", + "6e634e6ae529f05643412b1dbfacdc0c8d365a10", [ null, {} ] ], "2d.composite.solid.lighter.html": [ - "f869b6d1a909bef98ee2824490d8e4a9c8d05b03", + "fddbe924207552403a575af551f3512106a51606", [ null, {} ] ], "2d.composite.solid.source-atop.html": [ - "14041236d2d97d97bd00a49d244ad2e2e81cce75", + "4bb0e3d8b5529f4a92dd7c879401240f03766171", [ null, {} ] ], "2d.composite.solid.source-in.html": [ - "8f1cfcd16fdfbdbef6d08118eedecdb8d3d1c4eb", + "f8fee40a93113dd28ef71109a2ad9e8274944acb", [ null, {} ] ], "2d.composite.solid.source-out.html": [ - "55522d54c2416bc15c277290f240bd75aaf5287c", + "2c9d0861820696b003bb826061a9ca975ea96159", [ null, {} ] ], "2d.composite.solid.source-over.html": [ - "6194526396d2b7ec55543c6435c96471f54c5364", + "335987b12b2f94690153d0cf3a9c9387f1b5c6a2", [ null, {} ] ], "2d.composite.solid.xor.html": [ - "431b8a334644df311a5bc7e735490c3033232084", + "d9da43070e1c075025b68a6e32a4cbcb57b8cba7", [ null, {} ] ], "2d.composite.transparent.clear.html": [ - "606d925f10ade0054d0bb204b7726a76f08d2678", + "de417eea34a66463ec9664a9d483e654ad85f9c5", [ null, {} ] ], "2d.composite.transparent.copy.html": [ - "58673a12f8347f64cbabe621a1cd4ecf60211c60", + "2048975ec3db5b7b3df3de46cdd5f696447203cc", [ null, {} ] ], "2d.composite.transparent.destination-atop.html": [ - "4d22016feace83c44bbd925bef2edb0cd0508f22", + "1da1f1a4ee01ad88b7d3c7741f081c28af2f9d9a", [ null, {} ] ], "2d.composite.transparent.destination-in.html": [ - "e946c721514754edf7e47c19cfaaddb89a2125dc", + "b0f8abe0efed3ec2aad704835947716d9dd0ea9f", [ null, {} ] ], "2d.composite.transparent.destination-out.html": [ - "6e2482519336ef8d810a0d4e62b14290cd54a56a", + "badbfc4ad7ab5f3f3f8c4627b37e18c3ba3b8b57", [ null, {} ] ], "2d.composite.transparent.destination-over.html": [ - "4c9c9fbc5fcb06c338adc87d3100523002bfcde5", + "e8e0051b2cbc835cf58cfbb8518db3ead95da14f", [ null, {} ] ], "2d.composite.transparent.lighter.html": [ - "4b3d148447909d461f6cfaabb8cb3e2cb7d496a5", + "6e4c42ab9a3ab67bf81bde1fe7666526a03b3825", [ null, {} ] ], "2d.composite.transparent.source-atop.html": [ - "4b0987764a196ffaa5fac1785788c8ccbf435dce", + "d3d3fbda12661dccaad670e863e695028f225031", [ null, {} ] ], "2d.composite.transparent.source-in.html": [ - "236f01b49ea3842a3e1917865a06f317b2650744", + "27c66cb6737f1ded6b8861cbd270ac2bca6ee13f", [ null, {} ] ], "2d.composite.transparent.source-out.html": [ - "d597ff9e06ecdcea3b6b9d0eb62bbcb849aa58b5", + "31bb6a24033418d3c3d5d28c68f4cbd2dca7dba9", [ null, {} ] ], "2d.composite.transparent.source-over.html": [ - "e2f8a7f6f8a6224bd7d03dd4f4d01bc9e7143f02", + "ee20f52b46d409399701531eb528fd406efc8785", [ null, {} ] ], "2d.composite.transparent.xor.html": [ - "83027e552045df71d3c326d159e110ca7a00b412", + "d1818750dfc0924a47662176d9b1205c59cbae5f", [ null, {} ] ], "2d.composite.uncovered.fill.copy.html": [ - "cd443ae6aa668f1416ea51fe4cb4d84f160a630d", + "9dfd650b98dac58562bdd01be03ffe9dfde12256", [ null, {} ] ], "2d.composite.uncovered.fill.destination-atop.html": [ - "9182124ecf23c0749c3aefe71f7f39d4f7748899", + "685a139504905f6bb06c3033f162e2127575d944", [ null, {} ] ], "2d.composite.uncovered.fill.destination-in.html": [ - "7906c159d44982a5e03e055d55b7258b68318f52", + "9ca8021151fb5269ea1008685326f5113bc559c4", [ null, {} ] ], "2d.composite.uncovered.fill.source-in.html": [ - "d46b7d44765654c701c8953ecb10503a5f5ebd56", + "9f1a5f9d51fc445cd3de73a2f57a66e1f05094bc", [ null, {} ] ], "2d.composite.uncovered.fill.source-out.html": [ - "08a026496d58f30b703da9190ac14d03fa24c3f1", + "7653677fd5aa040a55d58d2cb30348cdfa481973", [ null, {} ] ], "2d.composite.uncovered.image.copy.html": [ - "e909612a5f5ed010dd3c23d78d751c3aff4ded25", + "61dd0381eeb83bcb22ee1ef63c93c78e0e832758", [ null, {} ] ], "2d.composite.uncovered.image.destination-atop.html": [ - "d257e2f2af15fb5f64def557d02ad19b55331f54", + "440c832c7106e9b89c968164a4a7c145dcc6c212", [ null, {} ] ], "2d.composite.uncovered.image.destination-in.html": [ - "c3e3bc0c47dbd819f4d4e41894308e21b53afbaa", + "03e2e807ede3ca3e8216f40255cd5ef23c2ac52d", [ null, {} ] ], "2d.composite.uncovered.image.source-in.html": [ - "fbcb3c23dfa21c062d5b8c6c2662c47971399ee7", + "de2e5fad63c8546bdf20352ef157f7379038c219", [ null, {} ] ], "2d.composite.uncovered.image.source-out.html": [ - "03979e6ffed45a1fd007102f863bd30b2c6ee7a0", + "5cb9b072b90c979b8998e42caa48b36b1f092038", [ null, {} ] ], "2d.composite.uncovered.nocontext.copy.html": [ - "4bdf1d21761d28a49c0cdd6fdac4f0414827d656", + "cac66ade5ac117e6eab89b76bbd0686e6912265c", [ null, {} ] ], "2d.composite.uncovered.nocontext.destination-atop.html": [ - "093b6829536fa26dc496b1a96d166397a0cc9fb4", + "c7cecc2e3db0be5514b6c15a8622a13d2e584587", [ null, {} ] ], "2d.composite.uncovered.nocontext.destination-in.html": [ - "dc613bd0619b6aa1c123a8ecbbf90b1f962f1d56", + "e090d7d4b4a1a9003a85c1a44e07c3fa93c2a72c", [ null, {} ] ], "2d.composite.uncovered.nocontext.source-in.html": [ - "6616b4ebe4c256cb36dfa8ef50aca1b9b1555791", + "0436b4081704d586d8959a4a9b300b8ecb954c58", [ null, {} ] ], "2d.composite.uncovered.nocontext.source-out.html": [ - "fe2d70f258b659708bac6b1fd4e0c3091d9d1644", + "efbc8ab2f0a99cdf6204f5f3d1e55d6c117d9950", [ null, {} ] ], "2d.composite.uncovered.pattern.copy.html": [ - "4d6a91de91827f64cb3eec6535f61f50d4a337d7", + "aaee92022a75f8ac8e488a3951bab6aac9d56ae8", [ null, {} ] ], "2d.composite.uncovered.pattern.destination-atop.html": [ - "bf03da0791dbddad69087d4e756db79ce923c23d", + "aded018f8ea5beb2d43acf6b44d8af5a09c2564a", [ null, {} ] ], "2d.composite.uncovered.pattern.destination-in.html": [ - "f5a5fe3f9df83156afc9c22e5f07b3ef18eb945c", + "e520e1ffa365b09654ea585dccb4906a9f7ea408", [ null, {} ] ], "2d.composite.uncovered.pattern.source-in.html": [ - "385334d4c6627ee8e027bf0994bd91e00bcac7b7", + "bee654877bb6a99a4b8a3cfe6a6767adab85affd", [ null, {} ] ], "2d.composite.uncovered.pattern.source-out.html": [ - "ae0be111a98ddbba2b6a94c222be3e69aedbc437", + "947893091e911c56818af24879e34f3529af24cb", [ null, {} @@ -584740,294 +585538,294 @@ }, "drawing-text-to-the-canvas": { "2d.text.draw.align.center.html": [ - "71a7cae30a17ec7bce07d36340c8c6a8b5afbe8f", + "6f54844b29ab66b0548d187c97a14e68e0096364", [ null, {} ] ], "2d.text.draw.align.end.ltr.html": [ - "5bd7aa10b0223061bf878b84ad677e130e2e1f14", + "39751e139ca33b48dae855932d0ec9048906fb81", [ null, {} ] ], "2d.text.draw.align.end.rtl.html": [ - "d37a29c558d2414c280fdef78dee8d8ad5de58bc", + "86645a91742340a443e512a2c5b57f5a67d6c5ea", [ null, {} ] ], "2d.text.draw.align.left.html": [ - "5a4bdb6abb9df4d20937ba6701f3764859095366", + "cd01f2588af9fd4537cba3656910e06e92538f13", [ null, {} ] ], "2d.text.draw.align.right.html": [ - "29e009e72249a93a00520e051fb540c82856147e", + "64207b06e6e90744680fc219f32ea79f23d2cfa4", [ null, {} ] ], "2d.text.draw.align.start.ltr.html": [ - "d74a4b89e41977e2ef382511b153bc5efa97e24d", + "abf8086e8c1b32185d7df65884dcf30a6cc338e1", [ null, {} ] ], "2d.text.draw.align.start.rtl.html": [ - "8dd671cf20403a7319f269bb142c99f57acc166d", + "8c5b819854c535f8f5c78dcbebe25b5ec72e33b1", [ null, {} ] ], "2d.text.draw.fill.maxWidth.NaN.html": [ - "d33df3c78cd359cc7dbad69a348264959cf94f1f", + "9705d2883065a566b3bf15f34bf703683cf34888", [ null, {} ] ], "2d.text.draw.fill.maxWidth.bound.html": [ - "50c67293492f3ac07465a914e45fd9e2b3204ead", + "88dc1099238741923c335a6b39c1e3821a4ff7ce", [ null, {} ] ], "2d.text.draw.fill.maxWidth.fontface.html": [ - "1e133a6736ca915ab6bfd0c1a099cebab81ac17c", + "ed241deeb222de3109b7ad53dbfed9a1e27f661c", [ null, {} ] ], "2d.text.draw.fill.maxWidth.negative.html": [ - "b9febd11508ff39eabec610b562fc77caadb21d0", + "ad50d5760834a117d1f348c144065c87211dce86", [ null, {} ] ], "2d.text.draw.fill.maxWidth.small.html": [ - "0d7b8ff2fb519ad087d106d2fb9a9045727251d8", + "75866af40628ba88e6ab8861956b80a8263476a7", [ null, {} ] ], "2d.text.draw.fill.maxWidth.zero.html": [ - "64a3fdc5a7e23f584b426d14ef14a22653e98594", + "a175a5787905548e03336b13c89ee3fe433297d2", [ null, {} ] ], "2d.text.draw.fill.unaffected.html": [ - "cb1e7dbae02896719ab6526bd192aafa8031e254", + "94ed31d1993eb6736c5a0c635bbe80aaa6a5391d", [ null, {} ] ], "2d.text.draw.fontface.html": [ - "9adcf3560d5730e08a286136a937c7907c5afe22", + "cb7d6984d1f9e4380506136661cec3ba7ec09426", [ null, {} ] ], "2d.text.draw.fontface.notinpage.html": [ - "6ccb0c020affffda57863f0cf00a65b20e196e8c", + "6c347399b2a53a00943ee6a74c0b83b343d44865", [ null, {} ] ], "2d.text.draw.fontface.repeat.html": [ - "457c48c3d1b0e4a72496fbe936814a8dff106a73", + "d6d33a07681b4ab20ccff156c2918b2cc336aeee", [ null, {} ] ], "2d.text.draw.space.basic.html": [ - "26f8114e20ea20d4a13ded7b81ff92c6dd670e55", + "2c5d4710134417be51c00ba1f8eb18957449407a", [ null, {} ] ], "2d.text.draw.space.collapse.nonspace.html": [ - "e105ec358e0b10c9f542d06e1a3aca8f18bb8160", + "00877c6a0b78b38caba641498a9c53727b2f0cc7", [ null, {} ] ], "2d.text.draw.stroke.unaffected.html": [ - "728765c1fe752bdc64cc309962f7909291c43245", + "76a36476eeb21c32908a10f8da9d24e8a0cb6bfb", [ null, {} ] ], "2d.text.drawing.style.fontKerning.html": [ - "f6c3826317b82ebf87c4a24acde743d9c9cf3f03", + "6de9c6eb504209806ce529bf04522237dacc9694", [ null, {} ] ], "2d.text.drawing.style.fontKerning.with.uppercase.html": [ - "db62fbe81a78e184a49d7725aabc13ce91cb7722", + "fd91a09d732af4c0b1b0ede99e8bd5459532f385", [ null, {} ] ], "2d.text.drawing.style.fontVariant.settings.html": [ - "6fdd1454b21f18523508480dc5570336d8810f68", + "cf0a32305d0dbce3e0a7d408ca64083b7b7e0f27", [ null, {} ] ], "2d.text.drawing.style.invalid.spacing.html": [ - "9bf2440900c2f8193b36c45725fb94db084d6182", + "a0b8340b2cddff4d38cfdcea6529f7911a17c1a9", [ null, {} ] ], "2d.text.drawing.style.letterSpacing.change.font.html": [ - "3b88ab6ee17c0b224f9a669335c567751c07699b", + "d7543e5d9a829c6c91e987f5e38872d1d04300a5", [ null, {} ] ], "2d.text.drawing.style.letterSpacing.measure.html": [ - "ba8656ec1a3d5d84b0c3e2cc7ea7879eb308c605", + "9b0ce16eafde2685eb145d326fc3531a354434ce", [ null, {} ] ], "2d.text.drawing.style.nonfinite.spacing.html": [ - "f197d22afa45d02307b9a0324c64f5013eb3439e", + "5ba20208e5eb36cde14c5b5a34f877a324a37edf", [ null, {} ] ], "2d.text.drawing.style.spacing.html": [ - "b5a411e1db0197ec71af54b6d1d77aa0ce31e5eb", + "82a0fe3cf412431ca99ae58958e41f080142d0af", [ null, {} ] ], "2d.text.drawing.style.textRendering.settings.html": [ - "f6634ee1a0d69b8749864479920e5c3a8f9e9671", + "03b35dfaa9d2af989f2a6251685dc88f7e379988", [ null, {} ] ], "2d.text.drawing.style.wordSpacing.change.font.html": [ - "d29bc8ec203880e7f56015cc94d0e00d96582b9e", + "8bad1a0447cba76e0f6178678ddd588f2af07c65", [ null, {} ] ], "2d.text.drawing.style.wordSpacing.measure.html": [ - "4898c23ee78177b6438ccc042eb8edb58624eda1", + "d4f10032eb5b33d51d97f13383eaea174455e585", [ null, {} ] ], "2d.text.measure.actualBoundingBox.html": [ - "44cff25d1afa82ba5f960784548b81e50025e787", + "2317493032182fd8e58a71eff64e796e7a05dfbb", [ null, {} ] ], "2d.text.measure.advances.html": [ - "e7039c78793d71c8171888eee2a0a0a487d6b082", + "84d0af46b84052e3244404636d399bed5e07e369", [ null, {} ] ], "2d.text.measure.baselines.html": [ - "812949e25f0272c714f34214af8a423639546758", + "95fac522d941f234ff1208b518dadf66bcd9a4c5", [ null, {} ] ], "2d.text.measure.boundingBox.direction.html": [ - "4387b6ca97703d695ae50642cdf3fb67e130cfb2", + "a00eb7eb9c056c9a994ce6ffaa73cee46eef6cc4", [ null, {} ] ], "2d.text.measure.boundingBox.textAlign.html": [ - "65c030936b302f22498b57ca45f74418caf9feec", + "88f594c7c8f5a6518cf710f1d31a14fc130ba062", [ null, {} ] ], "2d.text.measure.emHeights.html": [ - "7a4b7795430cd38c6879093bba541c36860d4eb4", + "d1085abd6e7c16a2c9873ee866b7b86ce7c0f530", [ null, {} ] ], "2d.text.measure.fontBoundingBox.ahem.html": [ - "7af141ac8efa3f223acc43948495b7042ade10fc", + "80cbabac8f23cb8a0c432c4c04a77ec9287cd67f", [ null, {} ] ], "2d.text.measure.fontBoundingBox.html": [ - "6cdd7b8cf301b3542f679036ebfdb02d33a1ecfe", + "2737d2da9a606e8646aea3db7b68e78f6ddb1a2d", [ null, {} ] ], "2d.text.measure.rtl.text.html": [ - "539eab0715ca816a7c12f2649f26b9f06a7b0c4d", + "a92d5cbd0be86825797744c734bec255c7c98e51", [ null, {} ] ], "2d.text.measure.width.basic.html": [ - "4c528ed06a71c232a0ab237e22c9c3e02e698169", + "1d5502d8f0ee5d8d8d33a083e677e31a5d9bbfe3", [ null, {} ] ], "2d.text.measure.width.empty.html": [ - "83686314227429a0d9b99fcc21a119448f458a44", + "ce9e80b3381e8f5cc3b3d2e88473aeea62f6b05d", [ null, {} @@ -585036,14 +585834,14 @@ }, "fill-and-stroke-styles": { "2d.fillStyle.CSSHSL.html": [ - "cc48c2e1476e6ba946a3d39594b9026b1a953d80", + "481d6fe9e51914cb864dd024ab7e37078442646e", [ null, {} ] ], "2d.fillStyle.CSSRGB.html": [ - "0e3fcd4f67174a4515e10c4268b02813569cad31", + "cfdb603d5de31a36bca0d6a5be915fe37ed349b0", [ null, {} @@ -585064,1701 +585862,1701 @@ ] ], "2d.fillStyle.default.html": [ - "31e051ae6c287e0838bddb4fb2a541cb48595782", + "1bd3e2d4ad0f51d262bd4ad9ead975bc10d1baa5", [ null, {} ] ], "2d.fillStyle.get.halftransparent.html": [ - "4101bf4ce9d5ff6501dc38fe14f83d6198b9ce12", + "423293e1b602434d898ca93f536e1e755418494a", [ null, {} ] ], "2d.fillStyle.get.semitransparent.html": [ - "9f1784730977e29d12122f6e62514afe847de59c", + "ec63d7662d2d3d5714d05f1e49722fb54adac548", [ null, {} ] ], "2d.fillStyle.get.solid.html": [ - "9361389541ca563a89b0fddfc1dd2707730ecae7", + "bcdd57a7cace0c814b0c31872129acda8d3cbb81", [ null, {} ] ], "2d.fillStyle.get.transparent.html": [ - "fd381eb8147f7aa0bf511636a6efb042c0fcb037", + "21931aaf23bc30be305e3e435e98c208d783e11b", [ null, {} ] ], "2d.fillStyle.invalidstring.html": [ - "16bb9235c9b9cd931e45b1da2616bdcbc37e9a21", + "9fb83063f6297263cc887036569dc95d50515775", [ null, {} ] ], "2d.fillStyle.invalidtype.html": [ - "d218368359fce477f65fdd1c8a0c66d88f656382", + "84d8fbd3ffae3d4f74b6c280e94a43383c8cefb9", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-1.html": [ - "12a338e066ab67f6ccffdd56fc3e738f1fbc57c9", + "87b5bc9371a1f3916cdd8f737e60dfef8b533976", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-2.html": [ - "71db4187ac043b7a2555e04c608bb71289ea4d40", + "746c358dbbcbf8b67d6fc1aae15a69172968f7ed", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-3.html": [ - "6c84e94b031248f9219ea5e5c9d51b3f0d4f40e7", + "b8a9cd5a09065b66827a5231aa0fb1dd6e21fd35", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-4.html": [ - "d37965702e0371dd9f1c93484c1db018f88d83c3", + "d5e58b9321f5381ba07b87e71e9937dad8fff9ca", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-5.html": [ - "62ad91f1dbaee87e7fe689cfa12a530f69b24574", + "85bbb802b5300edda5860fa9c244fe827d67451f", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-6.html": [ - "9c879828d0af031a15c300b8e2c083b89a6279b8", + "154bdcd49a69779a958b81b216db86af661b6391", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-7.html": [ - "c3e2334d445f2cd8c8e1a7bbab7dcae5837afe11", + "5cf81e41a1afe1f3a6d776ff6c5459048f1a578c", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-8.html": [ - "b9baf11e2b4db3518284023e7102231c051c04e0", + "17d0782df1bd1a38f49a75b56a9d0feaf72d89ca", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-9.html": [ - "274585c3c9f7ce70c59cda0a52081f2da3094071", + "2f4b1e8e1a413513dc2f75deca0c0b861b65a3e8", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-1.html": [ - "e4a5cbc0942fb98155f22aead153e9c928adb4c2", + "bc70e21d62103e9b7fd32969d900c2fa569eb0b3", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-2.html": [ - "976bf71b87fd7a1bce1ad055a70df6f61870fd87", + "7f774985319867148d0d22dab446670a8f468326", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-3.html": [ - "16100e6a94ca8a65c5ca26bed09ec2a912e084a0", + "c33a50a9466fdfccc6f5aac8af4af9ad0f4ca49e", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-4.html": [ - "eb0158e392cd0435b9e646602d244f8f0abe80f3", + "3d0cafc66b49bad963b5fc415fa965730f940c32", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-5.html": [ - "c1b7c566b3a823bc84a79d18df9475d8ee824f72", + "a70613b49fa644e3c36f72fa77583760aa5e429d", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-6.html": [ - "06aa355d251fb695dd3b8426b04b55c6ed34c908", + "8c46d887ba96b6adc1cb39818c5437fa84291a62", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-7.html": [ - "eb66e2748aa66b2ec372832aefde1096df5887a4", + "b6b4760086b6acfd5c21e90f123168f34ff5305f", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-8.html": [ - "0c13368ac26bc1f822408c8e9be4176963021b39", + "7933d47fd2b1b8dc339342a04071f29009ff2de9", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-9.html": [ - "fd2cedd56d903ab78d5fe034104fc8d33cb1aeec", + "8a4e29d40ea23cb21374f997189004bbaca36a01", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-1.html": [ - "7fa79bf07d1a1c0ae8785cefad4814e6fb1bb691", + "632b7f57fb54c468bbb0cebb132910d10fb29781", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-2.html": [ - "89ef2183a74166012479bfd7c94ba83fba7fbf6f", + "1d3e683b35d058bf37d444f24673156d2b58d300", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-3.html": [ - "6be6f060671fb9d07a39e96fc0f562bf5090b34b", + "8a6f3523509aad24787b00dd8ad726af830eacb3", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-4.html": [ - "23c69bd939e068b26169db2223f41d33070fc9a8", + "1fdf9ecf92daad2a0264e1f911978f0a586de9e4", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-5.html": [ - "b853fbf35376583163a26e3c58c29e0a7772870f", + "a1d99d5e240d318debb86244b1f742b2d966d966", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-6.html": [ - "8a62fa22d8ea495dcd20768a2f92f6e05747a250", + "ad2c5f5484f39b4a4e4eee39740f0f84c2310381", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-1.html": [ - "66834dd7064339d6e7e23ab628fc69220bcfc9e1", + "f394dbfb2ff3a84dfc66a09f08234cd03e79f567", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-2.html": [ - "4a4cb78c62aa532c3ece6d3121c08e950452e16a", + "5529bc14627f9b22700c439a65653b5d3d7abb8c", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-3.html": [ - "51e946878619c020105a36019296f74d436fe4ac", + "82047a5698c8ff533ea3421ff4cf28c70d8c9163", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-4.html": [ - "07a65ac8f365add36b75695f9117f2409b2839be", + "5fea546f104e09c9f881c0cdf5a23bd89d3a5f10", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-5.html": [ - "2f798f47f31fae1fac8c3ccf9824ec5c1bd459c3", + "d0485665221f125b2140da1eb8d11f028c9a8fae", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-6.html": [ - "5ca7564a0587ee2ef00f5fea6fd176f9dd434f9c", + "28feb2eb17892cb1991490281c11bac9642fb13e", [ null, {} ] ], "2d.fillStyle.parse.current.basic.html": [ - "e48d05ceabb43b8a2809815a4b21fd7b58d66bb1", + "a1481e36e1a7ff037bb445aeed74cf6093d96dd6", [ null, {} ] ], "2d.fillStyle.parse.current.changed.html": [ - "f298af5adb69854c34efda384152ca2deaf94ab0", + "2f4d0fe4f057a43a25a27bc4ade310dd4bbd6940", [ null, {} ] ], "2d.fillStyle.parse.current.removed.html": [ - "2642b888e9de22399f889d39ed520efd0a9ad699", + "96b070c8c10953379d49a5bfc3fb55cf4edba5ae", [ null, {} ] ], "2d.fillStyle.parse.hex3.html": [ - "9fbb2750147d6f671fbfdadb10ead8f7718de43c", + "017bfc88c258ccc80dbd5ff10e173e900a39e02c", [ null, {} ] ], "2d.fillStyle.parse.hex4.html": [ - "fc79cc7d3fc7c726e34c9c8f50fa54d2bc66aff4", + "c8704edbb2642f8b5148672bd2e73ef88218a860", [ null, {} ] ], "2d.fillStyle.parse.hex6.html": [ - "b946c30e1748865a1371ce281c2a318d8f28fbd9", + "9644a46a0c10d15619b5afa4ee32ecbb1fdb589d", [ null, {} ] ], "2d.fillStyle.parse.hex8.html": [ - "5865e98f3f5d1a40c6b9de8abfdaa81d9dbb17be", + "b2dd06982d51fba33675da8c97f56fe374694127", [ null, {} ] ], "2d.fillStyle.parse.hsl-1.html": [ - "e169904889b64446d5a9b3ec598c1cf49a0f0f93", + "ceb3da52e0b4c1777410c8e076f3bf0f24b5193e", [ null, {} ] ], "2d.fillStyle.parse.hsl-2.html": [ - "ec61f580eb64aa7ee8782fa88904d5a04142f91c", + "22e67e33d43c8a19501b11441727d624615610be", [ null, {} ] ], "2d.fillStyle.parse.hsl-3.html": [ - "0ec6fce487b80072db91161474113e293d668155", + "e182952fbf9e25c9dd383e4ca54133c73f3969c0", [ null, {} ] ], "2d.fillStyle.parse.hsl-4.html": [ - "b3119da927dbbc59d3c033c02257473a609afe46", + "b320c1c98bef4da4f2136e1893e3d0408e188937", [ null, {} ] ], "2d.fillStyle.parse.hsl-5.html": [ - "1867bba7cb836d46b2cfe8956c0e8dc78550240a", + "1264f626de6b2c1424ecf7a044494f8794b2dd49", [ null, {} ] ], "2d.fillStyle.parse.hsl-6.html": [ - "7a5e764d95fb0facc840f0f5cf24430f398fb604", + "e0fc78755960293cccafe6604f6a7264848a148d", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-1.html": [ - "f623320cd537166bf095926a30b8297539ce92f9", + "59d66c383c90d6a4c01ca327dd316aa4efae5608", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-2.html": [ - "0293acd9eb499eb1fa1070d83fd54aa963a56845", + "1a1939e47af3373d083a99f2d406df360c86fe8a", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-3.html": [ - "2ea1a5115a57809f5947decb417f159fcd8b34ae", + "56f3a0a8b540b6873f0eaeee4059b0fc71ee2025", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-4.html": [ - "add688ebc915b2e09c2b2a8a7f2b940de6028438", + "af9d11e678c7c5a0582c64627e62ad2e8af753ab", [ null, {} ] ], "2d.fillStyle.parse.hsla-1.html": [ - "38427cfc3ac40798a7ace37ff759867d8a237c12", + "dbc738ffa7e66e6c859475aa7e2fff8e9b96547c", [ null, {} ] ], "2d.fillStyle.parse.hsla-2.html": [ - "01a83676ad8de3052108cce997e3fb8a622ae052", + "aa21789b028e4a76239a40fe5ed1ec56b9cde0de", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-1.html": [ - "b7914e3a021ad1325ed9ed68d013d89142f925c7", + "2acac26e1a97cdaf49a99ee795be7ff437d89977", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-2.html": [ - "94b6237456046687b30a44b36d962ad06c61f5a0", + "0f32fb5474a517c6f527d5cd217b0085d4829bb4", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-3.html": [ - "bc2466b6b57694d8b6294362621d89e3a43a7cc0", + "4bc134aec5ceba79cc4991cdac16ba2a4c71c624", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-4.html": [ - "35c0d00011be9ce09f41cc07deb9bd56c96583de", + "f8b2382755a7c51d33f34798328389aa9776a03e", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-5.html": [ - "13fac2fd589b1af1bf1e407fbc33026b88ed51d3", + "9c5e2258b9e5a108daa2729969d4621262f4a778", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-6.html": [ - "ba76ad6a99b4f0baf061d19e37cd5ceef851976c", + "153515eeddacbeaf784415ea9a20260795cbec54", [ null, {} ] ], "2d.fillStyle.parse.html4.html": [ - "ae54397c924cb2972d1cc7cd1d1f94009b6a5c6b", + "65d0d2020cf29c5838093f4f6ed549d26c4d8872", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-1.html": [ - "1850125baa451ac098c4979d3cbb07966679267e", + "4046f825a11f17529731ca3bd8a80f44260046aa", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-2.html": [ - "b4fd4a6fd97c16072f063218cb0f5077330396b6", + "2075f8e459896725c5915d11c16413eaef1e06f2", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-3.html": [ - "224da3a981d8072b6bc148714271194c2a5479b3", + "53bbf6c7eef4d2aa26b0a73aa14dcc63d39de3ce", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-4.html": [ - "0e4b77ba80b98fdaf92c8f387a046c0fc543f991", + "e8be93b59d1d69ad56ae1cd7c4a95bb02ba16fde", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-5.html": [ - "08e03db12f3dda0c473ffa6876c199f926ccecb4", + "b8938adeb2ee166826cc411f1fc9cbc0a9e35ff3", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-1.html": [ - "62f82953fdb1348155cc567f4bb4b1676c710b75", + "7104ca6a84819fb63877bd585d45a1ad62873a54", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-2.html": [ - "d6b78e923d555439cc5bf31ac3a67497012a2810", + "c340e7445ddbc540ee323eaae5b05a2a7f02bf0a", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-3.html": [ - "c5717406a208c29f0fe6e394cfe0f74a3ccd9e56", + "3f94ec16ff9bdf81edf1b617b1af70911f0c7f3f", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-1.html": [ - "01ff94e8b02590c78346abdc7df5e42035dbaa99", + "69503593fe0e6fab8038a0bad978fee149ddee0f", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-2.html": [ - "2b782e35fc1d8bbf81d24cee2e4e0d27eec58f0c", + "96af643ee80ca4bc5eedbc4edecdf04d51b777bc", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-3.html": [ - "54849f6c55986853a65e270ac67309850370f67a", + "a2691acaf1bf0e1de0d7af48e276f322671c51ff", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-4.html": [ - "97d5748aaff4b0c3aa3c891841ab138432b9f299", + "eb5f56692a6b06bc99391400c4099a4ba7759e68", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-5.html": [ - "666c3c3d3e5e858537d2afeb83626ab4a4bee7a9", + "7de9dd4911e20b1615b43babcb08e5fb14658876", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-1.html": [ - "fefe336c19fb5b844cee47522ef67e32183b75a1", + "20b889c5cccc167e407be6bbfde4f5f964fbca6e", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-2.html": [ - "bf12006745c12210576325cd2be596f88c14f6ed", + "908545cebe6656e2e3407b1a4f3901ec10f2081e", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-3.html": [ - "a4e4e906afcc1a24f7c394be512a87ecff57fa98", + "851314f643915936ea319ec0e2d92ed5011a201b", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex1.html": [ - "04c67e343efa3e15f0fac54b57fde37954911be2", + "9aba3922760509b3e503ef115e157ab4dae4dc89", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex2.html": [ - "7027db50cad94f7639ac5f46aff68849a359e51c", + "361db1de43b96097e31697837b90052b59322aeb", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex3.html": [ - "ae7a32a5a4a17ce5a5ac1f1d1660c6f29cc27e01", + "7df089d840c6b54ebe81a55d458816004c65cf3f", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex4.html": [ - "d355309c19bd7ab971de9f5a857bd0477542761a", + "6089675b8149b963e12b42b5d5753547cc121442", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex5.html": [ - "0b80566b8cf6edbfe5b3391659395d7d0c09785c", + "488daf46902423fdd223c8ab465973a78cda43e0", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex6.html": [ - "02b75c3aba68595f41562cb2023d1d92a349782d", + "ec0def2e100bef48d497e3466d36294a8c0d34e2", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex7.html": [ - "6a73bc1f75c7277d4ce3059be95ad54fa12d805c", + "2b07b8dc9b99db275f1bda57cfaa5ee0988f0624", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex8.html": [ - "3a03959ec4e77af72c76730d7df2b934c5116b60", + "f886d4a67cb8cfa07060e809781e53fc6f3ab38c", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-1.html": [ - "38a01fc107abf2d8ec1d7154e3a83709892d18b2", + "153f9cb513df74b1721affc99972bcaba623b8ed", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-2.html": [ - "6783a18e8734baa352c34a509aa4aba223370e9b", + "7a2bd4f930a5fa23fcddd4e951f7975cd4ab84b6", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-3.html": [ - "8f9137e4d724437f4d466d54672c772748ed333e", + "8ad0f54264796b4ca5e7181c620e39a10c85eb47", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-4.html": [ - "56c7228b410d750711a83a11cfadfa2ea5fdea10", + "780b83b383ef63c04dc54c73ccff8b0450c8cbca", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-5.html": [ - "df84f6854f544686cc00d8535dd95969da64528c", + "ad5944f1c0a46970b220b6e576a0a895ce792ae2", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-6.html": [ - "2a7d0753d905345b78ad96f9a9299e346d4def2e", + "948a9d8a360fd369330d1b21cc80fd5f2cb49759", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsla-1.html": [ - "5d22135c5cf961fa81d00bde8b6517fcfb86a3bb", + "7a4bdb318f181f574c303fb812a0e2a5773911fc", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsla-2.html": [ - "f1a29cdac2da48f8bf9ff7ccd46e31927b7997df", + "4164de3bbdca991cedca63eaf55853420a67df1e", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsla-3.html": [ - "e48d086ef23ef4ef9c2b2532fb9f7553521c9080", + "109a22cdf98cd1d230dea96178f4a0490f970a74", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-1.html": [ - "80433bcffd6173111f9ffd0a7e3d1f107a6e8cd6", + "acdd4d4c8ee33997f45ebcd56a2d3a3ac5eb5dc2", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-2.html": [ - "e1a49f97c9dbdf5693c0bb814b1b3b0570b2c4bb", + "292f909bcd3a63b8e69ced5ade463a80d79c1746", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-3.html": [ - "c8a7f2e6588a1756c5d9cff1f537b1adb11a6f70", + "f47ec43f5526713610817886c8f1027ebe3fd1c8", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-4.html": [ - "b9c491fd3109c5301182733cb3d710d6d3064eda", + "d15d787f639d928415bfa10423c996bf94d6bcf6", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-5.html": [ - "15dab0bef5b745d7dbac500abfbf626090187667", + "ce391d0069642195d97421b0dde518eb58c30071", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgb-1.html": [ - "7ab4a42fa8c4072e94b0f525c0731daa7cd9ca3b", + "934f725dd3f83082b9172fe6c11a8cc0173c15f8", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgb-2.html": [ - "1aa36bb32bded00a59ff8ba0bf8f5032310bb085", + "f92a06b4504b37237441b34307430ddaebe3e843", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgb-3.html": [ - "7ce48c1b7e90dc7049725c5030ab84eecd5b951e", + "8ebde1782a70e928a38cdd946f0a9917e71f008c", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-1.html": [ - "d3bd36dcf2dd7f067e82589b86e5c12058dc3cc5", + "6e3d135f418e64f01d0d4c78f56e51bb7719da49", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-2.html": [ - "0f468b66fada675f4a27ec2fe6ef06d7ed7e1241", + "a6a61002daf59d1397eccc662c3e136b584f5765", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-3.html": [ - "20da461ad9e0eb344b5c1b105325b80c4cbc26e5", + "464d562b2f64eed0982973bc8666f06199662f04", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-4.html": [ - "6dc36ea341dbf4f85bce63552c154dc067dae16b", + "815ce2f8b6b216b8604b0fdfca737226b176412e", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-5.html": [ - "86afaa70977c01cbba2000d988b2c71c9ac89aa4", + "33c3e33dfce4a9bfd185034922a297c947f84a99", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-1.html": [ - "dfaac14637104f5a46416a21dad0d970b3a5b137", + "0432a3bbd474f15b0c35f9332a786b2f362ee04f", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-2.html": [ - "5247f46731869dba3592b18deb24770c799c347a", + "cf81e3c73f478ec2cb7d4240299e17de463fb131", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-3.html": [ - "8db471c3c054f09035158a0f0c66a6ebe99a2992", + "b3c609fbee8fd999d1bfc3e3bce2280762031eda", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-4.html": [ - "e7a210f48d5ede6f4065ee770cf048918d4e3e3b", + "60aa8563bddcaed647b3230ee19b0aa2b5425a66", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-5.html": [ - "1f1e9ef70fb2b5f9ae82708a741054b1195580cc", + "242ca3933db774d11b668c58062a83fa7ee99f1b", [ null, {} ] ], "2d.fillStyle.parse.rgb-eof.html": [ - "b69c779a7a91a26f7c80e3bada2beb45957dbdda", + "201874c27d5d0c722df2f5192cf47e81565338c7", [ null, {} ] ], "2d.fillStyle.parse.rgb-num.html": [ - "7d9d5eda56cb54ab5a4797f2809a086526934c23", + "0ce1db836fc242f5e3d03a09419ee79dd995e727", [ null, {} ] ], "2d.fillStyle.parse.rgb-percent.html": [ - "ea5529c0ee64ca9ca3e2e099de6067c698f49509", + "9b3de61672a07d7e2acda15c41bd53498e61f4aa", [ null, {} ] ], "2d.fillStyle.parse.rgba-clamp-1.html": [ - "c5816e0660f6ee14a8966852f8305390877e1542", + "587253ad69dd01a70d00d77f9b05fceb7ad1bdec", [ null, {} ] ], "2d.fillStyle.parse.rgba-clamp-2.html": [ - "69a55cfc9a05b56af54bfe344d7f405d7f141397", + "4e8156e60a53771b1dbd4c1dac92507387838d67", [ null, {} ] ], "2d.fillStyle.parse.rgba-eof.html": [ - "12c296dcfb323fbd04d38656ed3c734fa8dcb058", + "5f07d38b6824145a5ce79f74d08ba779b2f42c5e", [ null, {} ] ], "2d.fillStyle.parse.rgba-num-1.html": [ - "41968883df3c6d5c7af617f0f450a69484660ee3", + "0c329c96ea37d08cd602cfcd89ac6c4832715b80", [ null, {} ] ], "2d.fillStyle.parse.rgba-num-2.html": [ - "f7fb6185ea03d0cff5ff788fa92afe65f5262660", + "384a7f412a7effda4567696867369043bf66f5a9", [ null, {} ] ], "2d.fillStyle.parse.rgba-percent.html": [ - "3f1a7305bdede6ac0db010b143c510ddde77df01", + "60ee007577ab4693d978b713f9272c7f1fe110c2", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-1.html": [ - "efa7eb8928a3ec73f68836c3d812e7f1ca00d406", + "eaec0debcbb24cff4927399ddd39f4614eb13c42", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-2.html": [ - "eaf917e2c9cb90602202baac01c66820fe16848c", + "947bbbce8d9d173ba111467d73a74f5425383dd2", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-3.html": [ - "c525f824a9268969e5cefc4f349b9b127d0659c2", + "052a12beae5e6232c27af841cf65b36f1a0425ce", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-4.html": [ - "b7f96741bd5f8d8c81acb28a4513c9ddb087a36d", + "ee9cd4e34e1fcd1876b915dad89daf0d00e1eb4f", [ null, {} ] ], "2d.fillStyle.parse.svg-1.html": [ - "9a9a280c477c4eb40e59c97fd186a14744ca6162", + "0ff839b8cb2a34a47c675dccff2b8df8e78b7919", [ null, {} ] ], "2d.fillStyle.parse.svg-2.html": [ - "26c2abec09cbede7cfcb143b81d0e8ae7195dc7c", + "141f4bfe461378f8a49f2f0694a3cca3a9c5c3d5", [ null, {} ] ], "2d.fillStyle.parse.system.html": [ - "d6c619517669c631f9fb27dbc4ea0c3f7620c5ba", + "3a56389973c9dc5f7eae17229047ccaada39539d", [ null, {} ] ], "2d.fillStyle.parse.transparent-1.html": [ - "9ab01f0cbb6bc118967091b769564832f343799d", + "5b9a834c0b2b50479943bca6e3686ddf21240548", [ null, {} ] ], "2d.fillStyle.parse.transparent-2.html": [ - "d7730a55045b5fb32cd623fc9d3e48e6f0bb3c85", + "a077534c23e1031c7768b2cba450eb095411d5bf", [ null, {} ] ], "2d.fillStyle.toStringFunctionCallback.html": [ - "d420bbfc360c90a719263d76f492d51faabd81a7", + "2a12b05839bfb467b3c5151a12375b508a4b817e", [ null, {} ] ], "2d.gradient.conic.invalid.inputs.html": [ - "ab10f44b2fa77fce437e8fb24fc9075bd4e5e720", + "1a4cde4146f8a5e8cf314f1a88dd4639f7206e7d", [ null, {} ] ], "2d.gradient.conic.negative.rotation.html": [ - "f61b614f705ab83d62e3d1da408fbec91cf1ae6f", + "ba85463b41a9433ba362ae706fde1950d5bcb30b", [ null, {} ] ], "2d.gradient.conic.positive.rotation.html": [ - "ffe958665844175d34120ab7637b4a99a43c1467", + "f8cebbb0d432bd4be753b6d75418006516bfb41c", [ null, {} ] ], "2d.gradient.empty.html": [ - "bdf702fb49ccce08863f4db5cb6534424c3a82db", + "dcc7575254219cd92ae5a8494efee946b9c4261b", [ null, {} ] ], "2d.gradient.interpolate.alpha.html": [ - "e0ed47e03fe40ce1013c87ef07ae10d7df758688", + "13f48f37bf9c3c2a81366198de878eed29be89f0", [ null, {} ] ], "2d.gradient.interpolate.color.html": [ - "e6806d7df10840c970511b8378fd6d3c649f18fd", + "3f7e27abe0fbb59784568c8594c40df1ac724a49", [ null, {} ] ], "2d.gradient.interpolate.coloralpha.html": [ - "33fee527d4b1bbc331654e3ccb10b62a0603041a", + "0d635ed67123575428e09f107523760b1045ae28", [ null, {} ] ], "2d.gradient.interpolate.multiple.html": [ - "adfac66d57d3d468e8eda884e4a178da71bc58dc", + "9e62f3436c6a541e5c539e9af25f388bbc200efd", [ null, {} ] ], "2d.gradient.interpolate.outside.html": [ - "abad0b5cb0144d31fdc94d718dfd3e02e9bcffef", + "b46a7bed360c186a3b8aac86c82d06c2ea51997f", [ null, {} ] ], "2d.gradient.interpolate.overlap.html": [ - "ecd61728c2599076e5f674b94903792a15cd59f3", + "099a3ea81a3c756ef72c8c1f07619b10e6e0ce47", [ null, {} ] ], "2d.gradient.interpolate.overlap2.html": [ - "3b5446950580fb40fa9f148e0c998c401dcfe1f1", + "a4a2955d3bd9efbf0ebd8823589de87f2060a6e6", [ null, {} ] ], "2d.gradient.interpolate.solid.html": [ - "f6fa97475b1a08efd71e9bff3deb16d7e7b8fe4c", + "9ac31626df4f70c2ba8a1ae3c9a737a2fd5b9fec", [ null, {} ] ], "2d.gradient.interpolate.vertical.html": [ - "5297996c065d881f541923f581e387fa0921e462", + "80302761d6028b1aeaf854c96e3381f1952c3f84", [ null, {} ] ], "2d.gradient.interpolate.zerosize.fill.html": [ - "8c6b944cfff6c9dcb7f08fe97af9e3edb79c349a", + "7a8892db11507b66395ad58a9d372ac2d0eab46a", [ null, {} ] ], "2d.gradient.interpolate.zerosize.fillRect.html": [ - "3a7fe18a3477daec3c2958c058bf9996f4248c25", + "7696cefdd0b08506a8ef8b7e498eb63c9ebc1d7a", [ null, {} ] ], "2d.gradient.interpolate.zerosize.fillText.html": [ - "619dc843e82e1ead7b7d7d47bc993df5a68b6de0", + "98ef6c3425a60857ed874bd5fb524b2bfa147365", [ null, {} ] ], "2d.gradient.interpolate.zerosize.stroke.html": [ - "e5fb64820270b0487b0246be97ec7e2eef9c3021", + "283e3874ad1a259616e42b8079fa195d1f542d53", [ null, {} ] ], "2d.gradient.interpolate.zerosize.strokeRect.html": [ - "54f49233b75ee73dda6c2238b81869f457cbc9ef", + "7d243ecbc488df443887d1bbbff211eea169e717", [ null, {} ] ], "2d.gradient.interpolate.zerosize.strokeText.html": [ - "df8553d67ec8ea13a4f1e555e349f58bef551c07", + "bab7c6b6d912be9c3c461abe8d75b83ff47bc536", [ null, {} ] ], "2d.gradient.linear.nonfinite.html": [ - "2a7e270b3419a1f09ad2986cf5cd675b3baabd53", + "89d0092715108d50bd871bca28dfa3e5e602a51e", [ null, {} ] ], "2d.gradient.linear.transform.1.html": [ - "b2b1f78ffd8077e8a345b9d2fc0428d6535ffe2b", + "0ae3220f06f1faa11ddffc2b14744d043dde0c07", [ null, {} ] ], "2d.gradient.linear.transform.2.html": [ - "49ff026226da0fbba619f792fdc8c7e5fec4e732", + "8f761c666fe9252ee3052a44f63c11843ffe4644", [ null, {} ] ], "2d.gradient.linear.transform.3.html": [ - "36f5e469727c13b7f1cab492e8bb87598aa8aa05", + "fdd1e0e9a450fb9cefff818daff279849503795b", [ null, {} ] ], "2d.gradient.object.compare.html": [ - "cc20035d28c02b200d3deb60912f92742324d030", + "9ff3e607c7e460d8269e9e28b7bd3da89d5cf5cb", [ null, {} ] ], "2d.gradient.object.crosscanvas.html": [ - "3b185b4dfefa64bac02e1357ce8e2744aa417e9d", + "9c30d9cbac389636d790f5501edb8883d14e20c6", [ null, {} ] ], "2d.gradient.object.current.html": [ - "b0d5c01cae744cced7fab688a76433faa8c20796", + "95cc893671aab3e7f54073faa7597341235e735e", [ null, {} ] ], "2d.gradient.object.invalidcolor.html": [ - "3150e9c75ae6210fe50ea244864cd0a85ffb7805", + "2be7b3d6fd7fd0267e5e6c86c3d6526f338158a9", [ null, {} ] ], "2d.gradient.object.invalidoffset.html": [ - "b11a1a5c88d0b8ab432497cfb7a1e24f36fa027a", + "76aaed7115a1d1529840bcde80f6923c20dcce4d", [ null, {} ] ], "2d.gradient.object.return.html": [ - "80af9caaa5c5b5b375e8e166892a00976d032894", + "c32312142d2b594d91dd887f867e87fb388f86b0", [ null, {} ] ], "2d.gradient.object.type.html": [ - "e79f8d0b2e9f9287a3c75baae1ae7020bfa5d10b", + "37c77d2f2cb8aeb018bff2079c8f20ad1b273372", [ null, {} ] ], "2d.gradient.object.update.html": [ - "6f363177e3eb338705345cae426211ce11b1e9e2", + "ae78d0d78fa4c1ba484dd48ce195705e0277d14f", [ null, {} ] ], "2d.gradient.radial.cone.behind.html": [ - "4200a1e7b82d605956eaedcb93c89cb875d3b7b6", + "758fbcf360db1620c12b11ec88400d7763972d94", [ null, {} ] ], "2d.gradient.radial.cone.beside.html": [ - "ab183f9030d345e412724702e7397647464b4bd9", + "111cb8033d5c9763dc16e2acfe24ea10733a2d89", [ null, {} ] ], "2d.gradient.radial.cone.bottom.html": [ - "872420b30277ad7b8b293153861beb0e4fc45857", + "a7ebc6ab48a30200efd0c2c7aba3464000c104fd", [ null, {} ] ], "2d.gradient.radial.cone.cylinder.html": [ - "fae7ef86bad7a41ac17e84c75fa1ef2ab9cf8d1f", + "9f270f4aed8f8210fc96bbbb7f751668dcf89db7", [ null, {} ] ], "2d.gradient.radial.cone.front.html": [ - "ff743824962a33146537670a0dea7e0206fcf97c", + "23f4723cd3146594872d87567d66240c0b3f4d81", [ null, {} ] ], "2d.gradient.radial.cone.shape1.html": [ - "7e95eb25b2f4d3dbea9d2dc9cb5ca8a77f206742", + "15ac2bf6d715298d289c580a7e3f4d06f8849fc8", [ null, {} ] ], "2d.gradient.radial.cone.shape2.html": [ - "7ebe7d26c5946d64870d5a3d627133c0e58714b7", + "d1f5be3d4b8bfaf2ef64aab37d4e90b9144c1232", [ null, {} ] ], "2d.gradient.radial.cone.top.html": [ - "5db91b7ff682bb27285cf37c348ebe784ea42996", + "85c23d60be5a19a7aa8b4ae3398bc5404285131d", [ null, {} ] ], "2d.gradient.radial.equal.html": [ - "aeb4990eec67ea6e96983a9c938f191df5ba9315", + "bcb47509207eb8536856f5984038365109a36e86", [ null, {} ] ], "2d.gradient.radial.inside1.html": [ - "102a31bf216bc55de53fc935a87ae99539690ede", + "070a97e49b291bd38f8a116467fa03f0968e9fd8", [ null, {} ] ], "2d.gradient.radial.inside2.html": [ - "5b26ec5ebdd78ef6de1ba313cab0ca4e415d07e1", + "a7b06f16aeb6e5e4bd2176acf6d1f31331ce19d0", [ null, {} ] ], "2d.gradient.radial.inside3.html": [ - "30612d458c5e4e768b0c75b08f115dde1215b10c", + "d7abedc14e9d2b572ae350eb7239a0b5ca821990", [ null, {} ] ], "2d.gradient.radial.negative.html": [ - "ab2ecf2d2d6efeedcb8f20646e6a6a880e89ef73", + "d86812b68c7ff1999c865aae853590512aad475e", [ null, {} ] ], "2d.gradient.radial.nonfinite.html": [ - "b60266181a0609e9e57aa2ffa57480a5b0893eee", + "0c16b415406ef314ae6616833b86a5a1d9360640", [ null, {} ] ], "2d.gradient.radial.outside1.html": [ - "cb1614455e96be722de50c3a5b3b5680b2182d2a", + "c928e1878baefeec22c743fcba36b4f0f05e3108", [ null, {} ] ], "2d.gradient.radial.outside2.html": [ - "685384968265d7833046633e3190d9e6da27fbac", + "7bbe734468b197a813784992219192d98e86247c", [ null, {} ] ], "2d.gradient.radial.outside3.html": [ - "9330fcdefa5e9153a7b6c406287d58ca7d7b92e0", + "7705d0966f45d4f025ee381a900dc1f418ae6d00", [ null, {} ] ], "2d.gradient.radial.touch1.html": [ - "3a13947d3c3c84bce067993d563f240525cb9dfb", + "25e1c019fdd3b184340a1a930f0f623545ad1a5a", [ null, {} ] ], "2d.gradient.radial.touch2.html": [ - "ca6c1b7e1f4bd094cce67af83c3b7223851c7bd1", + "75a077a610d99d8437f99081e85ed66c714b509b", [ null, {} ] ], "2d.gradient.radial.touch3.html": [ - "bd032a94de0740bd9b619acc66259a2b572f17d2", + "a93120c44bb70d67cb07a1b3daa81eb58de6d4bd", [ null, {} ] ], "2d.gradient.radial.transform.1.html": [ - "505dd698294ffd3f20b4bed690c8eceaa6eccb44", + "d0eb13c457ca98f3759f75b862188344cb86653e", [ null, {} ] ], "2d.gradient.radial.transform.2.html": [ - "d8d475fc5a5a46cb801b0043c266e430e1fbe37b", + "6e56c4c63bd56c5e2369ff955bacc082c429fcce", [ null, {} ] ], "2d.gradient.radial.transform.3.html": [ - "ff27cb0cc8405d52a01204daf6c0622352c7ec83", + "426021d0972f949a5f344934174164cf90d154f0", [ null, {} ] ], "2d.pattern.animated.gif.html": [ - "9b975228eaaabf7277ecf9576b2a2d12f26f74bc", + "be69cca99736b930e8efbb6446d2abcb62e15d1c", [ null, {} ] ], "2d.pattern.basic.canvas.html": [ - "f0e50d0df5fadeca68434f6dfd065feda6b3d6d4", + "069263adff669fd27e695a712ae4db53c8114e53", [ null, {} ] ], "2d.pattern.basic.image.html": [ - "31999965d1ea7a101221c7693912f0e2c1517697", + "5ebffe50f62b46fe8ab1d21bf24e1aade8661a7a", [ null, {} ] ], "2d.pattern.basic.nocontext.html": [ - "09e0a0474a120f4261fe51d718b5c7b3a42c4548", + "f24899c302807722fd6c943a0bd3d97296a233bf", [ null, {} ] ], "2d.pattern.basic.type.html": [ - "c07005e20167a8c56427a4fcc02027bfb26275f0", + "c510063d80ed949f298938900a55fbbfee43361e", [ null, {} ] ], "2d.pattern.basic.zerocanvas.html": [ - "eba1ad50fe3739a007527f43f7d24e147bfe3665", + "fbeb7bd79785e7dfbc0ead6cbeacfd9fcb436582", [ null, {} ] ], "2d.pattern.crosscanvas.html": [ - "cbda7d0a2dc618aea77df168f6b8b82b64c1f8df", + "f93b36ddf2a3df97a6f61b31935c85dcf1d428bc", [ null, {} ] ], "2d.pattern.image.broken.html": [ - "9f1bb2d036fbb025ef852e2ea90aa133affb8a79", + "2cf21746ca6c9a63a4d0148b32d5c2fbb611e78f", [ null, {} ] ], "2d.pattern.image.incomplete.emptysrc.html": [ - "82b86241ed8c5febae1c5ea3331491210697dc54", + "fb05cbb455b02a2383e4c67b0e2dac282bf7fd36", [ null, {} ] ], "2d.pattern.image.incomplete.immediate.html": [ - "91d92feab781f02da0ed7d04e4c6dd5d4481f7c6", + "375c1b49c9610dda22277e93e92642b6ee2d7cf2", [ null, {} ] ], "2d.pattern.image.incomplete.nosrc.html": [ - "69d039994f4f9a4520f5a80077f70461b2a6b478", + "d43a0ca918bc19c056ddef0119c51a11a5367204", [ null, {} ] ], "2d.pattern.image.incomplete.reload.html": [ - "0acd089f8eb097c45a1f6005c2e0657710769093", + "984bd36a74e46f95fb0b3213f96a8e76793d6118", [ null, {} ] ], "2d.pattern.image.incomplete.removedsrc.html": [ - "6df23c0c39e7b27176d0af3c71a7aa59f54b26f7", + "20d55436840074f44a5233b8ed9617c4454d8ef3", [ null, {} ] ], "2d.pattern.image.nonexistent-but-loading.html": [ - "fe2722fd88bccc7395482121287db9f4130ac62a", + "2af0a3ed0953ad275169123760aa83581e1b889b", [ null, {} ] ], "2d.pattern.image.nonexistent.html": [ - "71a31e3626271a00d13ef02b824dc767c69d433a", + "b365281179a4ec38dce60a007c09f1be5565234b", [ null, {} ] ], "2d.pattern.image.nosrc.html": [ - "b1bcad566dcb1fce72d11b6342082bf4f0132f1a", + "710749dd547013ef3be985a7e04eb779573a876d", [ null, {} ] ], "2d.pattern.image.null.html": [ - "0a9407ba55ea527297ffe58cf6adb1634e0a495d", + "8ae002d682421ffdca4bc0f578200eaaab6070a8", [ null, {} ] ], "2d.pattern.image.string.html": [ - "c612982e9c8db468eff46e4d4a6cee76a33d5003", + "af32e63bba3144baa8c7fe2029c25d3f6d285a97", [ null, {} ] ], "2d.pattern.image.undefined.html": [ - "27fea1849a9a528f6a218e0e65ece843fecb161b", + "75f50c7a4a06e1d82bff3bd16a844117501b6b8d", [ null, {} ] ], "2d.pattern.image.zeroheight.html": [ - "aebf34e9578399275922ba536736a383631fb5c1", + "cd12c2e88361995589c320ff652f65b95ac78a34", [ null, {} ] ], "2d.pattern.image.zerowidth.html": [ - "0e74363a15c634d779c503ed9ebb6732b506c403", + "053b8ac648617182ac51fbc0e6d1db82a6d812ae", [ null, {} ] ], "2d.pattern.modify.canvas1.html": [ - "066b30a9b83a99dc5876e6b4f88b9edcdb2ac21b", + "0524351fdb14653e70395d509178e6686a2ffe4a", [ null, {} ] ], "2d.pattern.modify.canvas2.html": [ - "10f9c0ab18b08f16955303b6cd22ada2a05dba80", + "6e50a5761c083923488fba6018e0dd82d24bebce", [ null, {} ] ], "2d.pattern.modify.image1.html": [ - "5ac850a446dc8cfa99fd9b7480eee7fcc05ecb10", + "94f55c84f60fb6c1c2d73dbc9459aa57822564fa", [ null, {} ] ], "2d.pattern.modify.image2.html": [ - "1c95aa0909bcf55dd5820d7aea3d934bb702f420", + "1025d195f2112810a03b33366c346b2a29a487b7", [ null, {} ] ], "2d.pattern.paint.norepeat.basic.html": [ - "6b0fb8c3090da7dbf7a76ba6a589cf0fbdd21f0a", + "036be9e068111601449e15f63c07b409828714d6", [ null, {} ] ], "2d.pattern.paint.norepeat.coord1.html": [ - "1b1b9bb1b5803fe6afe974c58c0ffffb74d98d84", + "dfe2b8589e519bafe353108dee04c2d600b660b7", [ null, {} ] ], "2d.pattern.paint.norepeat.coord2.html": [ - "c483e4f64e2ef8b5b11ae35d3cba944c5fc1d9cc", + "dfd637211dcf1e4e2520c5d73838095ca07cc8cd", [ null, {} ] ], "2d.pattern.paint.norepeat.coord3.html": [ - "733f728ad6c0cc72f2c7850cf0baef4c0cfb9836", + "5456a543da2ef9698e9990ca39fdc96707b8e775", [ null, {} ] ], "2d.pattern.paint.norepeat.outside.html": [ - "a7279943d474d5f20ff9a6ae90bad2efefc396da", + "4df0cdfe6721269d4cb35f239a5c88d6820dbd81", [ null, {} ] ], "2d.pattern.paint.orientation.canvas.html": [ - "b45c95be1f82fcb7f4ffd418804b6205061db4e2", + "f0ad70fc1e712c7a88b56e0e59e9b5d0cd46ebb8", [ null, {} ] ], "2d.pattern.paint.orientation.image.html": [ - "a618223b06043df2112afe79c683d838efea4209", + "b45f4ab773f4405a335e2baff8626912bce0fb46", [ null, {} ] ], "2d.pattern.paint.repeat.basic.html": [ - "238f155b2aec9a8318843f04a64946c1212350b8", + "8999ac4e44421bf439a3d71812876b20d0f91784", [ null, {} ] ], "2d.pattern.paint.repeat.coord1.html": [ - "cfc270d379d2062d9181823ed5d51132b6ebf82d", + "8dc6402d55410770df24a6419ab43e9ac34224db", [ null, {} ] ], "2d.pattern.paint.repeat.coord2.html": [ - "b05feec9374365de956465f1c2151fc5e7aaf8fa", + "9c03d02898b7ab485043e476fb7b3349bcb0b030", [ null, {} ] ], "2d.pattern.paint.repeat.coord3.html": [ - "223d8c021554dd34e3c46abf5c8fa7200254d917", + "0dc0a865b4a063d560254c47525b946fd7f8269c", [ null, {} ] ], "2d.pattern.paint.repeat.outside.html": [ - "ca140400d8f098829a376111cf664e9960f6093d", + "b939195877796763a42d37e9e12f00e23458c089", [ null, {} ] ], "2d.pattern.paint.repeatx.basic.html": [ - "9f2f871c0b0743d9bcd99fb423ee2b629a400c74", + "8c77908cd1b988d324027690fc99cf128b3efc65", [ null, {} ] ], "2d.pattern.paint.repeatx.coord1.html": [ - "38ad51b237c24fd3f8e923f3a28decf32fdc50c9", + "4c7fa9d4981f429f3b702c9dee37d05a35de0a1b", [ null, {} ] ], "2d.pattern.paint.repeatx.outside.html": [ - "ba01bf3092d3a61eb5c5a071673bdf2ff87c6d0a", + "26ee85e4d1df1248d3664066644102ba701bd0c5", [ null, {} ] ], "2d.pattern.paint.repeaty.basic.html": [ - "bb07aca80e153bf31f23b2bab15b862f0081ad4e", + "c28ff155eba6ce2d64fb5abda7b32d0ebbb3532b", [ null, {} ] ], "2d.pattern.paint.repeaty.coord1.html": [ - "c7ec99e720a6728e1b4ec1117b7bfaa66d23d0bd", + "7f2bb163f36831fd463f0f0febbdeb33beffba43", [ null, {} ] ], "2d.pattern.paint.repeaty.outside.html": [ - "a3267d970177a1f61e8213a30db316a4d8923f43", + "7be743ec2b63d60a18b852c29228a6901147bd3c", [ null, {} ] ], "2d.pattern.repeat.case.html": [ - "ccbef07f654d5309fec5fc7a7b1d9b9a86a2f0ff", + "d998bbeb2fc17170ef7cc66c004ade6f7b14eee0", [ null, {} ] ], "2d.pattern.repeat.empty.html": [ - "48db7da219a420139a2b558adec24352ec2b68da", + "2810efe70001727161af2600359cd55ff0481602", [ null, {} ] ], "2d.pattern.repeat.null.html": [ - "7a4b264d2a8866b88e89b9527e8f50760d611c0f", + "0de121a4f5b935f95da0c0eea556c22a7bb1f1fc", [ null, {} ] ], "2d.pattern.repeat.nullsuffix.html": [ - "b28bf57036cec885c9221c36c92a2b1f8c9c355f", + "33d601d974c405232f89f6e60c45fea382e869c7", [ null, {} ] ], "2d.pattern.repeat.undefined.html": [ - "ba40af07b8d537b5233907dbb7814ec0236ea0d0", + "f0a7ae84884da9659712f7402fe3c9a46af0ff49", [ null, {} ] ], "2d.pattern.repeat.unrecognised.html": [ - "5c26a41845c98c82c8cb041e1a50ae4e7913ae91", + "cdcc7d65237f510b6615304eb8562133ffcbf53b", [ null, {} ] ], "2d.pattern.repeat.unrecognisednull.html": [ - "f9b47f5be6c47c727f1ada2da5a87d39d5be8ca0", + "11c9ec0ebb0430bd7b3a5c95622c3c7baf56b096", [ null, {} ] ], "2d.pattern.svgimage.nonexistent.html": [ - "1f25bbc82adeb5425bd646333c608c717818d75c", + "8cd3983dc32e38fbbd891f0e39c3010c00f4f32d", [ null, {} ] ], "2d.pattern.svgimage.zeroheight.html": [ - "b18611353ed7d9cd4a47615e17ae2ddc96dadd6a", + "11c07e36dee15da12136c2b7830d1e9b1f606abc", [ null, {} ] ], "2d.pattern.svgimage.zerowidth.html": [ - "2f93d7c342aa4320edeaf87ce9b3d1e4ea85f4a8", + "a8b8cb1351d2acc61459f34cc598f7db923e4193", [ null, {} ] ], "2d.pattern.transform.identity.html": [ - "775d360e1c00df827754b6db958db3fe33175aad", + "21da30581d622ba6cba2269eb4115a2cd6c73e5e", [ null, {} ] ], "2d.pattern.transform.infinity.html": [ - "8650ed9a1d1a9393e8648995670b6d776e036f0d", + "bfb22aeb1424bc4500c3593bbdb70ab9b25b7d56", [ null, {} ] ], "2d.pattern.transform.invalid.html": [ - "ebd2801241cee67eda8eacf9d2fa789e60821ec6", + "13f0459e9f72f6f94d0c194190044e9b88a05295", [ null, {} @@ -586779,7 +587577,7 @@ ] ], "2d.strokeStyle.default.html": [ - "91542e2892b47d323ff91ff28edb25721e9014bc", + "a432d74a428160d14ecc604ef305d6d990756379", [ null, {} @@ -589385,392 +590183,392 @@ }, "shadows": { "2d.shadow.alpha.1.html": [ - "38d3bd74eeb299971d367eb9e05aca88af86056b", + "8888ae68856d37dad31b0138b59a8115039645bf", [ null, {} ] ], "2d.shadow.alpha.2.html": [ - "ae813036b8c573d7e89c8499dd7237dbd9482d7c", + "534d3dd16d64512afa2e83376ed1e831cf3c985b", [ null, {} ] ], "2d.shadow.alpha.3.html": [ - "42cabad36a059d98787f9e613ef721922630f70f", + "468228208c6de71b0485a1d60966f036826ce40c", [ null, {} ] ], "2d.shadow.alpha.4.html": [ - "96af9df0faab0c3c582edd0819bc4e82fde7627e", + "2932c9dfe1cd881a8b4b6bffe27abcc1c18fed87", [ null, {} ] ], "2d.shadow.alpha.5.html": [ - "2f0b6838d8091408659925f78f725b01e8b02c5a", + "ffa9ed8fde8c82b38d4320b34c8cc84fa083718f", [ null, {} ] ], "2d.shadow.attributes.shadowBlur.initial.html": [ - "4d1d71c2068cf7c96fbcd3f5df70d744c1773318", + "b688156546c79782097ffe7adca3eb6c46a905b1", [ null, {} ] ], "2d.shadow.attributes.shadowBlur.invalid.html": [ - "cbd68c92d0dfad5b03e42635d256294157b9b998", + "68f5dd41bcfcd518359eac85f24e86b81fa082ff", [ null, {} ] ], "2d.shadow.attributes.shadowBlur.valid.html": [ - "1e6a1a80a76dc651eb24bb9c287fb5e060039842", + "51063a6ade1a87ecd92c890e411060400c66708d", [ null, {} ] ], "2d.shadow.attributes.shadowColor.initial.html": [ - "5e02f3d1224a2e28e872ecc5edc16e24078b96cc", + "f4d0d33d6d9af347af413fdfc1436034a4a3c919", [ null, {} ] ], "2d.shadow.attributes.shadowColor.invalid.html": [ - "68b82d842e4e3e5b2b82a0b8c3f9eb13d41deacf", + "73f835dd96cfd808bb982aa83e8ec938bb38678c", [ null, {} ] ], "2d.shadow.attributes.shadowColor.valid.html": [ - "84728f03089d478d8d88e452749a2e0f36b37c29", + "bc86c3d6c179d55a4b077ea0a9d6184f726d247c", [ null, {} ] ], "2d.shadow.attributes.shadowOffset.initial.html": [ - "f15e383a0678bce9f52e5be3471ef1a1b89e7856", + "056dd1607b3a3cc03d44167f77c835dae09a186b", [ null, {} ] ], "2d.shadow.attributes.shadowOffset.invalid.html": [ - "c9872cb49d148f56e0c432d9f04512b73624d277", + "1567edb16afc9fe518e0155bbc2a0b26d442d3cb", [ null, {} ] ], "2d.shadow.attributes.shadowOffset.valid.html": [ - "dc89870e778f2c225f327c73b1239e24ce6ddd38", + "04fe18c3915cbdf5adaccce7dd62a678ef554df6", [ null, {} ] ], "2d.shadow.canvas.alpha.html": [ - "5ad64e16fdf035f812714033118864768a3791da", + "222199e6463982df871004f74b710fb6e67abb1b", [ null, {} ] ], "2d.shadow.canvas.basic.html": [ - "fd70884d02d0e063b6dfc7de96943ab7f9a65046", + "e752c8f180cdcd6788da10d2af50b4d99abc4735", [ null, {} ] ], "2d.shadow.canvas.transparent.1.html": [ - "f18b7d7189ed279c029429a823794edc892f6b3c", + "7d159328a43f5ffac2cf2abcc9e9394cfb019c30", [ null, {} ] ], "2d.shadow.canvas.transparent.2.html": [ - "c9590543ea377f5de17ec1d6cbda6738f77f67b1", + "4326d42bbe93e233718af238acbda171b6bd5f3c", [ null, {} ] ], "2d.shadow.clip.1.html": [ - "f952096bbd67e13f3ab179dc2544515ff3d0400f", + "6caff8b92fe9108b3855a4c7889258b4971d16c9", [ null, {} ] ], "2d.shadow.clip.2.html": [ - "22208c5ad33947ddc7b89fed9c9d3ea3d7539a4d", + "a5b05237e68c6615fc1474625f2d07a54d652b98", [ null, {} ] ], "2d.shadow.clip.3.html": [ - "5af9b012adc09dc2c3aa4ea4688f7e0ccdb99e63", + "b7652634fb8fd91e30d3bd3a3119f43dee5c1684", [ null, {} ] ], "2d.shadow.composite.1.html": [ - "28a82e65868e78beb8f93194643402304c09cc14", + "d64ecb497295de1d6a94fe9107d048ce6fdac8ae", [ null, {} ] ], "2d.shadow.composite.2.html": [ - "aeb6dc1053d272581f2a82b6730f01504dc42cc4", + "abc6b98d7272fc20b51745f873d6d93b94e470a3", [ null, {} ] ], "2d.shadow.composite.3.html": [ - "9a0c02e110f96d5c261354fe1bc140e49784ba00", + "45eebd9eb0aed6ea7f16feacae0113fcdcfb18b9", [ null, {} ] ], "2d.shadow.enable.blur.html": [ - "ffe70f1c38552995102863c8c387b096f982c8e0", + "7efa459c2997a0b78d13c2c9854a09c0bb12b367", [ null, {} ] ], "2d.shadow.enable.off.1.html": [ - "e3adc9ae896006670d267ece05668c8ea6df2740", + "953ea04277c3090f450ee9b3a1323c1ab45a5902", [ null, {} ] ], "2d.shadow.enable.off.2.html": [ - "8dd3fc32d787b877238be30cef711d6ffb5e57f6", + "2a8cf7301dd5ad2a5bbe808f3d3e3b796a21aa7c", [ null, {} ] ], "2d.shadow.enable.x.html": [ - "54fa86e11547dbb428063e1f0cf955d78af36d53", + "6eae985fd681caa1f36cc9e02366447c9676bd29", [ null, {} ] ], "2d.shadow.enable.y.html": [ - "7295d578be32ad37c3c48dbdaa07f65ca913ba39", + "2025babca69f1c854f242378f5c11ec25d10364a", [ null, {} ] ], "2d.shadow.gradient.alpha.html": [ - "7ae83ebe9af9cc3308b3eda3d15ec2fadc26a3aa", + "65f4fdad276337cc8f436f113232fe82e8c2db49", [ null, {} ] ], "2d.shadow.gradient.basic.html": [ - "233770e0d00a0004a31fd59ad2d6384fb6dfcad0", + "a7c5efe7380f28b972557d145ce21a6e3e7a079b", [ null, {} ] ], "2d.shadow.gradient.transparent.1.html": [ - "2427c7f59d5e170e3b4c2c001f2e2f382fa5e2fd", + "1c11f75e809646674e55621fc984403250f8403b", [ null, {} ] ], "2d.shadow.gradient.transparent.2.html": [ - "e27b19cc0af02c91633de22e241ce3bd5c3cd0fb", + "244aecab21c27886a70d65eb7dda8d855a239510", [ null, {} ] ], "2d.shadow.image.alpha.html": [ - "2c8133f6309525c96eaace32d1b272f8292503f2", + "8d9022d61da7980dac5201f248af355bc2e63797", [ null, {} ] ], "2d.shadow.image.basic.html": [ - "f91b195e4c041ad4ccbc22ed6dd13503a2a2018d", + "351e75152214af6b352529b616cbf9f68b9f6093", [ null, {} ] ], "2d.shadow.image.scale.html": [ - "c0edc313739b8981f3201825ddb49200497b84c6", + "cbec7ccce16518c940732ee5b4f551ee203e6552", [ null, {} ] ], "2d.shadow.image.section.html": [ - "2ff2bf2a2449d85f399a7244fdf70677adcf363a", + "472559b736dc09effd4d9580a13e43b0e9ae0a45", [ null, {} ] ], "2d.shadow.image.transparent.1.html": [ - "c152dc2962b986d39683a78e4f983a0852e50af3", + "768e961df0e69c5a34a0274cf5892d1788ea819e", [ null, {} ] ], "2d.shadow.image.transparent.2.html": [ - "636c72d9d6bed11b0d197a52f71e949dd1d1b44d", + "a445b7aebe83ccd9ac283cac5e94a503740527b5", [ null, {} ] ], "2d.shadow.offset.negativeX.html": [ - "828fe89f000c5d4cacdc2c40b0354ec44f44d16c", + "0a73b07b6c2fcd204d5078a686d9e0d8859a68b1", [ null, {} ] ], "2d.shadow.offset.negativeY.html": [ - "daf9b7eec0cfcb1e96af4ba843fd0863fc1e4c27", + "04c9620fd2093c6769cdee28b5d9ef0c33ccb7d5", [ null, {} ] ], "2d.shadow.offset.positiveX.html": [ - "9d627ddfddb1aa8e804ac0358fba25905258d25a", + "12544743852f1f3218c725071de8f70a753f4303", [ null, {} ] ], "2d.shadow.offset.positiveY.html": [ - "619826342e895c027e55dc1c219203aaf768d5e8", + "fdcf25a435f139a17f1d2c4e076dbe8219d0d01f", [ null, {} ] ], "2d.shadow.outside.html": [ - "331dca9246ccbd6dec0de43e1ee9d9bd87eb75af", + "fcf2129488944a01c1702f25804a9e459553f3f9", [ null, {} ] ], "2d.shadow.pattern.alpha.html": [ - "a995a4ab1f1afd9cd3f9e007f6dd102f1006256c", + "8e602d6c2b273823ca51bad47fbfbd3afd7bff61", [ null, {} ] ], "2d.shadow.pattern.basic.html": [ - "adb8aeaedf67ac33925f12c9f16a4c68d8c5a751", + "c776d6bc3bcbc4ac2b6c761bb1314456d088b62f", [ null, {} ] ], "2d.shadow.pattern.transparent.1.html": [ - "37af35d44d24fc12ac4815a203078573b2d48ccc", + "c3dca30138b7378941a314072b4b6890f5117a1a", [ null, {} ] ], "2d.shadow.pattern.transparent.2.html": [ - "e96e9e33a473b4292022f7cdc990b03935514ce1", + "ecb82412be2ec42879012ec1a05b5423c4732528", [ null, {} ] ], "2d.shadow.stroke.basic.html": [ - "c5834b86dcf4c9b296181e3d69fcb8c6e38164ad", + "6146ba7d196659443d1ec80ee4be37176df462f2", [ null, {} ] ], "2d.shadow.stroke.cap.1.html": [ - "ff6a1c4c1dff5012213486a832f8ead364b2b74a", + "5d6e53a68515e9a267490af9c9552f8475277367", [ null, {} ] ], "2d.shadow.stroke.cap.2.html": [ - "40fd22a1c35482490b162256b398633003bd775a", + "f18a9b6cc5362d298f3feda75e39335f84c0eaae", [ null, {} ] ], "2d.shadow.stroke.join.1.html": [ - "5c7cda8e7b9842ba8306827c7ecf16838d7aecd4", + "46735a918f25bc61edd1fcfa2823b419c653695d", [ null, {} ] ], "2d.shadow.stroke.join.2.html": [ - "0ed3c90cb857d1a39a9c65c47b752edbdd584c23", + "85abc24e817904ec6814185208c5376461a01b5f", [ null, {} ] ], "2d.shadow.stroke.join.3.html": [ - "ada4e159fa0d61ede51393b0248bae85a68e9ec0", + "795c6137d5d624c6e586af4f7df45d7e24a123f4", [ null, {} ] ], "2d.shadow.transform.1.html": [ - "57450512775eca6fd82e6c42bc2439a90e6823e4", + "abfb54e5dbff4f25e057f0ee49b411141c5e5f84", [ null, {} ] ], "2d.shadow.transform.2.html": [ - "dc97c0672cf4a87d9cd0c4d515c9049cb27715c3", + "736dd4efa4a96994d0bd6f399de0178a9bec3ef7", [ null, {} @@ -589779,189 +590577,189 @@ }, "text-styles": { "2d.text.align.default.html": [ - "5c725d4a93c43c4bf99b615d045263df8692f79f", + "d32f7831d056202d71ea387333cd090bcf591b8e", [ null, {} ] ], "2d.text.align.invalid.html": [ - "7c69b5ae34aea5376bca7b6b2a65b7b533eea59d", + "7b7f33766aee2dbbad16070a70101a50df2cccb1", [ null, {} ] ], "2d.text.align.valid.html": [ - "c8fb253a7b32f3e291164e7dc06df743dab9be8e", + "a568530f3bddc1c5780e4718a6a1a1476fe46320", [ null, {} ] ], "2d.text.baseline.default.html": [ - "8e442254f7a8c4ab4a3ef405038c57d3f84d620a", + "08e8512c6674891a4b7a0dc4c57bbdce8ab7ef9e", [ null, {} ] ], "2d.text.baseline.invalid.html": [ - "1b31ce1be04b1d92d3f71cc8f073d3c75c851a12", + "e527a77288d56512598c58e8dbf82b7e001b30a8", [ null, {} ] ], "2d.text.baseline.valid.html": [ - "3e1cb35811337503236e861dac1a3755068fd2a5", + "238f6ff7dc81cfcd2da245ff6e30adb4281eedde", [ null, {} ] ], "2d.text.draw.baseline.alphabetic.html": [ - "5bbd90f6375d81baacb8fcd98406f3dfeacad0df", + "0f70a475c81d22b9f622b7d6b103a14a3eed4205", [ null, {} ] ], "2d.text.draw.baseline.bottom.html": [ - "311be39f4fe8434986656902bc9419a6204141c4", + "706d7743af70db6bf4d84523df32a8c244aa021e", [ null, {} ] ], "2d.text.draw.baseline.hanging.html": [ - "65aa7cd176e575de585ced59cd010222ff001638", + "7b3a0a9373bc87de31ce263c5bd6d2fc482ef43b", [ null, {} ] ], "2d.text.draw.baseline.ideographic.html": [ - "84f126200a9074a57855d97290730668ec50cc0b", + "8da9aabb942a17ad8cd63534539be447f9f4d09e", [ null, {} ] ], "2d.text.draw.baseline.middle.html": [ - "a09a2f3153ce1ca3df23bbe4f188605de0f6ad2e", + "ebc821c2bbd65f15f73bb043b508808761f2fbe7", [ null, {} ] ], "2d.text.draw.baseline.top.html": [ - "b0c72c41eadd1431761b8c07b776ca6c7cf92186", + "21e505ec7952d2917f73e814f44d05e6929a7b3e", [ null, {} ] ], "2d.text.draw.space.collapse.end.html": [ - "57de14adc2363683ae218b32fe81ab1a3a37dfc7", + "15b802f1c48989df9e19a8c300c4363411e00552", [ null, {} ] ], "2d.text.draw.space.collapse.other.html": [ - "e593b9769e58ec34ea73b1376d7dc4357170fb9b", + "3454cfb6fbacd51a78c4c2c77da0a29aee22876c", [ null, {} ] ], "2d.text.draw.space.collapse.space.html": [ - "6e24007b1c9844d44a41d79183a1e861c993c653", + "20c5f70569daeb597a4aca5f52c591905530672c", [ null, {} ] ], "2d.text.draw.space.collapse.start.html": [ - "5ec776e324083b173d91743a79a592045f94c763", + "c06efba5c856e0c6ecb8701dd0c961cf29675b37", [ null, {} ] ], "2d.text.font.default.html": [ - "135c9bd84a8032d7092bf1ea89167fc573fc1a49", + "c6ac08484377938c8bbdd3edb7ae90e127a20253", [ null, {} ] ], "2d.text.font.parse.basic.html": [ - "57db32b6881b76634340c908a3bfb9180d5b5888", + "70efec7743bb675391d8eeed0a9494cc53aaf0b4", [ null, {} ] ], "2d.text.font.parse.complex.html": [ - "cd6235ed3ec82a21589cfd64aeba4117700ed0d2", + "7f11506b38231dfe647a9fb73225929ca17e4443", [ null, {} ] ], "2d.text.font.parse.family.html": [ - "f5c24bdd503beec493ad622256ef30779b87a1d8", + "c53bedbffcce46e8966cd37be7ad2a1f39da3a75", [ null, {} ] ], "2d.text.font.parse.invalid.html": [ - "e2735440eddb71215845857ae7811c0bf74ccdd9", + "4fef0b484603f83d1646e55080943a6f104d0a1f", [ null, {} ] ], "2d.text.font.parse.size.percentage.default.html": [ - "65bb5549c4bff8d67fbf1d9aec5f2772178aa9c9", + "cb245f18a2f6edd541868f19809ac3cc2c68f93e", [ null, {} ] ], "2d.text.font.parse.size.percentage.html": [ - "18476b3b7adb795b27fa87bcdd65b2809b1144e8", + "519a1eb0b4a357c8b1e04bc642c00da25ec5f6b6", [ null, {} ] ], "2d.text.font.parse.system.html": [ - "707be4ee10cf4c8ae527c8e8dfe71184e1100e51", + "10fa0cb36de6383ab7b1e19d7972d119b9ce0217", [ null, {} ] ], "2d.text.font.parse.tiny.html": [ - "e5215f1bc55df436200bdf99e0f988db2b13cf31", + "10c9d2a0e0a60236c1f6a8e148825b01429d5282", [ null, {} ] ], "2d.text.font.relative_size.html": [ - "8040d3891607afa3dcd4b4df94b91c0aa68db7f5", + "97b9718b14be3f290a7fd5c830a32413dc7e3b16", [ null, {} ] ], "2d.text.measure.width.space.html": [ - "4d7ee4ef75837e3dacefa6de1b72f2d7d46658a7", + "b6f2ef50f761ae63c95b4fbf1a067f78669f8c7e", [ null, {} @@ -589977,154 +590775,154 @@ }, "the-canvas-state": { "2d.state.saverestore.bitmap.html": [ - "459e0d543f433cdc063899ba14904085b65e5634", + "6814679aba8380d0e255407544100b85ae29b88c", [ null, {} ] ], "2d.state.saverestore.clip.html": [ - "6d1ab02f89d487c5bcd330f2214c5a4a2f558d96", + "1ce44ab147af4800af4f6a5b2d07f4723029b287", [ null, {} ] ], "2d.state.saverestore.fillStyle.html": [ - "a57274cc674b87cd2e69de6cad622c41e485d852", + "1eb8360e5f087210168099802e91bde32a65f8be", [ null, {} ] ], "2d.state.saverestore.font.html": [ - "ff674ac3f6de792068358967e3b8f8c746a13806", + "8cb4d171bbe29542f3b3b2eb118ab8b5ed97267e", [ null, {} ] ], "2d.state.saverestore.globalAlpha.html": [ - "db48f9693ebfafdbf99a6c7ba9b59d6b64481e0c", + "f3dae5ff51291e470cdf32e12e2ce1a264dac099", [ null, {} ] ], "2d.state.saverestore.globalCompositeOperation.html": [ - "cbc4198bbdf4beda74c4e36507ebbb9b287b710e", + "fed0ceec3bf4be89905050bf0253d418be8b7dae", [ null, {} ] ], "2d.state.saverestore.lineCap.html": [ - "fafbde6201b8780599f6680970e70371b59ec1c5", + "90c52ce5646d56063bf337044c7011bef55a232d", [ null, {} ] ], "2d.state.saverestore.lineJoin.html": [ - "46d3ec681daae5b63a51b440d1310d24f40803be", + "00495d9fb64827415d0e6b99bfb831d9d53fd1ae", [ null, {} ] ], "2d.state.saverestore.lineWidth.html": [ - "ac96381a7d546b04dcd8e296ee7c4b02c3da6bc0", + "0705878d0a978853c930db0ccf418ee9cb7ef78f", [ null, {} ] ], "2d.state.saverestore.miterLimit.html": [ - "ab3c55eaf83e2159e1e33044726843c472aa1601", + "efd2207515710759908794b3f5b36806edbef21b", [ null, {} ] ], "2d.state.saverestore.path.html": [ - "a8023f1448c8e83e6df7c6a6315828da89fb9ccf", + "5848ae560caad495b0afc513c2003ffe5c2d93d2", [ null, {} ] ], "2d.state.saverestore.shadowBlur.html": [ - "2525271fe73ff864013bbe54ebf3f10826ecd5e8", + "c5699b78fdb14a1cad27a788035fe411a305407f", [ null, {} ] ], "2d.state.saverestore.shadowColor.html": [ - "64690e3ef906866171ce252b3d5d00b1632be912", + "9b6a435202adb255196f2da8b54332b11e39ae29", [ null, {} ] ], "2d.state.saverestore.shadowOffsetX.html": [ - "a140c3fa0c41946af7794080530a2080a3fb9bb0", + "427a44a3735b17d6dea4116ba71826bfd798046e", [ null, {} ] ], "2d.state.saverestore.shadowOffsetY.html": [ - "8fc9b7c90792ef8fd02fe36943d3e6627d2203f8", + "b711445c209001dcd1d3ddacae8f9e3c3916b5fb", [ null, {} ] ], "2d.state.saverestore.stack.html": [ - "252074f41a5e416808157c00b975d3565ba1068c", + "122c5434738f6cea1b2a811bc900f9a50477adc4", [ null, {} ] ], "2d.state.saverestore.stackdepth.html": [ - "433e83c58a249b7116fd7f2ed827c824887969ac", + "6fa591d06a02e6990ad491453ffc12339f49e8de", [ null, {} ] ], "2d.state.saverestore.strokeStyle.html": [ - "aeae2f8b38481c468d0011f5dd97910a9c01ff19", + "9ccaac7e7aa47a332d02cbce9b2740aa2d395316", [ null, {} ] ], "2d.state.saverestore.textAlign.html": [ - "3bac234ac306a861e06ca13616a76c1265fb8957", + "a86d62a8b78ce1a7db8b8c5eeadf16b69822a858", [ null, {} ] ], "2d.state.saverestore.textBaseline.html": [ - "238ee7eba244177208e6f8a9bd495ddc554bd1a9", + "5cbf712fb17cbd2a30d84f12446331da89a3bbd0", [ null, {} ] ], "2d.state.saverestore.transformation.html": [ - "6d035ef9ea32e29702301a90f64dd6062c66dec1", + "6edee8ae84d4a2f47198c8864faba7356622263f", [ null, {} ] ], "2d.state.saverestore.underflow.html": [ - "bbf6433e174de179774b701be6cffaffcf13a217", + "763f26955623808ee5a8779a163b5a70f60c5e2f", [ null, {} @@ -590400,336 +591198,336 @@ ], "compositing": { "2d.composite.canvas.clear.html": [ - "0dad0853d3c3e41d398394d306b06f537200515b", + "453d5e7f3318fa3a90424fd9c8b3d7d9e5ee8d21", [ null, {} ] ], "2d.composite.canvas.clear.worker.js": [ - "a06cbdc206ac66d914312ba98a4866c59740246a", + "86407784bdf4a290766c228255ceaf52b5cc69cb", [ "html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.html", {} ] ], "2d.composite.canvas.copy.html": [ - "a89736b579386ae168d5aa7c23867e01d05083d1", + "a54b09bbfc499997e3ada72daed51a7ff80c6002", [ null, {} ] ], "2d.composite.canvas.copy.worker.js": [ - "a8fbc74c1c31a3271a31979ebd7e4b9eec59e485", + "42d7ec23c2aa6da083ce7f7659f9ac1568efa934", [ "html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.html", {} ] ], "2d.composite.canvas.destination-atop.html": [ - "dc53e8b5f0203ba94aabebbee8960ef561020336", + "d88afa5ded5191b619f0db4677241222f94a7c52", [ null, {} ] ], "2d.composite.canvas.destination-atop.worker.js": [ - "fcb944543c01b2776484cd17f005ba0da5a75999", + "96627b03ece79079962e09e463af9d6cb4962e68", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.html", {} ] ], "2d.composite.canvas.destination-in.html": [ - "73140e11df149a03ad183eaef14db31612a3efb1", + "54223ee5fc925948491e26b016d7944b372da969", [ null, {} ] ], "2d.composite.canvas.destination-in.worker.js": [ - "e5d7f0b039ffea3fb431af1d3d99b31297ba34d4", + "525ca84f478514cbe87f090dd3d9dacfda4e8cff", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.html", {} ] ], "2d.composite.canvas.destination-out.html": [ - "5f89aa29f7f4c5f8fec59c2a2bb929541533c249", + "1b9b88a9188b2ad718bb29f03c8bc74748bb24f2", [ null, {} ] ], "2d.composite.canvas.destination-out.worker.js": [ - "a4436be0d2f489c2b9a457368c3ce3bd52e47613", + "aaaadd71851a69f3c25f66f69ad88ce47d3ee563", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.html", {} ] ], "2d.composite.canvas.destination-over.html": [ - "d18f9dc8641151512ccc081a1707e6c28f808722", + "44d6a5bb02e7a7478799f3953b03fed0a60f1ad2", [ null, {} ] ], "2d.composite.canvas.destination-over.worker.js": [ - "967e47b34d20dfa98298cd7f3e2e0b30bd52e357", + "b13e7b1b68d5a747c49d3cf4ce8558af10265f4f", [ "html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.html", {} ] ], "2d.composite.canvas.lighter.html": [ - "9de44add68341abf38f5291a7e0aa48f9bb780f0", + "65186a7753e295e72060a56f93b18a26f56d68ba", [ null, {} ] ], "2d.composite.canvas.lighter.worker.js": [ - "849d4a6a6f80642b9887e77a78af9fda226b8097", + "e8dd516d2a599ceb4cc3d5b54dbcff87cc182b3e", [ "html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.html", {} ] ], "2d.composite.canvas.source-atop.html": [ - "cf9d5cfcbe1cb7e50664107b2337048e6d4be050", + "2d0b6a6ab6ff371895ad400812ab5b222a691c99", [ null, {} ] ], "2d.composite.canvas.source-atop.worker.js": [ - "7601db1f5aa0098fdd02abdbdbac8e06a72bedd3", + "f40ef4493156bbe8c41000edbfaab609ae8e864a", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.html", {} ] ], "2d.composite.canvas.source-in.html": [ - "30864d65a33b05d37dbcceab56fd99cd7455ddec", + "28cdc267236387c6299ed004d217a4f4440c6b5a", [ null, {} ] ], "2d.composite.canvas.source-in.worker.js": [ - "5b21b35564a7fb87325543b05549fb92c034a1d3", + "4f116ac6224b5a0d077446bad292b4bbf520b833", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.html", {} ] ], "2d.composite.canvas.source-out.html": [ - "d698540260fd3822b9e1e2df0d7d9835e93d7611", + "25d5e0737a4c951ff27379c898dc931f05854bb1", [ null, {} ] ], "2d.composite.canvas.source-out.worker.js": [ - "cf5b0a9ac470fc693e696197cd980f5a5bc9e254", + "ce1bdd9f359fcb985efbecc4dbf77dd012935553", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.html", {} ] ], "2d.composite.canvas.source-over.html": [ - "e1e86c7979f8bad23d8ff632400e2289642fdd16", + "8e6b68621c001cc2c40144e7e957d4db710778f4", [ null, {} ] ], "2d.composite.canvas.source-over.worker.js": [ - "d61ebd1e56a72d552a592ef1c6bf233cae8f3237", + "7f4355c483fce333f580c521f3432e69f9f208fe", [ "html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.html", {} ] ], "2d.composite.canvas.xor.html": [ - "c2d1f52645451a59983dab25d5e8471e781f4655", + "a15811a52ea5761ba42a6803f452bfc35b090aef", [ null, {} ] ], "2d.composite.canvas.xor.worker.js": [ - "1b2286a87ac487fb30506e7c5fa20129e4e57d9f", + "929f6f7eebb7f691f5d2d27a63584b887fe98363", [ "html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.html", {} ] ], "2d.composite.clip.clear.html": [ - "842bcf19c58067e7a92414e082f5042ab4d850a6", + "f0e9989cce49d19793b89c357eb892a5073a9886", [ null, {} ] ], "2d.composite.clip.clear.worker.js": [ - "7365ecc3a7b2c10f8ba67bf1c5ef5e15293cc2e7", + "abae05ac241219252438cd06c537e5e3bac11004", [ "html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.html", {} ] ], "2d.composite.clip.copy.html": [ - "5d6afc11cf68afcb471d0132fec652e8d3acf5f9", + "2471cd7edd10f17745477816e708895ba7e2b59d", [ null, {} ] ], "2d.composite.clip.copy.worker.js": [ - "3158893fc5bb4013c906267fee6db17188650b33", + "dfebd98a6b701676682217ffcfcc6f552ec23ddf", [ "html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.html", {} ] ], "2d.composite.clip.destination-atop.html": [ - "93d4d70adb76104e2e98b54138540c6287eadd53", + "efb5e7ab6d8c17a6baba111fca040372682604f6", [ null, {} ] ], "2d.composite.clip.destination-atop.worker.js": [ - "78b5368194d9183479051cff9063e5a33d13bd21", + "9c8fa79c5aadcbe366ce4a3e1230655bdab7bfea", [ "html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.html", {} ] ], "2d.composite.clip.destination-in.html": [ - "d2520378e471b8c4d16642195fb24e546642f304", + "bc467a1d99423edb11163eb27bc9457455f6f731", [ null, {} ] ], "2d.composite.clip.destination-in.worker.js": [ - "bc12026103866fd5577e49bb6756e94bc3eb1747", + "a98624f82485ebe1eeb2d77b02447ef36d0ce745", [ "html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.html", {} ] ], "2d.composite.clip.destination-out.html": [ - "fdb1792b538a8f11f8889a8c12f05e0bc39443db", + "674ec3aeb818166eec68b00ee7deb7b4e88d7ec5", [ null, {} ] ], "2d.composite.clip.destination-out.worker.js": [ - "ebe3a70d03588ab58ad0308a931b2d885d1a7685", + "0cf915d1c7796d51372bb5a30585c17b2ca7291f", [ "html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.html", {} ] ], "2d.composite.clip.destination-over.html": [ - "ae4cb499bca932dd9998db3dc5eb390afb700749", + "6abd0af788e06c5a903793f23ee8eed4c65d370f", [ null, {} ] ], "2d.composite.clip.destination-over.worker.js": [ - "fb8778f0e15ec60008f9dfdefae1f43c1639fdb1", + "b1b5eee6f4e1248f03536d51308045c0b469f2d6", [ "html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.html", {} ] ], "2d.composite.clip.lighter.html": [ - "1f705f26455326de5ddbab8bf4b534ff30745f2b", + "00782a683e109ee6b90bcb978fb07cdec3e2c210", [ null, {} ] ], "2d.composite.clip.lighter.worker.js": [ - "f6bf4c4aff4905ad10a0e509cfa71df8d046632e", + "8576d9db7c4c77f93200254a9c78831429c633ce", [ "html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.html", {} ] ], "2d.composite.clip.source-atop.html": [ - "eb5474702c7b0845b9700805f47a74a1932581a8", + "a7dc6a3bc8a2b46f9030981d988d0c012b067b1c", [ null, {} ] ], "2d.composite.clip.source-atop.worker.js": [ - "fec34e1bc62c3dfdc6f012f75c34a2e7a833b989", + "fd220f52b3ce8742c5145a0e359d6033fe34b903", [ "html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.html", {} ] ], "2d.composite.clip.source-in.html": [ - "cdc814fa75f945ca35451d5d23a7468df5b70a57", + "3f24076161abe290f3c5e92d65f2a168876d3297", [ null, {} ] ], "2d.composite.clip.source-in.worker.js": [ - "b9a67cef2e85325170e7b71ad73fd7fc81d2eb02", + "0c61fb779456303739f15b3bc2ae53e406946723", [ "html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.html", {} ] ], "2d.composite.clip.source-out.html": [ - "9df047f77f91447fcfd9209d3e9e41c94376160f", + "4033893b2b675c2d9ac3054a91698a888abc3910", [ null, {} ] ], "2d.composite.clip.source-out.worker.js": [ - "9d2524064a74240519ce0564430cea03d34447b6", + "ec57663af18a8796c627ab424110ec2c758ebaa4", [ "html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.html", {} ] ], "2d.composite.clip.source-over.html": [ - "522f4f996badbaaa2d9010ce8cc48654a4306609", + "5b48161c6593f645383634458e8dc775749a353a", [ null, {} ] ], "2d.composite.clip.source-over.worker.js": [ - "6d401c46b05c7a1557b14df4d8ca9040f94cb678", + "15c322ee597db05ea2317e35579c02926bc4542e", [ "html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.html", {} ] ], "2d.composite.clip.xor.html": [ - "dc1170db37a52e3a3e621f8380f0760dfa72bed7", + "0156e4a2ef2d9129874003bf686ef23002065fbc", [ null, {} ] ], "2d.composite.clip.xor.worker.js": [ - "1d89becc27ba20f6c9c9c8d99361c29134a8df48", + "30bae44aa995c32b2f0c09141b158f3b46ddd9e2", [ "html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.html", {} @@ -590862,168 +591660,168 @@ ] ], "2d.composite.image.clear.html": [ - "5858e8f4b5f0888fcac2f236fd46d5762f9ef43b", + "75115ce7c27bfb46cce405a3a216c49afc0d455d", [ null, {} ] ], "2d.composite.image.clear.worker.js": [ - "137654742c179ae1280f4a59e69806b7ad1ddea6", + "9a9ff0ec70afe93856143a38d9557b14ac0d81e0", [ "html/canvas/offscreen/compositing/2d.composite.image.clear.worker.html", {} ] ], "2d.composite.image.copy.html": [ - "1aa9c98e9d3a628205043af6ae3c28837c939a42", + "4cb9c4741025db9ec520fbda8cfee6124b7c406d", [ null, {} ] ], "2d.composite.image.copy.worker.js": [ - "ba3399a2b11f7d07269784bc8fd12cd2b9ca9a21", + "8fe345da5b439234b7525565b73f6d14f60fa553", [ "html/canvas/offscreen/compositing/2d.composite.image.copy.worker.html", {} ] ], "2d.composite.image.destination-atop.html": [ - "76547a1f86a3fd000643b4fc287fc49dd20dc979", + "a86950c04b033dbb60078abf5357d8ec10a086e4", [ null, {} ] ], "2d.composite.image.destination-atop.worker.js": [ - "677b882b011379aba744ee174fe06a5fa51f5810", + "8b862a0055600fb0e4586cd10e10e11399d48bab", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.html", {} ] ], "2d.composite.image.destination-in.html": [ - "8fa5786961653d9a33b0ab4937ded1e8822e91a5", + "0415cbc7b57f508d6c5927dda507d7f9dc54ecfb", [ null, {} ] ], "2d.composite.image.destination-in.worker.js": [ - "aa8c1ac06d5c5d63fbc68cbba3ba86613987354e", + "1f580cd95aaf6bfe49699f4a87f44bedded02995", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.html", {} ] ], "2d.composite.image.destination-out.html": [ - "3a4da68c2cb2b0c6100bea59dd20e884fada49a8", + "6c183fdedd4da0832096247c2f33dc3a72bccc9a", [ null, {} ] ], "2d.composite.image.destination-out.worker.js": [ - "94ac27a00d4277f88c3a123e5d257a70ab2cda9b", + "d364abf8bc95c75d0eab6c99abdbf1cca045eaa6", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.html", {} ] ], "2d.composite.image.destination-over.html": [ - "c6da28db6a7c1648bbff609e86885b87fe88429c", + "3ace58d8d815f90d5d2b2cdd663bc19b67f546ec", [ null, {} ] ], "2d.composite.image.destination-over.worker.js": [ - "3bc357dce8777317336c004f5cb9e777ac86acde", + "7ee7d94069d2c53a0e92630ced7967b901e9d657", [ "html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.html", {} ] ], "2d.composite.image.lighter.html": [ - "db89e5a3e8e0a42b2950c62d5041ed0a95e0d91d", + "9c50789a526d4069ce88dcd7029910adaf4b62e0", [ null, {} ] ], "2d.composite.image.lighter.worker.js": [ - "922b5f463529416726419c19ae3701a5432fc6d8", + "aa55199d072b9d1eb0d9f95addb340eb35a3519f", [ "html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.html", {} ] ], "2d.composite.image.source-atop.html": [ - "44dd6f4274dd205ea2b3e913279777827eea958e", + "a87385b20c3157c33c4da9f4e0773daabfc29986", [ null, {} ] ], "2d.composite.image.source-atop.worker.js": [ - "1b32993858815205d92c3afc2e1e087a88f03779", + "b0ee8d8686ae16fa66758e077f69d7c94bdb88fb", [ "html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.html", {} ] ], "2d.composite.image.source-in.html": [ - "64c28c0c2111c123229606c80b84f07263131c1a", + "bd1d09f19d37ebc784132132e8f3fb0dd91b84de", [ null, {} ] ], "2d.composite.image.source-in.worker.js": [ - "3048f849a9c8fd2228c30c2a9270ef4815da0d41", + "201c9bc1094cef04b202d398422cf6a860decd54", [ "html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.html", {} ] ], "2d.composite.image.source-out.html": [ - "46d3e483ee71c795ffafeb3230e14ce928709934", + "e31cf7342f78305f88ccfc0702f3aa718bd551a6", [ null, {} ] ], "2d.composite.image.source-out.worker.js": [ - "090bbe7d226927a2022cf0a530a0de984683b9da", + "16ed7c48bb35a32d63a37f13d1d9d362a1de025b", [ "html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.html", {} ] ], "2d.composite.image.source-over.html": [ - "1d13b7724836357184bb81cd88d656d7e0ee573d", + "f4a871aeec38baef61d41f235db1018e43ba8fc6", [ null, {} ] ], "2d.composite.image.source-over.worker.js": [ - "7937e5be6946f2ae97af9527ce7b5427c4d92e6c", + "a1deadcdd4b67a3c684ad9f70715e9349136f3cb", [ "html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.html", {} ] ], "2d.composite.image.xor.html": [ - "73253fabcaa44911451f4ba335e057557a814324", + "91e992e267fe01a27cb7a39765e1d4ee6177ff40", [ null, {} ] ], "2d.composite.image.xor.worker.js": [ - "7a22f7d39f20b29ed2188819bca0d7051affe03b", + "a77191f9f61262b92be588b1359c80c8d213dd9c", [ "html/canvas/offscreen/compositing/2d.composite.image.xor.worker.html", {} @@ -591156,371 +591954,371 @@ ] ], "2d.composite.solid.clear.html": [ - "a06565d6d8d8e529828c05e1aa3fb181376e5710", + "9bb03097fcac22b9a0e24bb3264a48c812d2eca3", [ null, {} ] ], "2d.composite.solid.clear.worker.js": [ - "983a3b03e3f565cb98337a849cba0a5e25bbe24c", + "c49ec7a322ffd100cf12421a69d9c04f1f388ee3", [ "html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.html", {} ] ], "2d.composite.solid.copy.html": [ - "aaad0b418fff84ed656642405bbbb651468c1bdc", + "a5bcda9337011716d96cf9c79e7b85b55697f68d", [ null, {} ] ], "2d.composite.solid.copy.worker.js": [ - "63cc6c1e90dec7163d4c9ff947750c0146b1da73", + "ee4baecbd2ab178f84303e8dbdb677cc82297641", [ "html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.html", {} ] ], "2d.composite.solid.destination-atop.html": [ - "be4cf393a1beb527476a909caf47d82a3c317cc7", + "c5554ff240bfa8459d2687ca9eb594d598fd9704", [ null, {} ] ], "2d.composite.solid.destination-atop.worker.js": [ - "a09827ca88b0e40835c4a7eb60846c52fe4ddae3", + "8829971c6b6638276ef0bd7d3fcd268cc1f6a9af", [ "html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.html", {} ] ], "2d.composite.solid.destination-in.html": [ - "e5ea33b5b0bbd330beefc755d1cfe8d388f1b44e", + "8e620e2714eec2c38756bc6e2276a76de3844534", [ null, {} ] ], "2d.composite.solid.destination-in.worker.js": [ - "b06ad632668fea9628ee210fdeefb7c52f59e38b", + "fe9e461717967cdfe3e96b7627f6644601978f4a", [ "html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.html", {} ] ], "2d.composite.solid.destination-out.html": [ - "49efe240d0896fa89396586d5e05a7d54c65f57a", + "06da4d365003f8a5b1b2740837fbf2c0a61b4eed", [ null, {} ] ], "2d.composite.solid.destination-out.worker.js": [ - "3b0232e2555b2542cd4b2a165c14140630d58b83", + "05ec2fae16ff5484bc7662c767eb6b929ed8dc8b", [ "html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.html", {} ] ], "2d.composite.solid.destination-over.html": [ - "c1d7965cad1a0a02d8b710565a1c5e5936c2026f", + "e62c3fea7020057c28cc97e2734061008462d7a2", [ null, {} ] ], "2d.composite.solid.destination-over.worker.js": [ - "99d64be57830f3b78d9fb6aa56c923459175d917", + "5c171fc282b9e90417f006cc34b5c0fce2c85143", [ "html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.html", {} ] ], "2d.composite.solid.lighter.html": [ - "2877e14ad9c121b82f0ba5bf897474a779527fa1", + "2e09805cc1445c98143f5d29c4399ad40ffa4260", [ null, {} ] ], "2d.composite.solid.lighter.worker.js": [ - "011a19934ee1a0eb306a74ab020f75461516ed50", + "353389221dab293b86834978944afa8f6f56d41f", [ "html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.html", {} ] ], "2d.composite.solid.source-atop.html": [ - "9f972edabc99b235bf2b6540287b96cb9408cd1f", + "dd36e0e6220ae339a675aec79efe2129b0a82722", [ null, {} ] ], "2d.composite.solid.source-atop.worker.js": [ - "2dc6ec9b2e812ae3ad578f4bcfa44b45f78014c4", + "27e1c253ce028772be36b95511e96db311176708", [ "html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.html", {} ] ], "2d.composite.solid.source-in.html": [ - "c674bbde91bbf682234b7320680f068b117bb48e", + "83dcc8e523f0290f66306d4c069898e78a312b8a", [ null, {} ] ], "2d.composite.solid.source-in.worker.js": [ - "5b833ec156aa0f73a2bbacb4af79d34060dc9858", + "7dfdb07075cd18ae9599931b87cb3e29b9cf5706", [ "html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.html", {} ] ], "2d.composite.solid.source-out.html": [ - "0fa403bb75cba6623594970892965502405ffdc1", + "3067c44fcdfe203d0e35fcedf656ac5899f52fc5", [ null, {} ] ], "2d.composite.solid.source-out.worker.js": [ - "0486939935fbd9e9c64f56183dbd34e0d2a3e0df", + "82525492675740a20344496d86b98629b03efbd3", [ "html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.html", {} ] ], "2d.composite.solid.source-over.html": [ - "4392e60c9e5e03fe43bd9b5961c7a7aa01b7c3c8", + "059655334f319caa91e29344e38db0472357fb73", [ null, {} ] ], "2d.composite.solid.source-over.worker.js": [ - "ce8190ec0f918ff30dbecadd15c6131da66694c5", + "1c82a95c3637620f1b0b04bf8dbad394486e084a", [ "html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.html", {} ] ], "2d.composite.solid.xor.html": [ - "a9eb83e6a9d6e73cc189c4970a82a8121ea54373", + "822c9c70d1311cfb7ea690e58690adb058e510a8", [ null, {} ] ], "2d.composite.solid.xor.worker.js": [ - "8b7edec945fc1450f544138d011b3c046236e5e2", + "cb098ebab1a2f03569faf3ac1f77038e1da18d33", [ "html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.html", {} ] ], "2d.composite.transparent.clear.html": [ - "91ba094fe88b95134a8a798e9ef641c489fcff58", + "81d781acc7557e2718b6d6e34288f71564af0aea", [ null, {} ] ], "2d.composite.transparent.clear.worker.js": [ - "6624bbc17d296f5bbc72fd696ab82509f601a345", + "8f30463c4173db92a8eec0831a64ea07b7861679", [ "html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.html", {} ] ], "2d.composite.transparent.copy.html": [ - "20c107bd774a4dc8ad679c4275d0536645a0122d", + "ab3a97226f4491cadee81aa459fb3ffc8b0cea70", [ null, {} ] ], "2d.composite.transparent.copy.worker.js": [ - "7fb646acd50a0308e40d77db8e0237045d7cdec3", + "6b9ea9dbcfbb93a576cfaefedb9874afd352f656", [ "html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.html", {} ] ], "2d.composite.transparent.destination-atop.html": [ - "2bc5466d27858df48c78d6b0ea28db4c97e3f127", + "5e580f5a6700a6851e0c60e5d71939c48c57a160", [ null, {} ] ], "2d.composite.transparent.destination-atop.worker.js": [ - "f433bedf7c91f64c619b3b909b57b5fc8a2d27be", + "3247632e53aa31fed808c64554287d42f23160a7", [ "html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.html", {} ] ], "2d.composite.transparent.destination-in.html": [ - "1d1121812df00e7ff5bdb236768f79f9f5c5612a", + "9f0ec56357d827f6706f96c403cd1a9e115bab87", [ null, {} ] ], "2d.composite.transparent.destination-in.worker.js": [ - "a4c159aeef8156a8e238c9c4e07a3f7d63bf84bf", + "c9205230c0ef82586619ce9a092c380f8653a4ce", [ "html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.html", {} ] ], "2d.composite.transparent.destination-out.html": [ - "17b3fecd028031feda67787e43e0a66f1ecc54b1", + "a1abe3eed912d75506a4d4b05a764bc2ba6d39d8", [ null, {} ] ], "2d.composite.transparent.destination-out.worker.js": [ - "cf6827fc51f13ba663ad2bd8f83d833b5bc41e17", + "1a5409589b4dac125255c24534246ff9879eee39", [ "html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.html", {} ] ], "2d.composite.transparent.destination-over.html": [ - "04c267a81702de02dc340136fc79be87f6263bd0", + "4f0305f27f36f65eee6cdfbb30df27198c83aa3c", [ null, {} ] ], "2d.composite.transparent.destination-over.worker.js": [ - "98a4b5b59ed769e0703756c4852dda71b810b80d", + "37eb785d673d10e53e2d533889a8ea4edd171cf3", [ "html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.html", {} ] ], "2d.composite.transparent.lighter.html": [ - "86d06f2485df7354585db03e028243fc930764ab", + "6a2f5df71f6d125897a0049c73e3bf6f007651a5", [ null, {} ] ], "2d.composite.transparent.lighter.worker.js": [ - "f9b419ace745b4133595b94947d4866c6784ceb5", + "3d890affd909c9745d12293d04b2444060b4a64a", [ "html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.html", {} ] ], "2d.composite.transparent.source-atop.html": [ - "f4e79c0c2407f457599640a5a676df2c64063035", + "bac035cea3ed98d1129a326c268299af9dc60418", [ null, {} ] ], "2d.composite.transparent.source-atop.worker.js": [ - "db65db8366605300c37994f8649faff46d810c7b", + "d56ef6e2e401c7f102379bb89ddaa5653ce57379", [ "html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.html", {} ] ], "2d.composite.transparent.source-in.html": [ - "56b4e7704d5d18d24f369f4799146fbf209869c3", + "5dd67046ed47bf09c064e1473a6756be4b55e127", [ null, {} ] ], "2d.composite.transparent.source-in.worker.js": [ - "32765c4c03e11b896427dde7c51286dd6e68cb2d", + "58ad13bc5e7ca9b6b5f478cdc6e1edb66f6b78c5", [ "html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.html", {} ] ], "2d.composite.transparent.source-out.html": [ - "cca28c5ebcffa2a6026bf30e31a3c2c47ebc95d2", + "56b1d4ad463381552df24c79b25c51829235151f", [ null, {} ] ], "2d.composite.transparent.source-out.worker.js": [ - "3cf507bf84567e9d74ef1818507c1270969e899b", + "62ec8959550f5d9e2af2c870431c589e00cfafbd", [ "html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.html", {} ] ], "2d.composite.transparent.source-over.html": [ - "a8ae30131d013140c43ef756e498700aaab6ebc1", + "f038d44a543b2415a849512b170de8dedb070d5d", [ null, {} ] ], "2d.composite.transparent.source-over.worker.js": [ - "35545c04d4eb182cac9e0a27f8c30520965a7459", + "494a45f848e78edaad197286ab5e8d188b280ea7", [ "html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.html", {} ] ], "2d.composite.transparent.xor.html": [ - "638bae02ececff0b002575a32dba50d62ccc5769", + "bbab8a086c04d5aba13de72531b023452a61e96a", [ null, {} ] ], "2d.composite.transparent.xor.worker.js": [ - "b21d30d900c4c8e7930f5a6e58261c01ad2335c5", + "4b65667ed81febf10902bb82c19d2abfccd6e6b1", [ "html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.html", {} ] ], "2d.composite.uncovered.fill.copy.html": [ - "f10275f40751df01f2d4126360dca6e24f473d51", + "0ff9d851dd41946fdfc8509adb38476879900e86", [ null, {} ] ], "2d.composite.uncovered.fill.copy.worker.js": [ - "3b86c720f5fc867f1559678a4555f7eea186f473", + "50f3ed0f222ffe800ce156300ea59226ce553250", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.html", {} ] ], "2d.composite.uncovered.fill.destination-atop.html": [ - "8672e9e19f4b815023140826a31b2326989f02aa", + "2d2f92edb5f3da39e57f2950f197965cdbca936f", [ null, {} ] ], "2d.composite.uncovered.fill.destination-atop.worker.js": [ - "69610fc1072c06b2c3ae492fed5a60d2c9525fdc", + "9a84b0894a769660ae9950071443482e53c16557", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.html", {} ] ], "2d.composite.uncovered.fill.destination-in.html": [ - "0f069372ad141c3e4c4099d6c032ec2342d1cb3c", + "5670b321a666c9cbd32c4624a7d237b27773d178", [ null, { @@ -591529,7 +592327,7 @@ ] ], "2d.composite.uncovered.fill.destination-in.worker.js": [ - "26b287134b1305c7201858c760c895b6290dfdce", + "aa24ba97a60860f9df8c268d82dbbdd093185692", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.html", { @@ -591544,238 +592342,238 @@ ] ], "2d.composite.uncovered.fill.source-in.html": [ - "6e1ecdd719fdd673774054e7ea34dfcde252e41d", + "58347442bde6e43b28138fd36338faaad0445fa8", [ null, {} ] ], "2d.composite.uncovered.fill.source-in.worker.js": [ - "6da98654cfc0decbc9fcc81e65db484594ff75cc", + "33e326d1f47e83b0fc51274b24b73f5c5de1910f", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.html", {} ] ], "2d.composite.uncovered.fill.source-out.html": [ - "de16897f8c4e504b10b1de22f6a70854402597b0", + "ea44ca4f04471ef6b912476784441f271dd6a6ec", [ null, {} ] ], "2d.composite.uncovered.fill.source-out.worker.js": [ - "515b587b58b261e92d49951519f58b36b6dcb712", + "1d39b364b0e5bf0e8844ff0e928fc8f2400ec8a3", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.html", {} ] ], "2d.composite.uncovered.image.copy.html": [ - "5f3c9a191431ef9747b3ee3733138a13059acc34", + "a3f009532b66c08835c3b9755d85d9b6bc5bd6fe", [ null, {} ] ], "2d.composite.uncovered.image.copy.worker.js": [ - "2faecdf0dd97fc9d43782ef9e5df8e17f61880ac", + "05a208efbbe8a6ba9a2074f3a20d982b93a5a1ec", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.html", {} ] ], "2d.composite.uncovered.image.destination-atop.html": [ - "3605e4469832ad9f4718a186abc72786943cc4c1", + "e46d8c0c4c8aad7c6f23332a2538ae1a4c74c8c2", [ null, {} ] ], "2d.composite.uncovered.image.destination-atop.worker.js": [ - "8b361e066d9d1607b794f4a91115374b941156c3", + "3662f862e9f8afd56a30c7f8250dbb52ad0055ab", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.html", {} ] ], "2d.composite.uncovered.image.destination-in.html": [ - "c48ee8e16e38553cb5b833eb46ce4ca8c338da72", + "41c1c73b021facdb9c0acc2738943213973ac8d0", [ null, {} ] ], "2d.composite.uncovered.image.destination-in.worker.js": [ - "b270efc7aa43453cd7cf17545fbc92e31d56a83f", + "d7cd348e7869743d7cea01d5e76024e52e63ab9c", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.html", {} ] ], "2d.composite.uncovered.image.source-in.html": [ - "af4c3b7daaad401c39db5040eed1bd6ec348bb62", + "51c92d5dbc4a0323132ee7a0a38e61ea4b60a8af", [ null, {} ] ], "2d.composite.uncovered.image.source-in.worker.js": [ - "5fe00cf14b02a257d43e06470560115b4f45ed4d", + "02397f02ec52795316eec1fea3210dfa5e3f5a20", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.html", {} ] ], "2d.composite.uncovered.image.source-out.html": [ - "4f1c3869b0d3476bb0cece510bb033702c9995ac", + "29227f2a5ad8318ebbb333d47c33afec3e6f3f45", [ null, {} ] ], "2d.composite.uncovered.image.source-out.worker.js": [ - "f93185bc66c343d32ad775ec857d2eb858e85203", + "70acee3f1592931faf9b006b0fab16caabb9368f", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.html", {} ] ], "2d.composite.uncovered.nocontext.copy.html": [ - "57c499d81cc9984f35575d87d71606a8029cb902", + "10a9960559b7644546f58648ada4d8f65542ddad", [ null, {} ] ], "2d.composite.uncovered.nocontext.copy.worker.js": [ - "bf6bdfe94310d1001c1c6f1a3fa18dcf43325273", + "1f285eae4c0dabcf8c2c5b577745078fd69e205b", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.html", {} ] ], "2d.composite.uncovered.nocontext.destination-atop.html": [ - "73684800ca588c53662a97392fabd77d9b231a24", + "ead1299cf0dbf6022798bef8b7ed791979b241fd", [ null, {} ] ], "2d.composite.uncovered.nocontext.destination-atop.worker.js": [ - "3574add7d801f9f82a5fa60b975bbe0b26ff6e73", + "a9beb0f27edefe06e7582e96282f79c1e73d856f", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.html", {} ] ], "2d.composite.uncovered.nocontext.destination-in.html": [ - "b41c4b749c7f2da0bdf24c36f6de19fe6e19fc5e", + "0322bfe2584114a742ef1e678ecb0ff194e0d205", [ null, {} ] ], "2d.composite.uncovered.nocontext.destination-in.worker.js": [ - "979a0849e81c5fda408158259b5a1231989c4364", + "e146e2e91ad94e124c5c9714cea4c9f3ef4bcaa5", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.html", {} ] ], "2d.composite.uncovered.nocontext.source-in.html": [ - "99aeefbb6af5ba4fe2782eb0ced6c83f0d3cd56c", + "0d93a0362e63ef234d82393bcf045190ee359290", [ null, {} ] ], "2d.composite.uncovered.nocontext.source-in.worker.js": [ - "55596f859de0fe5b3bc7e822506bc416c7b6ec23", + "cce4b54bd5fedc405f6536e99cb7d728938a26f6", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.html", {} ] ], "2d.composite.uncovered.nocontext.source-out.html": [ - "0dfd4ae0d0b51766b81e30557e5cef9bc4cf39e0", + "b6ab8cbda4b6309ef6729c3cd901d70225e25d8d", [ null, {} ] ], "2d.composite.uncovered.nocontext.source-out.worker.js": [ - "f0820e03fe01cb58bf7fb02535b41475ccbdf176", + "501a84f7e7b264fc3fe7361f134220c875bb9d58", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.html", {} ] ], "2d.composite.uncovered.pattern.copy.html": [ - "244cc82f55674a6a0720e63945864212272cfb07", + "6d9a23beee1eee9608ef48dd41ed84f837f1c4f3", [ null, {} ] ], "2d.composite.uncovered.pattern.copy.worker.js": [ - "3aeddac219e3fb225a96b6f49a4909f2ebfb4de5", + "d3b6e07422224b1c1d0ce103725e01514902de57", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.html", {} ] ], "2d.composite.uncovered.pattern.destination-atop.html": [ - "3624f1baa91102667b4196041b8494a0dc27ebfb", + "e5cb129273367b56a4ec0f8ad59a6af8daed0208", [ null, {} ] ], "2d.composite.uncovered.pattern.destination-atop.worker.js": [ - "86aaf9fb52af9f001e4504ef668c18e1eb21e0e1", + "83bd328b3760ed4dffec1156196f9a435ab3a696", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.html", {} ] ], "2d.composite.uncovered.pattern.destination-in.html": [ - "21990f1ae0fc6624e5a795c863a33ca524aa75bd", + "ef55aa7222f4c930e707b101431fb77183b2302c", [ null, {} ] ], "2d.composite.uncovered.pattern.destination-in.worker.js": [ - "184efcd71e3f371f5a1c531bede817c3d95eb978", + "c599c3dfc6d65a9a039e1f34f32e7c229f536862", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.html", {} ] ], "2d.composite.uncovered.pattern.source-in.html": [ - "f95da543c913bd16070e91d218bcaccf0ee00b4c", + "98ba8bb12cfe011ae7e8bee2b6a8237f2d6fcec5", [ null, {} ] ], "2d.composite.uncovered.pattern.source-in.worker.js": [ - "61c798b7aae60210536bd6fdbf3966125a86c834", + "10178699f6a5d495e3c825e165819d401364821b", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.html", {} ] ], "2d.composite.uncovered.pattern.source-out.html": [ - "4eb6ba519f70e22320491472089542796092eabc", + "bdd17f9e0840e45f560509d68b8278918236b677", [ null, {} ] ], "2d.composite.uncovered.pattern.source-out.worker.js": [ - "5827c7a1d7f64180b5dbc3cf0d346bd10b081dab", + "764a09416f39e4d829fbc2df465359be3a939719", [ "html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.html", {} @@ -592136,14 +592934,14 @@ ] ], "2d.drawImage.svg.html": [ - "50aeabd286db470b6d3b696dea3f0bf51bc0e32d", + "cd293595fe8f4e714b4703ce394eeab184da5fce", [ null, {} ] ], "2d.drawImage.svg.worker.js": [ - "a15371db39dbd31554eb3fdda2554e09f489af04", + "8293e89f247af9fe093b88b29daa32fe4da8c778", [ "html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.html", {} @@ -592199,14 +592997,14 @@ ] ], "2d.drawImage.zerosource.image.html": [ - "4941d37347f4d48278dfc2cfde4aec417fdc45a6", + "5dfb2f3002c24b1710ba800652790a8171cdb852", [ null, {} ] ], "2d.drawImage.zerosource.image.worker.js": [ - "a3182c9b73f12b1ee5768ba89bddae6189052d36", + "467beb4d12fac2c3251efeeb197547b065a96d27", [ "html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.html", {} @@ -592672,3017 +593470,3017 @@ }, "fill-and-stroke-styles": { "2d.fillStyle.CSSHSL.html": [ - "af5b04170d4101a15d10a9034146c90518ae00f0", + "8e488a5a588db7ee023dbf25f09e50b0ac4616de", [ null, {} ] ], "2d.fillStyle.default.html": [ - "3a3b6a9798c6339c4437e9ccfcbd2fd0124aa1c6", + "58075168e8aab857a262858ecf2a778ee11aeffa", [ null, {} ] ], "2d.fillStyle.default.worker.js": [ - "95ae259ca49286462693c83628ba3c571ec6c6b5", + "34a6f1276a70db3cfb7e5085d47fa32a9d5e5829", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.html", {} ] ], "2d.fillStyle.get.halftransparent.html": [ - "68b09d06f549da425e8252cb2b9986eab713eb12", + "cd0b0c24376b50bd3f6f202ff60c04dea2aef015", [ null, {} ] ], "2d.fillStyle.get.halftransparent.worker.js": [ - "de8f491ca368aa675f093d31d152592935d336e4", + "7590816b327d5ebe902d6b07f2b8713c7c48271d", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.html", {} ] ], "2d.fillStyle.get.semitransparent.html": [ - "9f8566809d9024d8e05c9a2a1a192fa169a504b6", + "6be295ae0bb350fde387787a2514a09926c5cb19", [ null, {} ] ], "2d.fillStyle.get.semitransparent.worker.js": [ - "3715183d55d95066c34f24282ec7556a31db49f8", + "1c25bc2ed59936cb4a3ce6bdc2b3553a6db1a1a4", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.html", {} ] ], "2d.fillStyle.get.solid.html": [ - "3eca93e237f694aaaf0e8d114aab6b8b6d3e4deb", + "4d8ccc0ff474b4d2cf1d3bff62c7bf86b9145f58", [ null, {} ] ], "2d.fillStyle.get.solid.worker.js": [ - "2ada7336516c12db49c56f8fbb165959cc62f427", + "efec71ca9e9d8b0bb8c5642e56ca1893aa342451", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.html", {} ] ], "2d.fillStyle.get.transparent.html": [ - "caab8e0236d80656f6e656374dfc71b251d0d72d", + "8fe102f2b1c3118d7edb0e76b82161d12a996272", [ null, {} ] ], "2d.fillStyle.get.transparent.worker.js": [ - "57f5facf2e863233298b907317e1eeace6789f02", + "51542bad82ae1d8efc92d7f18d44e7da6ad2b374", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.html", {} ] ], "2d.fillStyle.invalidstring.html": [ - "260554c4bcbe9aa6c353115160519d733b9ba40a", + "a30bc4ac7c71a7e2aca5dd84498dced4c8c1c889", [ null, {} ] ], "2d.fillStyle.invalidstring.worker.js": [ - "4e4df4f810b60cb105d11e79848361e8fb1e2258", + "f2f5ccacce05132b79fbe1be3cbc2b357bad1caa", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.html", {} ] ], "2d.fillStyle.invalidtype.html": [ - "53c0f77c8ce8759d5d7fd36c6d8722cceade1cb4", + "23814ae87c6f0e74bfbe358571c78a5ae45847ba", [ null, {} ] ], "2d.fillStyle.invalidtype.worker.js": [ - "19b31206388a470d0302a51ece336f06df10b1e3", + "13e10e12540c854d86581a411a56708cb9fcdb13", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-1.html": [ - "d4a2466b7d3f5adfc8f36edbd91adaa6f6a7bdaf", + "222d7f6077a11c1c90bc5253cc155e38cedddc56", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-1.worker.js": [ - "074d796caf34decee4143464308647276e2abaad", + "74137880b7260f9532b709d782539d17cde445e1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-2.html": [ - "6853ae51ea52d1927688ae0892a7b1591bc836f9", + "b2c93c1e26042301c17886c7fa9bb7cd88c067ae", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-2.worker.js": [ - "a4226cf8cad12a1c4611203a88313e0aad36b714", + "3ccd75a4007625b4c47c6f98f409565b83b3d9f1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-3.html": [ - "62f4e48ef3c495e728389d8ba9f4355b7de4674f", + "fc8726904cef6598f656054a48bd65d830b33fe0", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-3.worker.js": [ - "de3e3791fa794dc75f0e9f50fb17fb3977c4a0c6", + "bfaba364462619848c09ab6419b9dfaa93fa052b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-4.html": [ - "082ddcd75ef66e09dd28065f32814088cd39cb9e", + "71cb327c5f84b2d496559ee27c3297b0920e6003", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-4.worker.js": [ - "2714bdf835a2281a1e6b355587a8d0f6ff64c921", + "afe12657bc312dc8471b1afb8e95218b871edeac", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-5.html": [ - "55f92e17ef8e97507044d6366924e0a7caf50d36", + "787d5e7644b72fb33bc0a64ad18a7bd7ff79d048", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-5.worker.js": [ - "ef3fe13355b295f9536a5faf9436784dd2e17f02", + "05c77b0a1dcaf2f0c456ea600498b908347387fd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-6.html": [ - "74657fca63e0a69f6a1a1d8c67f4a4aad8227fe2", + "8acc67f968ec1ed3debfa89ce61be4b7ae19bfd2", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-6.worker.js": [ - "a36af9a563a310c923822a5fae828efc800215fc", + "8ff08394b7afda09c43e9bc9371636326c141539", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-7.html": [ - "419b15f72e1e5a46148a7a4faf30c4d5ef21be28", + "dc295d070a6d03e6a9b8474f7280511ab318a423", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-7.worker.js": [ - "10da1141aac1c2301e2ae4a83120693fdbf2355b", + "9d0513ffcaab91cd120b0e597c5d703e8254ff91", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-8.html": [ - "a5acc80ef8cd88fae12d8a4383a24c083615b654", + "50970585ca0339cc894192f46f68dcf73d241d5e", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-8.worker.js": [ - "e12f96350b9e46f8897c7eccdb9c65b74f9fae03", + "ce56342ceabb344fd3c507956f445cfba76ad86b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsl-9.html": [ - "dc184153996c238423d74b99867c4aec8f923e91", + "47cd157c44dee97f9c20da468e3271a82710e165", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsl-9.worker.js": [ - "51de0e0b15ec57358f761f30d358b3925d67a733", + "e45f55930d5b5d13339407e5efe779cd620698c5", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-1.html": [ - "84b80615be0f1d999fbbfb6978e8eff0e51de7a6", + "2d1e46f1a949691e17e9cab0dd7529e6dd3c8d48", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-1.worker.js": [ - "2d7abab3be68079c154531e8222a06dbb158a8b0", + "2a1157ed1f2bbfba3f104f65e7d5e104bb5ee5ca", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-2.html": [ - "a3f2c67ab4764f6755d6e1be0a6fe21adb6759e6", + "f5531f68e1dec4bd252ed2ce93486781813ecf54", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-2.worker.js": [ - "dd66b1d079a160f3f0ac055222987c5a480657e9", + "23cd58d1a0c2ab3f59a151666543dde745e80711", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-3.html": [ - "5b809ba567b7c0b8b5cbdf2778cf747353349848", + "fde2328c438bed49f390f822cf2c96948a7eefa7", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-3.worker.js": [ - "7ef6d8f4751a1219ce3442913bd1beee5724f0f6", + "64577bc348a97a614435ddce8305c4e5008d2885", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-4.html": [ - "3e063664fb95e8f5754157ad62447591efccecb6", + "3b6e1f1347d5438608c8f220052b9b9cf6c17dac", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-4.worker.js": [ - "ed1dec016241581d229804d769ec3535f1dcef4a", + "05b08f0a0c31b9c0b922c4420eecaef337d252a4", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-5.html": [ - "34f626a0a5557f1b8e5fa698029114c657317fca", + "b0677c16dce8488c49cc0390b45b412995959bbd", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-5.worker.js": [ - "89042269ab29bc945bebd9ca1dd734c1fde0cff8", + "51484f3aefee4c6ec37707510330d4054c309df0", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-6.html": [ - "3c1a23bf37e5e1ed727841b574d402b8e7ce011d", + "809d11c4cd9b317d05801253f7b242b12e694632", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-6.worker.js": [ - "645081df5e1f67c4a25ac534f64de45cd5ce8761", + "7b224e5c931a2e7b03578ec388653dfe1265abc6", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-7.html": [ - "cc874e8fbe1f5f305ad1ecdadfee8ee4a5a742b5", + "48c3c6927e7f12edf5a9110446ef484fbe73a70b", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-7.worker.js": [ - "f42602ebc3a7f10cfc4f9d1fb75af0ad3d22ea48", + "ed51a5df40231d1c2e10cd885edcaffd248d9180", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-8.html": [ - "75014364817a49405a41c897368b6b4e1b03fe83", + "f49b313a1f1f8e1212e7b8c1f616f2754898bcd6", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-8.worker.js": [ - "376cb94c904147f1cbca6ec2cde7b6ffd3c46eca", + "c61fb1a1fcc38771e64c524e049f96c63227bcda", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-hsla-9.html": [ - "f759e6910bf54fe1611683573f7ec0632dd28afa", + "68c4e224a2d5b048ea975b5289a928b898d4e804", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-hsla-9.worker.js": [ - "58f404175d08b45d3c3d96ccaef209c92171639a", + "51541b714871dfecb4718a4c433a3cc727d9e14f", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgb-1.html": [ - "44648751a30565595d186ab5838fa07f1b477adf", + "c9d75ca5c606c45ed0436fe49166a0c45d9ae11f", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-1.worker.js": [ - "34ecf3d3186d696153e23b391258dcf9c7cd1f74", + "f0a67250f15263d83f672fc4d0deffd6f9ae4f29", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgb-2.html": [ - "328d731e491cc1e877d361cbaffef9208ebd0dad", + "0acc23ef9502841d977985c1ead5923be7a2997d", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-2.worker.js": [ - "958d5df352edefaac8b4fffb85e649286c202507", + "eb6b952b4cb56e9245579bffd6ee1dbbe1a3dfab", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgb-3.html": [ - "1dc99c24c7b3f36d77fac940b0e775310501d884", + "85c2606c98212e1471a7c193d97bd669390b8304", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-3.worker.js": [ - "f82df16e9adf4b280699b28e8adc01ac954dfe52", + "9db5b7c33ef74865a16193677e9775b24441cd99", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgb-4.html": [ - "1b72c4f235d80624176ff4a165fccf876d0de740", + "e028260ee53757d73c1a91d161305264534918fb", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-4.worker.js": [ - "08dba89ec817c27b3a56aeb6d78491147f10885e", + "fecb3ecb6ee48311a814c459d73576df929e742c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgb-5.html": [ - "9044fe81a4e8561edde7aa8a78448d9494f9c51b", + "51ace916b11bc1b21af2b473dba300b77d3028a8", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-5.worker.js": [ - "27ccca6c64f58c2a28f7aa802298e5e2fb8e6534", + "03948b0c694c64dd464bef3317a970b20829e109", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgb-6.html": [ - "66cb90876f1e52eeb61316f312f572c8f13ce5b3", + "6df2f914e83b70b3850b91387571c83792990385", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgb-6.worker.js": [ - "3ff4312fcb2108f8e06ef88af16b761634cc4a7d", + "5f31d9a9f493557bc7f562ad80ad31ef9d7d2fa5", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgba-1.html": [ - "a0d2239244afda9c77649c8b582a0e8981e6dfc8", + "19d726ee3b551cbf114aebf73aaf12480398c380", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-1.worker.js": [ - "ef45434cabfc3741724f41cc9a455fe241696d68", + "24f278221e73798d108b002908eb1af690c7f8a7", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgba-2.html": [ - "96dcbf61d8f24c87930507fb0d7d552aef8010c2", + "1603ae93abe4db2f5e88abedd7f1d5c275bbd979", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-2.worker.js": [ - "e03f5252e9f26141c80f9090c458a99357e0af6a", + "fcda86bae24b77afbd43de721bc871cabf2b8e39", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgba-3.html": [ - "f972e83696f3477b7ffd64f70a5a454b349e4574", + "53ad71781af481a2be25fdb4d2e1f968b85a21ce", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-3.worker.js": [ - "3bc693f212c501da8eca2165bfc3080a92086b98", + "164f17f3d8b5ea38ed3a2054183c90fc56ed0bc1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgba-4.html": [ - "6825e8658afaefa9f81811b07a50658f07dc8f52", + "3dc9f9c7a7737801a9ca055f86f17a201dc44c86", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-4.worker.js": [ - "a50cc026bb73cce7e3398fc337a69d36872c7e66", + "da512a261e6d5078ccd60064a974c9b727e8846b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgba-5.html": [ - "7c8b19c80d4aa4f1a6e75c343ada94a6065dc58e", + "db0e891f22c74d8bdb203d6058f1093519f7e701", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-5.worker.js": [ - "e134e34b2975fb97a80ac672820e335ce9501c8e", + "7f10cba4d54d629b177f293edf7f07c40ce209bb", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.html", {} ] ], "2d.fillStyle.parse.css-color-4-rgba-6.html": [ - "b63b46f9d25894aa701ff6b6ec19312e4fa0fd4c", + "c4ec4622a5a8bc470118e65dcb4110cebd33167e", [ null, {} ] ], "2d.fillStyle.parse.css-color-4-rgba-6.worker.js": [ - "3e401de74d50b57018c630df1b0bf1e7d0b00e0b", + "2d81992ebaceb0a99f398b33e3eb5453ff7a5f3a", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.html", {} ] ], "2d.fillStyle.parse.hex3.html": [ - "90d3e6037eb1739ac78c9ca926956f0b9765fdff", + "90c4d4f5d7ad2020eec94c149940dfaeab3469f3", [ null, {} ] ], "2d.fillStyle.parse.hex3.worker.js": [ - "9f0d0a4322a18a628fa450d3bdaa9d7cd4b6d7fe", + "7ee281b4431dcf65c2690f880189aad1a8648e0f", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.html", {} ] ], "2d.fillStyle.parse.hex4.html": [ - "d10e3a891063d38d6ac64e7aebaffdb5219a1a5d", + "8a6260fa891c43e43cd4bcf7da248012517505a2", [ null, {} ] ], "2d.fillStyle.parse.hex4.worker.js": [ - "fa84ca13529eed306e6608572818781fc17dad46", + "53001f958006eb13882945e1aaf8cce8c26bd041", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.html", {} ] ], "2d.fillStyle.parse.hex6.html": [ - "69394c9a83112f3f4bebbc3c40248bd89f54eb71", + "02f698ea30f982b87c0965fa35ba0c51bf0a21d1", [ null, {} ] ], "2d.fillStyle.parse.hex6.worker.js": [ - "cb432b4f99efcbb3831787063029b8e8c1bd3a61", + "e9420b62e198cb461fc69e71ed7907b0071600e4", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.html", {} ] ], "2d.fillStyle.parse.hex8.html": [ - "80abfe3265ed716ed3f2623451ad99dd5f2cd75d", + "1563bab113b140ed647c5cb5d416004ab98d242c", [ null, {} ] ], "2d.fillStyle.parse.hex8.worker.js": [ - "e114569893e21dec798f91a99c988df10fa6ccf9", + "35cdc5c292b6fca1e70c62ee7e649bfaf9f6760c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.html", {} ] ], "2d.fillStyle.parse.hsl-1.html": [ - "65e5c1874743acd84a4b4be45717712f596224a2", + "96e6515a61d0080f62959af873e337bb9fce8af1", [ null, {} ] ], "2d.fillStyle.parse.hsl-1.worker.js": [ - "83d507c826cb3d572c94dada5e7f04d403adba2c", + "204df1a35fb44e2e5f8f2056a05ac860a45e4919", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.html", {} ] ], "2d.fillStyle.parse.hsl-2.html": [ - "fdd78ad7bea0e49edd7bde99d3df9c81ad8f13c1", + "b6f8f2bb76a8725d89c4449c65f88d6b2d6adf19", [ null, {} ] ], "2d.fillStyle.parse.hsl-2.worker.js": [ - "0dfc848716eb232600dedce6d96891958d4558b9", + "f282d3ca1f01152d57c000885e7ae737a8f39ccd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.html", {} ] ], "2d.fillStyle.parse.hsl-3.html": [ - "51692444076aed27cc1a0ebd9b7a468d6f635198", + "5ed3b96b9bdb12f32a4e6e37d88c077d64811925", [ null, {} ] ], "2d.fillStyle.parse.hsl-3.worker.js": [ - "54dec44d38ef6318337296524fb00bfb1de92e41", + "a4abd304a8b17c463b0683b23712c5c906143c9f", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.html", {} ] ], "2d.fillStyle.parse.hsl-4.html": [ - "90f30ab92c33d302328b1af70b6842a30d738d91", + "f91edd75bf118d0b78e1c0a6205c6a1c1e0c6069", [ null, {} ] ], "2d.fillStyle.parse.hsl-4.worker.js": [ - "43c20668afb6236a3dbdee5ede4d267e85d03b79", + "19cbfd08cf834d91772a0622954c8db3a4fda83d", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.html", {} ] ], "2d.fillStyle.parse.hsl-5.html": [ - "7760e236fdcdb24125ff3b05262d8f88d0f91a47", + "c4624da0c9d89c8871c28ebc3e28d2bb7834dcf7", [ null, {} ] ], "2d.fillStyle.parse.hsl-5.worker.js": [ - "d4c95c10b24d0e739f1e29f145fd6828723357e7", + "49689b8274ac6864e295e52607a4e4ba008d2e3e", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.html", {} ] ], "2d.fillStyle.parse.hsl-6.html": [ - "795092931b77d981f2cd633052be09d67e2c810e", + "5baa5b3b0068cab8c1c8506fbfbd348997502dde", [ null, {} ] ], "2d.fillStyle.parse.hsl-6.worker.js": [ - "f5acc2df25b16e1bf75f972615df111ccda0e76c", + "9f99d96403a4888a7b09e9ab12a01d727c085df4", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.html", {} ] ], "2d.fillStyle.parse.hsl-clamp-1.html": [ - "1b375468baf4d2529d6c2ab5c2e757ccf9b7a033", + "db43c45dc8b393ee2e7426bff4170643cc563273", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-1.worker.js": [ - "cc3308d7ed60aa432357049d7a44bc065695954c", + "868beda76444c5c68f1bb17f861d4b8ee26e62d6", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.html", {} ] ], "2d.fillStyle.parse.hsl-clamp-2.html": [ - "0133f7f50a3384d66d3835e8df6baa6c1c532207", + "a5b399a748e5c707920190cbbb62460bdf1bbc4d", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-2.worker.js": [ - "48c23aa10aafa505eeeeeae6ccacd0d4fbebd82c", + "2f1d2d72e6980751d65401b557129eab7f9dd239", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.html", {} ] ], "2d.fillStyle.parse.hsl-clamp-3.html": [ - "e35355c21c045354ce81e1470b63b05d90ae529a", + "cfa6d82382fa462e5729eb225fe6f785e7c11912", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-3.worker.js": [ - "ef1ac418c9c42f102944438bf14ad3dd523c99e9", + "4c71d6d1409063090bde78e15485cf305f0414b7", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.html", {} ] ], "2d.fillStyle.parse.hsl-clamp-4.html": [ - "c42b6f1f5d1babd7006fcedefdfc8eca491b0aca", + "a3bfd8c22f5e19b895faa55061e00d9a743b5e12", [ null, {} ] ], "2d.fillStyle.parse.hsl-clamp-4.worker.js": [ - "061685dbdef51b15c3c9824c2a9a2d99190ea12c", + "e4477f5cb8e9780ba5d6afbb16967ae793582412", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.html", {} ] ], "2d.fillStyle.parse.hsla-1.html": [ - "0defd457ab0c9e750dfe9abed77bc5b77fe979de", + "67a65da730e9c7c66dec30eef1bf23a28fa2e6ce", [ null, {} ] ], "2d.fillStyle.parse.hsla-1.worker.js": [ - "64a26e6ca3b0bd4a4e6686ebb95c20735a573779", + "c002368227a881963e77ee1b80007d428e1eacf1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.html", {} ] ], "2d.fillStyle.parse.hsla-2.html": [ - "0498edd6da6ea49671ff6f25ab75f9e7c42ae218", + "c63fac5dd60b1667c39189beef7451617de71add", [ null, {} ] ], "2d.fillStyle.parse.hsla-2.worker.js": [ - "6101f0e3ab719f45a7aa32400ce72a098d9142aa", + "aca5d8d9167f81feea8e6f8bcf63e40fd275c2a4", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.html", {} ] ], "2d.fillStyle.parse.hsla-clamp-1.html": [ - "313ecf277cf8f85ad50de922707eb5bd4e3eaf7e", + "ebd766165d75fce0d7ce6a663a84405684bcfea3", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-1.worker.js": [ - "8724efd28ab7ab0ce66e23e006bac3cbe6c2769a", + "6a29123d95b3fa7fe2e0eb7fe4a937fc8734ac48", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.html", {} ] ], "2d.fillStyle.parse.hsla-clamp-2.html": [ - "761471f43ae1758778d2f363f670f50381206e30", + "91ec54841c64a8010f78780cc82537bc10fb2198", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-2.worker.js": [ - "af4271c66ccb03ffa6899aadb29399fd419f17f4", + "c27c9f8619c738e92c8a31d62d8e9a13b18d9aa0", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.html", {} ] ], "2d.fillStyle.parse.hsla-clamp-3.html": [ - "287a23a58a29a695ee24f021c594b339a2e47334", + "343bf8b2e2cbc48142188733eb51b649d9d7df02", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-3.worker.js": [ - "1e10a76dc27d54f1dd613e8210066b15b56fcf59", + "64f459c23f04e434199b9c6c9e6dd66edcf81c01", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.html", {} ] ], "2d.fillStyle.parse.hsla-clamp-4.html": [ - "a0e420cab28a02d7b77197f4b24a5955a8c4c8fe", + "c54d409934a7d910d8e2875d8beb598377638dc9", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-4.worker.js": [ - "e746bc34729e08a7b581a1fac356f435aa8b70c6", + "b24163a78602a0d8102c717bbaf4c00e913b8ddc", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.html", {} ] ], "2d.fillStyle.parse.hsla-clamp-5.html": [ - "06837197499586cd3709bffd011e6efe915ae276", + "d068ffa9215258672316f0e37a54cbe410d5c07c", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-5.worker.js": [ - "61d86a8a95ffdd7e214c54f04670a59c11613ccc", + "a10af90a0f4ca6fa15d491b471a036cd72c3d85e", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.html", {} ] ], "2d.fillStyle.parse.hsla-clamp-6.html": [ - "a8106395194109814a4c7f35ac51661eb928b354", + "f8f0a78f21885c41c93a6f0774f175adaddfed84", [ null, {} ] ], "2d.fillStyle.parse.hsla-clamp-6.worker.js": [ - "57c0d587eee7892c44e3a751690e97ca8126ef93", + "da6cd93e2a1b4aa56819152885e8eebf9e0cd6cd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.html", {} ] ], "2d.fillStyle.parse.html4.html": [ - "767768ab2f7055c28db387ff2a7fe24004a270f4", + "fc1c1af18b4938f6375fe9e5c16f814bd6cc346a", [ null, {} ] ], "2d.fillStyle.parse.html4.worker.js": [ - "a8b8552afb5ce16f053f017783cea37e488eaf6d", + "7430608f636e37fe370fda62fac7cf572297a054", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-1.html": [ - "1a227a436a4f7da23d08b0ef1a8802c096c1333d", + "3edffc6d93a6ba8f1069e4247162f975bb9bdd9e", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js": [ - "20fc879bc6299aea064d5be61ee8125a7786b210", + "054568e1deee00e78c3cbd89aa5cbef0ac8a3d41", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-2.html": [ - "36b95ed247a70cfcc04b5b607a8d706e79f0945b", + "477b318f41684a67290730fe49233f47f119d056", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js": [ - "c2c6fc0ace08a535e54051c23b35e6080e5f7699", + "74d6904f84adc50d07d11985d95cdecb22a45146", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-3.html": [ - "d208c6296b67d079fed24418015de4a692b39794", + "e2092666c6b4a556094a92717261361e3398de24", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js": [ - "c2f90ef320c52ff37b482f99b66547f223ebdf8b", + "7e930df4007cae8c338e6b507c5f1a138615e44c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-4.html": [ - "2fba5aaf9c68a786bc1f032350fcac02ed120044", + "5bcc1755b0487553161597ed335290d6959e61c4", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js": [ - "6903ae94c2d5a9de65b68fd20ce8ac2c04b3ccdf", + "cca9d52ab1c9a46521dd7cdbc7e7d4697bc77f04", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-5.html": [ - "f340a52aa8c26db9e2857f00b63aaf510e1215f5", + "ba46540802862b555e7f07300cefe62e9712172e", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js": [ - "8f0cfc0cba58cd82418b88b9f92b974db0a02855", + "5c17b9eeb3f9b03916d15eba3ac1cae31536ae80", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-1.html": [ - "834a1b7b18e3f203013c4a30e47919db20553b1f", + "a5f8f3fe9ca9ef7802dc5f370cd3aba018d4bc52", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js": [ - "45e074321e3b5836c719a7545bee68548bab7b0d", + "1ab7e713d0f75befa59f9ec7d55fe04e2e481179", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-2.html": [ - "cd33bbf8007b859eadfbff830b6e106339e6133c", + "bd543220d0d45c843dcf1e4e194b37e495f9cfa0", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js": [ - "e0d75717db7df46ada18354e8a28d6183d6cb806", + "9f1aeed56334ab8cb72d9d38cfd55d75af051544", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-3.html": [ - "fd01b7623af43fe43fa488fc1d4547a0bb02e100", + "e33b9415b24f652374429fd6c0eeb9894d999cb5", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js": [ - "4adb92bb6444650031424dce06b6ae36677a76a2", + "c06a31941b3343ee775525c0ef1dba22562d9a95", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-1.html": [ - "f1e1b2ab37d8513ec2a80290b304eab29750cc3a", + "8fbbc7ae51387ae4390a7c75c41d6f48059b82c8", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js": [ - "450556b31be0fa3f2dea56a76b552a887f2b62ca", + "a728e8d358b1b0e9ac8cef67bde5d199d245458a", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-2.html": [ - "dc22f99e3d3159cca135e191f7982d5e7871ab4a", + "adc829748890c579a76709b522ae00013159faca", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js": [ - "35217d1b807d7e3e0a03f14e66658ca4ab479ed0", + "da9b95c191cb6d478be0899d81b5d79f401354cc", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-3.html": [ - "434c15eccb3acd8c759723c2ad6bfc60de72399c", + "4d385d56ccc09c55c7b686d4daac6b193601149a", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js": [ - "28200cfdd5a1588e96b20db183a011b22b94ad44", + "eee7fb92fd760f53c3acde142be29ad349eda02a", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-4.html": [ - "58ed0e7318ff7428dad5a3cc457efb066cab0712", + "6b855b4357e4d12a7d08645a9832a989b9b9dcd7", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js": [ - "1830996c26b4b5afdcf62f7cd6658e6b643fda0d", + "2b25416de7d52acceed7a6d7ef3d1e8992b6965c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-5.html": [ - "95643739c411639dde22fb373bd886940ddc13cc", + "13fadb9a245418653cfa13f3e7f6dd7d8266e39e", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js": [ - "4591bbde34ae0c5b877056fa49baca8a54a615f3", + "7932932d93a604190a5fe434f9a461c2b9f4df62", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-1.html": [ - "5ae093eae1ea2dead69899ac1b814d27cb518330", + "5353f77b8fd68e10391edf7ecd7d1b3976bc0a3c", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js": [ - "d9a315c98dbc33b00635e201c10ca9a25c3f4077", + "ef559c45f047e210a848371256a50522e7110fb9", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-2.html": [ - "036f389153a121bc0218cb63fc985a26f6cb2ef2", + "aaa555aa05059bfa77b116c02489dc7c1d375207", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js": [ - "1fc2f5d86380c0f1b8fc315db8b9aff757d51e49", + "7a06f832e859de4dfc063d3ae4da7cf9f01c16bd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-3.html": [ - "663557987aabd226de04d92e906210d9a2ffdd72", + "e8c058885191bf72eff239aa0fb8e601f6dbf60b", [ null, {} ] ], "2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js": [ - "1eadf9125b03f28885f30b0155b6a57aa97d5ef5", + "65ed246a3929b54655268a86cfe0298e1b2936dd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex1.html": [ - "83e1c410f5e8c84911ef14c77476775f1d2dfd13", + "28a7ff4739682b7559a3857536e49bb727c1bb72", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex1.worker.js": [ - "3807fd331127612e13585f0293a332b473d4fa4b", + "0cb79048c5114d7929e816373497e125d8f598fc", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex2.html": [ - "453ec4bd5c3c0e05671436f2653c92660daae1c3", + "0dcf0f8282fd545d8628dc8c16add72f146e861c", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex2.worker.js": [ - "9bb7e2c33c8f06e6fe8075b3942402e3cf7c2bfc", + "d2dd19374844da3a2a0920d0c910ecb818dc3db6", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex3.html": [ - "c1d4e8c1e85346d0cbecea01718f43bdb0438b28", + "8e1bd9fa0f37215a06046e3ffd8ee0bfc8707112", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex3.worker.js": [ - "4eaa0b0d0f57cc927155bdfc11e49f5fee6a065c", + "805becb3b8aa2f4030b50026ae74e339f9c61917", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex4.html": [ - "89c23a0074aab0677204c632293798989caf0222", + "f59991d3170837f47f69ad59333e92dbae43409f", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex4.worker.js": [ - "ceffb191b2bab78f137bac9c0a68136cece4d70e", + "1499fb7e135f06107a9ffe3e329d73d5c3985ca8", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex5.html": [ - "4d62d09be03615fded2cedd04732d691610e51c2", + "9567114a13d02436ae1ad47ebcd981b75634cb17", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex5.worker.js": [ - "7225544f8b71b4399f48ae948ed5f359c424c83d", + "d50daeb4c40678d3af803bcf21221991c4205673", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex6.html": [ - "69dfdc723fcead0bf0a3610ff68c6318e951d78a", + "b36d0c86545cf58b6a59949f4979fb66073e9d52", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex6.worker.js": [ - "2e5a93b49a9b502d8137c29bb4a683281210bd15", + "606aa4f458f80307863a0a4ad7f286968caeede1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex7.html": [ - "2be93ca69a8e7a0123f7f878de59959fbd422814", + "5b38e7873f83c5659ae2beaa66d869abf1161c54", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex7.worker.js": [ - "fbd4a887c5e7b52ea467abc504456765412689ef", + "92ff04a5305358c750cddb09a18af738b806f817", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hex8.html": [ - "f67758d42ed1900f39291bf3568ab3cf62974233", + "1eda0c74a1993a5cc34ac89305902671b32db3ff", [ null, {} ] ], "2d.fillStyle.parse.invalid.hex8.worker.js": [ - "fcc230ce9db65dd0d74c1c3df085ef18fb6aa683", + "4508cc567c247b2ec87ce72b0c3299b945cfd006", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsl-1.html": [ - "54e6711137959fb3e5d070e5a954b1c567ce0d70", + "9ff3c68fe2c5c3ae6fb2335cff2cdd8a3253bef9", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-1.worker.js": [ - "3b0bb9165b3518c5bc5af51ff2c2a72f5d3da7ca", + "e3cbe474b255b275be02b9ff242439e357c9f2fe", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsl-2.html": [ - "7614b8c34d0b9569bda89ede8ef5dcd63294990f", + "46fac5fd400d42bd28a28c4cb23c1f70914bafe3", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-2.worker.js": [ - "ec906f7fa19b4e27c15cb325e963562f16fc5902", + "56c36f3688ab029ac3a86e7eb3f59ef0cac90bc1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsl-3.html": [ - "13d19ac92406ab9220848a76f3d158992b2df22a", + "1f05e8d944299bdd2b366cc91c3d5b10f85f666b", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-3.worker.js": [ - "370eba209785d781cb134d8ffe22ff6f650d2372", + "491b5bdf49821d505fd7cda389aaf45175c281fc", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsl-4.html": [ - "9f01aa2180011f5f7da4f55de709357b95c8091f", + "dd2cec79770250de7d30e0d36961d8c8581cd1d5", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-4.worker.js": [ - "9d53d26c96afe5058893c26a035d47ac66b79525", + "fef0f0aee2e46bd2b3dcacbcdafd81a6eec7a71c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsl-5.html": [ - "23f38067a9ff7f816debda760338a3c9d297c2cc", + "909e230b16d2ccba26ca66f16b534f76fa96f9a1", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-5.worker.js": [ - "98f4b1c7214e5e927e7fd8bc9bb09b22812dbc30", + "635e0bf72e36fe998c400f1b8f18e68d5b81d4f6", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsl-6.html": [ - "405a0e52b24a16099ccc7a64c58270a98604ae2c", + "9bb652c07638987e9ebeda2cbb08d8c08c67ab07", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsl-6.worker.js": [ - "87185470028a255e78ff55db70c8e53f6a1e9663", + "efe1aa7dedc95ac3bda4294be4ba2cf2f5cf2100", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsla-1.html": [ - "ae9d7986b7a82579f88a7a6bb4f0463cb9b32b2b", + "9b553c669d360f08acc25107ba6a8c7bc96d5e2b", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsla-1.worker.js": [ - "b6a70f2a421473d67a3b86bc1139d4af79fc56db", + "757ca911fb5919efc69dca56f268441ee39ff165", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsla-2.html": [ - "de123411ecd538dcc99d6230b799c167ae953f73", + "d894bc42fd7d7e930165e9678a73e5bb3f17296b", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsla-2.worker.js": [ - "809c805352d8404d9e440ce2a67b40c7718701a5", + "be2b2ddf00934b6bd63aaa51415866d8cac08111", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.hsla-3.html": [ - "beab07b8624ebd6530418a03b8cd7b20fbdf0033", + "8901a112b222d39ce1f2baaa5ad3efacfe6caa3f", [ null, {} ] ], "2d.fillStyle.parse.invalid.hsla-3.worker.js": [ - "4d2b53bbeba2026f83acb3067f6493268a8ec829", + "52d3707f7089b1e7eef87868240d3bea8e5eb743", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.name-1.html": [ - "4ac286e61602336ce2ac3e7d53f9079d0640bef7", + "ceb6c53a8399847f5ce31b98be664bab3243fd98", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-1.worker.js": [ - "ef588934c15fcfd14ba05e0726450b193a4fac6f", + "6331a2dfb2fae1a9fac741b465e54bc6745d97ac", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.name-2.html": [ - "6b54c1816b95e928e562fb57a0d153d4320e0af0", + "684a6655749ce2389f99c3565964492b0a3a6fec", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-2.worker.js": [ - "b66a07419c1765b4d2316f49a3d99c1bb1ac7d00", + "101646c995c2a68da6215ca6a6f85ffbbbaaea13", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.name-3.html": [ - "05cfaa906d630b9f379a334321cbe5fc88262c38", + "ebf508f464edfd85ae35ddb4c6aeb9d07f3dca7f", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-3.worker.js": [ - "da51a4ab2ab8de019c558f29dc7f6d506a201ba5", + "61e43e03d8ed2cf4fe517f3463b4142e308386d8", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.name-4.html": [ - "47aab58ada205e3429ec95ced745f542bfd4b0ec", + "ba1f71b123d1d92d5568b5a16ae8797ddbb0e9ca", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-4.worker.js": [ - "c167c2b9556fcd046df045dae8f28d5b51279a20", + "b1efecdc57b863c6c907075b49eba54f097218cc", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.html", {} ] ], "2d.fillStyle.parse.invalid.name-5.html": [ - "af19e193e0476cd95b783ba80ea92e813d51de0c", + "a889a387af966f9d1540ccbddf9b06273dde3612", [ null, {} ] ], "2d.fillStyle.parse.invalid.name-5.worker.js": [ - "8fe3a9b13e62ab214392b26fb455f642766d981f", + "e519fff4262337355d887d6ed92a1265f506da6b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgb-1.html": [ - "300bb85ee2cea3b0b66bac018d7ae331319948ce", + "e1fb32a179f94af1ef3a11a0a39908ee03dcbbe4", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgb-1.worker.js": [ - "3c97d856c7a5127d07170c602f16d4fd49442b94", + "8255f3547851eb1072e0e8d0b619b503fb2b6683", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgb-2.html": [ - "8bc9c079dd152c8a3361a331e0b882bfdcc9aaf7", + "54d7daf999f60030442836fd34f800d3e0e1ca48", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgb-2.worker.js": [ - "7e4e27c9142455d71512417dc44a8e3af7f5a36e", + "c0787e32cb3fa313c72201426c882e89d28a2f07", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgb-3.html": [ - "11e93a1c724245e45324bf6f77c60e1cf978d63b", + "9874fc6f743113f26f5c7a51df8908dff2525954", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgb-3.worker.js": [ - "59d89f7b519e7608e596d1c36588858fb46becfc", + "62365ac17aba33c179a1b38a049451dead8ed945", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgba-1.html": [ - "3a0b39911735afd570382c8eb02499d1e5849b69", + "fbfa4baef2686e5ddf1ff6a32d9590868b438e71", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-1.worker.js": [ - "efd7640594f25064c75a0067e8bf1de19b4df814", + "53063fd9b5b85d6fd18218a0444183b7f6349b4f", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgba-2.html": [ - "28a218052043a9d82aeab014f00a22d2b391fbb6", + "43cd1763c1cf54e73d1a61ad93666959b00adf29", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-2.worker.js": [ - "dfdafb1a7e05d568e77c7f55ac17144442a30aa3", + "df7079284c95e43ebfdabd8ee1dcfcd237151610", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgba-3.html": [ - "d9ad0be5e50ef8e96390dc4d11fb6147ba53d367", + "96955226a53db1de0144cf7ae4ee4a5b1dc39a32", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-3.worker.js": [ - "1dca0eb9b14f280cf1ad8d7db95729b852308ad1", + "8f45ef582f2eaad8d0e5d7aa80217772ad4ddc11", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgba-4.html": [ - "db71a88e704f02e1fea921e905d9dd5a40d923f1", + "9334d693abf7b13f9a523d25fd60244f427ee33b", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-4.worker.js": [ - "dff64ba90730f3314bad794788dac828a1d1be5b", + "47549bea5e7b16166243ba0d85beed7fe84fdfea", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.html", {} ] ], "2d.fillStyle.parse.invalid.rgba-5.html": [ - "00e7791bcbeb940282e8d087f3bd10f7c622f39c", + "7b53652a94512f9462ffaceafec62748b3b894e2", [ null, {} ] ], "2d.fillStyle.parse.invalid.rgba-5.worker.js": [ - "80a65dcbc2d1c976013d5bb159f30eeb4ee84aa2", + "562b9661ecf70ed04896ff97c309f79f35370291", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.html", {} ] ], "2d.fillStyle.parse.rgb-clamp-1.html": [ - "ce03f7b840351baaf203d6e3fc22ead5174d9611", + "c9e9e4c41307ce9445aecab28ce60e3e42fbb986", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-1.worker.js": [ - "48cf6a72f569c3ebd71092406b010671aebb1ee0", + "51b81c5bbaefc94d5e2cb32580c96d6428298533", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.html", {} ] ], "2d.fillStyle.parse.rgb-clamp-2.html": [ - "e4f9260ec6b43d3f8cfae093c39b19484817febf", + "98df8d67e4d27885ef9e54f6bc0dd05ae04d0509", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-2.worker.js": [ - "70adec462ac60643ba20d2048781b4a3ef8fd58a", + "bfe9102f99d9b80183b71ef68ef6212be75595b5", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.html", {} ] ], "2d.fillStyle.parse.rgb-clamp-3.html": [ - "73bbc00d1eda0e40f20125acb05671385f82ed72", + "70f5ed05f6f68045435a98bbd1845e65b1c686bd", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-3.worker.js": [ - "883328b42d75b254fe601f50051f9d297c63b26a", + "809d209348332d3066a541fca9a10e0ae1f08fd0", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.html", {} ] ], "2d.fillStyle.parse.rgb-clamp-4.html": [ - "1bdb70d68c94c651d50efe9dbe2b3f9f9df24d7d", + "1f387998e0d488954ed63450b644a63e066fbdbd", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-4.worker.js": [ - "ca5543ac9b5d2ca184dc3711c633e4751f831ebd", + "c0ec5ec92134259eb5d55fdc36f215d5fc7a778c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.html", {} ] ], "2d.fillStyle.parse.rgb-clamp-5.html": [ - "880ad046e14ee42c78e7ce2a47dd703130f6cdfe", + "c2ac0b94d2df97ec6d2e94f0bca8d4e34207c1a8", [ null, {} ] ], "2d.fillStyle.parse.rgb-clamp-5.worker.js": [ - "41f8799f400c92e3a5719635f8912a4afa255b38", + "ac2692ec4befc76cbedec512f94a526a9a4a7bc9", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.html", {} ] ], "2d.fillStyle.parse.rgb-eof.html": [ - "9a84105dbc5288ee7e4e98d2e2da9ab12a4853d7", + "2979d7da98750abff930a417d302ae3bac5259e8", [ null, {} ] ], "2d.fillStyle.parse.rgb-eof.worker.js": [ - "39589937d55564624442ca6b5997a3469d9d84c0", + "997df7b03f27b64430ac8902c2663fd035cf34d2", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.html", {} ] ], "2d.fillStyle.parse.rgb-num.html": [ - "6cda83e0a8039edad04a3616d37984edbab874aa", + "67ba77f3e382364115c6492b6c823cbd0de9bd7f", [ null, {} ] ], "2d.fillStyle.parse.rgb-num.worker.js": [ - "229d6aec613d7a04868d9dfe17a72b29bc5e8fe6", + "1d54b1f18908c775a3d2a2a1462d2444a76a7cbc", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.html", {} ] ], "2d.fillStyle.parse.rgb-percent.html": [ - "6f7125de0ff7f3899eab6ec8fd23da449bae39f1", + "8fe3be55ed2dd0b1686421e4de36f6226014b078", [ null, {} ] ], "2d.fillStyle.parse.rgb-percent.worker.js": [ - "4ba5c987e58f05d238aa74c802d234ca96196fa9", + "824376083e880594fc4ec7add57aba047f47d611", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.html", {} ] ], "2d.fillStyle.parse.rgba-clamp-1.html": [ - "1cf20f7898c53f0e1fffba8746182540dc838319", + "af3acb95e94578cf4c075444d5d823a73139bf97", [ null, {} ] ], "2d.fillStyle.parse.rgba-clamp-1.worker.js": [ - "9ba73e22eb7ace9b06f98b15739c8b304de88c70", + "e3a5bf56eaa5788bd73a1fbbba5680ae4221bcde", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.html", {} ] ], "2d.fillStyle.parse.rgba-clamp-2.html": [ - "c8b4844ae62b6414c85213e55d0922f60915e76c", + "32ee979894186ca484934fff587b0638287e0c9b", [ null, {} ] ], "2d.fillStyle.parse.rgba-clamp-2.worker.js": [ - "fd1c53a7335c6e4f2d2d655b4b311adbf0850cdc", + "612c40b6752c75fe5ff57a2f7c460a78018bb19b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.html", {} ] ], "2d.fillStyle.parse.rgba-eof.html": [ - "d3fd3df2e4f066a4c230f539b7ed703185ffc450", + "baa42cde181c4a55902a8ff52127c8cd7507fb94", [ null, {} ] ], "2d.fillStyle.parse.rgba-eof.worker.js": [ - "6e51f09b5fa4c98a6c34ac8d6aa9c0b68b6703d5", + "73e0b4fd4361609f8c6dd1f3d0330977792878d3", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.html", {} ] ], "2d.fillStyle.parse.rgba-num-1.html": [ - "1ce69821ae5e5607e0eb2a900abc5c049caf8b6a", + "eaa83e18015eaef3bf969f1df62b501d6068d982", [ null, {} ] ], "2d.fillStyle.parse.rgba-num-1.worker.js": [ - "2805af6e05c58efa1ec0df8e015e4007d7677d0c", + "bb1a97fbe75ae77e1677606ad1edc25fd34e5ea3", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.html", {} ] ], "2d.fillStyle.parse.rgba-num-2.html": [ - "979eff66b24f540ade853f7312789396d43d2c70", + "47bf3ddceda74edbddf42f42d4edf0325fd35363", [ null, {} ] ], "2d.fillStyle.parse.rgba-num-2.worker.js": [ - "2ed1549240763db2b7e681e020828d2c6649ba5d", + "5629ca5cb2292100c1a553ccdcb3d6d9418b0b9b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.html", {} ] ], "2d.fillStyle.parse.rgba-percent.html": [ - "2c737e21c14c40627d2398728fa9f12b36eb91be", + "068befd9b4379fe51aecbe2bfdd4cb5f1d023292", [ null, {} ] ], "2d.fillStyle.parse.rgba-percent.worker.js": [ - "5852ea3eb1e67f42f355c8c32eeb59cedbbcb6c0", + "6d904153250dd4403963702b5bb92dd1ad59683f", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.html", {} ] ], "2d.fillStyle.parse.rgba-solid-1.html": [ - "701b5efc79bf3994345ff2e87488ffd2b5ac7677", + "0e58836e5df54c9a1a97a109239e753130a495d9", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-1.worker.js": [ - "51e6d7742106dc05d3b4f50827237cbd0e37f077", + "cddedb7d595d2672a732f0aa43ec2aa982948028", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.html", {} ] ], "2d.fillStyle.parse.rgba-solid-2.html": [ - "7280c10dd649a2d827d8cee9cb4c4530450b7cce", + "8da29eeffbf812326dbd8fd24441bf34f0a89760", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-2.worker.js": [ - "4dcbd72aef07ccb06b2c8c11e725557247086b2e", + "126cbb9269b1549d2d91b735c7bb84b8de85e547", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.html", {} ] ], "2d.fillStyle.parse.rgba-solid-3.html": [ - "dfbb44397361dded6f45f372ea128bc2b52078ba", + "e67374c541e0fed876c48a3a33388729e7440cfd", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-3.worker.js": [ - "060fad9bb853637340c4916ca7adf5eccafbf3d5", + "d8d1513c9081c271990692fe55db33583f570525", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.html", {} ] ], "2d.fillStyle.parse.rgba-solid-4.html": [ - "131396c8d0975d4d6d451818c463828569b6b49a", + "777aacea70fac9c03949c9804736be06e31eccad", [ null, {} ] ], "2d.fillStyle.parse.rgba-solid-4.worker.js": [ - "43a8cf8251623fd3261f44e23275841c23522238", + "aa516a2d7f0b499eeefc6e7e79dd5a9bfd4f330c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.html", {} ] ], "2d.fillStyle.parse.svg-1.html": [ - "ffcc525b486839c9338919fe904a6cd153d5f207", + "8dc6844ae9f7abd68638a8ecdff9d79abe7cc86d", [ null, {} ] ], "2d.fillStyle.parse.svg-1.worker.js": [ - "86b4f8175dadbc035a2f3ca4cbb04b9aae4e6a2a", + "e8660caf6d62ccec80828b4d21295e9e4c232bf2", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.html", {} ] ], "2d.fillStyle.parse.svg-2.html": [ - "eafecd0e6dace176d8e0ec2e571efc45f6d8d699", + "283356500677d4645d64f004afdcd6ad4da63b3a", [ null, {} ] ], "2d.fillStyle.parse.svg-2.worker.js": [ - "3aa530508e154f7596d1c2fce11a95ab0a465e64", + "3488200d86823f88c2e288894dde15b783b46e5f", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.html", {} ] ], "2d.fillStyle.parse.system.html": [ - "65a84a78ecdbf1968ae9492eb3c09aa20ee6ba1c", + "6e124062b1ed97f53063ed09bc97771298500867", [ null, {} ] ], "2d.fillStyle.parse.system.worker.js": [ - "8e211458234c1ed4ba64e2f9d0eb24ba50442199", + "cf62855af9d2804169fb11658264a0482429e193", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.html", {} ] ], "2d.fillStyle.parse.transparent-1.html": [ - "98da0c29cde3598f4c22548aa0cb5903e964a25c", + "a595d70bc06290fbcd7c80e67c25652a8516d601", [ null, {} ] ], "2d.fillStyle.parse.transparent-1.worker.js": [ - "a934b66c8c5bedcd935ba696138af179d32ba7b1", + "7f9a975bc10db7a369d4238149b1555e11ff06be", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.html", {} ] ], "2d.fillStyle.parse.transparent-2.html": [ - "cfebe8fc1da0f07898a4b55b431b97c671b52a1d", + "0f2a7e06092cfea614e151c192ddb79a55458cb2", [ null, {} ] ], "2d.fillStyle.parse.transparent-2.worker.js": [ - "e577bf55dd6d7fddb44c891f16da4c5903c8c360", + "794ca926dde519561e36a8121db1f4e91bc768cd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.html", {} ] ], "2d.fillStyle.toStringFunctionCallback.html": [ - "70eb6b1a261429b2cee74406f69a9781a00bfd1b", + "3e56bd2b6273b873d65b3cf9dbc860c58761db09", [ null, {} ] ], "2d.fillStyle.toStringFunctionCallback.worker.js": [ - "68ae0a5da2c484d8524e43edf405f15843c22232", + "3ae93092b8574b251d698e3cf8f3eced9c36d150", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.html", {} ] ], "2d.gradient.conic.invalid.inputs.html": [ - "3d1f21ec052a941ebef8f8c8d38de5e3048e92ae", + "5ccb19e09cd3b9980dddc75f9756ffe71e0fe64b", [ null, {} ] ], "2d.gradient.conic.invalid.inputs.worker.js": [ - "b6bd62cbb70c65838a2c06301f9be5bf06b5cbfc", + "19b603ea750ce8daaf01db3d90e3eb67064a060d", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.html", {} ] ], "2d.gradient.conic.negative.rotation.html": [ - "dde54400e28ea9ba59aa32f1bc760a065ef7ad97", + "848f1496eac5bc88b3ea1d93f75fc48f52090029", [ null, {} ] ], "2d.gradient.conic.negative.rotation.worker.js": [ - "68589cfab51990e94c3dd1678a3ef8df9136bf5c", + "1f9735ee08817c2bf1a20ec66c185807b53d9c88", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.html", {} ] ], "2d.gradient.conic.positive.rotation.html": [ - "42d5a87af494d01a572732b2dae09d40e4a8ab4c", + "06b593904fd0b36c345767aec04ec8ae611e683d", [ null, {} ] ], "2d.gradient.conic.positive.rotation.worker.js": [ - "cece603ddb987ad111d90b1715a8664e902a8155", + "45bbf403136c8466408828089dbc4592e92f586c", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.html", {} ] ], "2d.gradient.empty.html": [ - "93229d93f5d7bd31711f980584e8587452af3136", + "bad1ff47673cf8b7822b6173611a7b0ae25a2ad4", [ null, {} ] ], "2d.gradient.empty.worker.js": [ - "207a1b0cabd9e904c520ef40114482a9c3acdf6b", + "225de258235dea575fc8b3fac50abef21e260081", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.html", {} ] ], "2d.gradient.interpolate.alpha.html": [ - "52c11fcbfd7dc1e5ce6a872130fb0649a8e4326b", + "525cb79e03cb68633d7d7d41e13296ab5dc1e10b", [ null, {} ] ], "2d.gradient.interpolate.alpha.worker.js": [ - "d9f08a9bedee65df6808eb81d4d76a769af4c6aa", + "5c2f7e07b6ae10c4c2f4e84c8c43e4268862e144", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.html", {} ] ], "2d.gradient.interpolate.color.html": [ - "8f3278176016bada6c63a3081cac050f6d261905", + "c742eff2f9c09b13320f75c954258129b1d81fa2", [ null, {} ] ], "2d.gradient.interpolate.color.worker.js": [ - "fcf1f84f37c19f5caa5b0f92cc04a89dfbd9edf2", + "6d273b7b43a4f21505157b8281386f7d59610090", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.html", {} ] ], "2d.gradient.interpolate.coloralpha.html": [ - "0e7d3b5577b9a771bdfac7983141ca79a13ef877", + "00575c399a44555c0d3ee2cb3b5b7db64d4115f8", [ null, {} ] ], "2d.gradient.interpolate.coloralpha.worker.js": [ - "cc1cc9f2191b34c4f8db050484eb9701467aac4a", + "1462cb59e25f149fb7ee54447173aa5c53cb1fcc", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.html", {} ] ], "2d.gradient.interpolate.multiple.html": [ - "724ae5c0939218103987493273ddec44cbdfaba7", + "3f2594f2cb13308eec05d688a2b9d0a8afb27d04", [ null, {} ] ], "2d.gradient.interpolate.multiple.worker.js": [ - "ff3687c1a98c6ae3e30da24386b11a87983aea8d", + "ebfcddca9f03d273b6a1ed476ff791ad9b5eea11", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.html", {} ] ], "2d.gradient.interpolate.outside.html": [ - "0ef97af879a252c0768adb663807f680501149b6", + "0dda6c0c23573c886a7b37574662c2bfa36cfdec", [ null, {} ] ], "2d.gradient.interpolate.outside.worker.js": [ - "60d10a59d8ad7750b24fcd7a353ec022c164469f", + "66fc180e7e90de2e521e110c480ee23eeba667cd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.html", {} ] ], "2d.gradient.interpolate.overlap.html": [ - "77eb328ecf1d3302ccd583663c03747033e52f07", + "0139da177aa29965a4907c46a3dddbcc04625673", [ null, {} ] ], "2d.gradient.interpolate.overlap.worker.js": [ - "e11c85f8d81c535211ee1598ee2c27ca793a19fd", + "d404deab266bc8cccf011e93275399773daf8298", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.html", {} ] ], "2d.gradient.interpolate.overlap2.html": [ - "662913b13f96d282250410a9537df616c3a5b20f", + "c26c8ecb782c200e693dad5923e69850328a32cf", [ null, {} ] ], "2d.gradient.interpolate.overlap2.worker.js": [ - "a6329af99acc695fe3a6529725261974ae0d2aed", + "3938081cef7054d9478e288f0465d83bda2ffae8", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.html", {} ] ], "2d.gradient.interpolate.solid.html": [ - "aa488d9412071dd9139296a0f435fae26607850b", + "dd369ae5e3f351b55ccef1f7bd6063b34b4dc0f1", [ null, {} ] ], "2d.gradient.interpolate.solid.worker.js": [ - "8cc4a88d98e97f8ab3f5345d0822167708fc6cf1", + "387aab0ab78b34b17967b15af427b9ab6eef8956", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.html", {} ] ], "2d.gradient.interpolate.vertical.html": [ - "15c4c7c39ef16c8e5d980b629effb789e98320ec", + "dff5708f053d0b851b2d21ac8ab9c1aadcb2407b", [ null, {} ] ], "2d.gradient.interpolate.vertical.worker.js": [ - "a25692cf42f19345f68b08bd47965cf169818525", + "61cf9b6d8e7209a2173280d6ada5d5c9ea4598a3", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.html", {} ] ], "2d.gradient.interpolate.zerosize.fill.html": [ - "b679d5b83d6716f15616bd938707d6bc314dc3e6", + "71d5cb85dd6182d9c2b004aa96d499a32c28b09d", [ null, {} ] ], "2d.gradient.interpolate.zerosize.fill.worker.js": [ - "71df9674ce7e32142d35d6c01b8e8a8661a28c48", + "3b86cec3afc9c209fe7b8036410e8da576eab0e4", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.html", {} ] ], "2d.gradient.interpolate.zerosize.fillRect.html": [ - "9576f2a99e5c02f3327faad8fa5813e0afc71085", + "1b3851cd99ae02365c445a7eb1fef96be94b7e61", [ null, {} ] ], "2d.gradient.interpolate.zerosize.fillRect.worker.js": [ - "b6dfbf081c88db16912cc86c65e312df553bd77b", + "f6ab1d9348761352ca2e4f91563bda7f611974fa", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.html", {} ] ], "2d.gradient.interpolate.zerosize.stroke.html": [ - "81a5e4e35dae91ecf08036de47e8540992ead0a7", + "3b66f6c12ad22df8253adf6cf416ca4ca8a889bb", [ null, {} ] ], "2d.gradient.interpolate.zerosize.stroke.worker.js": [ - "c8744645a022f946b21e533ed884a0d909c2eea5", + "7e215017485a128f9fdeb4a2090653b17e42e2fb", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.html", {} ] ], "2d.gradient.interpolate.zerosize.strokeRect.html": [ - "91cedc706956aa1c49219ebaf548714d5cb3a055", + "e7fd7e7858bf1093fe0fa257de17e25a88224723", [ null, {} ] ], "2d.gradient.interpolate.zerosize.strokeRect.worker.js": [ - "0949fc8a1952f2c191407f569818c24a615f9bef", + "d7344fb4e61254b16607165514e90138063b6027", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.html", {} ] ], "2d.gradient.linear.nonfinite.html": [ - "f3c4209be7e65789f518804e685be22a372fa236", + "bc10ecee537d17ab96ebfb3b68385916d5954619", [ null, {} ] ], "2d.gradient.linear.nonfinite.worker.js": [ - "9fefcc3215bf89cfd4a55f6d8479451633d51bd1", + "87f689186bba5ca3cc5e017027d57260537e5b6e", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.html", {} ] ], "2d.gradient.linear.transform.1.html": [ - "5e7910790778695ba9c7ee07c8e514ec649913fb", + "69fc52ceddc19568ebf9c7673b9dd3f0ef1cef89", [ null, {} ] ], "2d.gradient.linear.transform.1.worker.js": [ - "62a96e2f6778cb93a9987e4ab291da02e9c2c207", + "79cdc96da86bd0b44501bbef6d15ecdb43323003", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.html", {} ] ], "2d.gradient.linear.transform.2.html": [ - "86fb507334976b66b95f031a57340fb1e01b4d0d", + "5cf27f1d8e40f1b6f673826e9db332f6110ff2ef", [ null, {} ] ], "2d.gradient.linear.transform.2.worker.js": [ - "dace251811a60c339cfeed124241a9d56bffccf3", + "a2b532d1f933478cfc143714185eb6545d8e89c6", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.html", {} ] ], "2d.gradient.linear.transform.3.html": [ - "ccbc3ab2839d9568d8da8f98000735185a52dfc4", + "074722a49b506f3fdb57b4283571c130b0a6676f", [ null, {} ] ], "2d.gradient.linear.transform.3.worker.js": [ - "8f5a7115ecabe61632ac11bd1578f27c666eebe7", + "77df9495c3dba95e66b91d9f19f76196fc464617", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.html", {} ] ], "2d.gradient.object.compare.html": [ - "a091c32b2c1fe4bcfd1bf5abb916d9c212583ac8", + "d923a2f552b186cb18a8571553452a6425a93056", [ null, {} ] ], "2d.gradient.object.compare.worker.js": [ - "6c69e1ad35cdfe0f9e76cf40d0852f7c5b9c450e", + "f6d45d259f4f51f008219448e7aec4efd9e7fb04", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.html", {} ] ], "2d.gradient.object.crosscanvas.html": [ - "8d54f95f727302a44417ac858c1020690b7796a5", + "7ea9d84a4c06cce2278559bdb49093f0273f59ec", [ null, {} ] ], "2d.gradient.object.crosscanvas.worker.js": [ - "fa8cee44caab72b2f90407e2c9a5f10de7783dd4", + "f877d596ddffdc2a27acb897a5cf54dafad10d38", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.html", {} ] ], "2d.gradient.object.invalidcolor.html": [ - "e812278155998759d7c1823e4fa47dd66ed56397", + "51160c586f2d846ee69762be787950ea29e12a9d", [ null, {} ] ], "2d.gradient.object.invalidcolor.worker.js": [ - "278df5a0d1bdd423fa945c829a19f465e79d1500", + "40e84ba42be39161a6fb8e0a4939e4e677fb175d", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.html", {} ] ], "2d.gradient.object.invalidoffset.html": [ - "bba405069c4ddebeb2fec0806139495cde7339da", + "b9f11042543e5c7d86a52cfc3710e8b164fd2b42", [ null, {} ] ], "2d.gradient.object.invalidoffset.worker.js": [ - "f71c8402eb72b65d56c7477998f3f278f439caa1", + "80be64235b63f4c3c1d255fa7105c2db08023404", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.html", {} ] ], "2d.gradient.object.update.html": [ - "175c3a215b7b696638d91d76649480cb722cf98e", + "00c60041e733a78da95d297f4ceae4aef7e6b671", [ null, {} ] ], "2d.gradient.object.update.worker.js": [ - "76721140392c083251f5b620165ad2006a935186", + "db79ebfa2f88ad3830bb2dd8e90baea6ba694db1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.html", {} ] ], "2d.gradient.radial.cone.behind.html": [ - "537f960d8ddecb7a288eefee73bf27b24c9b1715", + "9a07ec4dc2f418a94979e1b0fd0a40350b471332", [ null, {} ] ], "2d.gradient.radial.cone.behind.worker.js": [ - "99711c732de57a68bd331f3e84b20ece5c9e69e0", + "806a83f7a533e00ec3b52d4f6e6858a0aa58f95d", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.html", {} ] ], "2d.gradient.radial.cone.beside.html": [ - "360f1ab7359f34d4cd883fa0f19de0cab7c416c4", + "1ab27b46c41865d08610b6218e2167b7d33fa80a", [ null, {} ] ], "2d.gradient.radial.cone.beside.worker.js": [ - "6af48259a3571f8e9e5dc727140bb984e91de3c1", + "2bb0860a6d25a3cfd1c724ac3f7c3403727acec3", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.html", {} ] ], "2d.gradient.radial.cone.bottom.html": [ - "3f3690381d36c686e260e17cfb1d91b3e029e09c", + "87cac451d6427cf155ef1331c94bb1800a26f2ee", [ null, {} ] ], "2d.gradient.radial.cone.bottom.worker.js": [ - "2eca2d573e07de471820508ce1534deeda6d45c9", + "a9c859e7ceaaa0e804b53709e5e6cf1bd26c4482", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.html", {} ] ], "2d.gradient.radial.cone.cylinder.html": [ - "700740938c80260460c6c8f4f2e006050546227b", + "649b83cc8f8c7227dfde27eb94e380b4afba03e6", [ null, {} ] ], "2d.gradient.radial.cone.cylinder.worker.js": [ - "25ff9b861da188abdf319bf33d3bc29d538e39f6", + "8223f5265548b5a060ec20eb42b93f4f08647b74", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.html", {} ] ], "2d.gradient.radial.cone.front.html": [ - "12f14ce0055f15bff21b967b8fe17e7ff8994b80", + "6ad51c17955e4a89580d84e70fb32e6398e71905", [ null, {} ] ], "2d.gradient.radial.cone.front.worker.js": [ - "6053cb40d199ce1610a60656da99a61c670be801", + "a1eb55f2ecc309e1389100e622d37dc47ff6d85b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.html", {} ] ], "2d.gradient.radial.cone.shape1.html": [ - "242aaa0128096f460286ed2ce1db628e9d695dd2", + "7de944a5209e2cf06ee98fd5a95ca63467ec6088", [ null, {} ] ], "2d.gradient.radial.cone.shape1.worker.js": [ - "15e7a6f696cf866ed062008f82e25050d0b1d06b", + "0d211a0c67a017023aa02c0e587faf6b63de8636", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.html", {} ] ], "2d.gradient.radial.cone.shape2.html": [ - "d51a132f82aa48c50aedd7c96ad75f21e0b60087", + "a748546c1a8f4b047440b4c00076a88546c361e4", [ null, {} ] ], "2d.gradient.radial.cone.shape2.worker.js": [ - "793d2513dd390e463ee89b0ef7399477391c5c1b", + "2f561598b9ff70a523177dfda08fdef11ce0a54b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.html", {} ] ], "2d.gradient.radial.cone.top.html": [ - "9759eb3fa98ea35bc3a2a4563239ae27a00b103c", + "802006beecd47633957f598b07bcdab7682e97fe", [ null, {} ] ], "2d.gradient.radial.cone.top.worker.js": [ - "2ee6de3479c79b5ce4f9d3df84f4cc38b06a9161", + "731ee8f807c769f265ffdde131aa72eab5917e12", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.html", {} ] ], "2d.gradient.radial.equal.html": [ - "465ee976fae939ab7e515557d93dcb37205baca6", + "3786e180f3bdcbc7b7f58c5d16e3c2e710400346", [ null, {} ] ], "2d.gradient.radial.equal.worker.js": [ - "74567335b426282261070c921c0b3fc5be133d58", + "d046809a314f66b2a09034cd8f0116691c020e96", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.worker.html", {} ] ], "2d.gradient.radial.inside1.html": [ - "7c6fd31d67d213fb61f3c1c527ab1c6abb3dc449", + "db269a9b926aca3d3db7855f629e730dd96127ad", [ null, {} ] ], "2d.gradient.radial.inside1.worker.js": [ - "6d73c0935ac5514eb9e090a9668a65ab0fd95ddd", + "bc48654ece556af6fb00937353a2668307bd43bb", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.html", {} ] ], "2d.gradient.radial.inside2.html": [ - "fbad8b57b569e80e189a9ab2cc165f78cb77ec8b", + "23de3b00f863a99886da9f87a1fa21ac0ad18ee9", [ null, {} ] ], "2d.gradient.radial.inside2.worker.js": [ - "aa6ecba5f493a3504791b9419d1045ebc36dcd9a", + "ffc1040d0b0ab3c84b97d10cf7a45db8ba896afa", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.html", {} ] ], "2d.gradient.radial.inside3.html": [ - "54794b13fc429136465dc643e7c53b411d5b93f7", + "bbb2ecbcdcaa8d41a7eed5434f06d69281674daa", [ null, {} ] ], "2d.gradient.radial.inside3.worker.js": [ - "b6d58b656c082b935e631e3adcb329fdc5ff9485", + "792d9e7852b9a4ee5236efe4fde14ab1d1b017e6", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.html", {} ] ], "2d.gradient.radial.negative.html": [ - "1fb6af522899a92a838b33612f1801f5dc1ca443", + "b6dcaf175e9b192cfbad70f31a7da67ef6e766cb", [ null, {} ] ], "2d.gradient.radial.negative.worker.js": [ - "e0d2c7cc3340aca26d3d67f6952c810a19043040", + "72ad3f803ecfb1ac3f76ee281bb27ee968bac615", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.html", {} ] ], "2d.gradient.radial.nonfinite.html": [ - "75ab5740db9b486a4974734fa9c661e6cdc5fea0", + "8ba0476938d7e7ec664170a03b17720a16229bea", [ null, {} ] ], "2d.gradient.radial.nonfinite.worker.js": [ - "f09946947ce796b59500a93288298cd7456f87de", + "dd25e607b2c8dabcda4d27bf2ac936aeb0ab21af", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.html", {} ] ], "2d.gradient.radial.outside1.html": [ - "44b2aa49fc177c97e1e224cb0e93b99a9387f02d", + "6c65f23960a9b7e365ed92cd8ea4ccdd9bb4b64a", [ null, {} ] ], "2d.gradient.radial.outside1.worker.js": [ - "e1d3cddb24471c34f362bd2bbd1e0d059f4bec05", + "d7beb71d2f2ffdfc060f42de8501b15349237c2a", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.html", {} ] ], "2d.gradient.radial.outside2.html": [ - "e9e7ce497cd0879a6ed2d52effe4224618038330", + "8f4c48ebc1284ca1b6a79e852733a78b4f72abe6", [ null, {} ] ], "2d.gradient.radial.outside2.worker.js": [ - "a3f0235ed7afbd49994d73898addde652c357f26", + "6c753e38b10e063493f8662d40b674863e8d4b42", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.html", {} ] ], "2d.gradient.radial.outside3.html": [ - "b66480a52c402c1e68b6c27c70ae6159463d8628", + "5cfd30876d668206ba8bc0096548921f800e6ce6", [ null, {} ] ], "2d.gradient.radial.outside3.worker.js": [ - "7b90c87d0385faf66ea872625dd5ea8074dcf82d", + "70593ceb292d8c6e46647282f8f8807e464ed450", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.html", {} ] ], "2d.gradient.radial.touch1.html": [ - "c042b03b3399513ea6c4f6dfeccd4cb34fd30718", + "983071ec6530edbd47d20712f5396c7dfe997acc", [ null, {} ] ], "2d.gradient.radial.touch1.worker.js": [ - "7465345f6bf4026c78fce9282b7a84da631e5e09", + "21bbce1e74125e4933508c76c2f714ef0539179e", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.html", {} ] ], "2d.gradient.radial.touch2.html": [ - "5da1d592f843acaa42806e1f815585ad9293ca09", + "bd23924988288de3e319e2bfbfaf1487706732d4", [ null, {} ] ], "2d.gradient.radial.touch2.worker.js": [ - "91dfcb31acfcf250765c0f833f53cd017e239380", + "75abd38d5d765ade99b381ca717a25f81bd38b8b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.html", {} ] ], "2d.gradient.radial.touch3.html": [ - "804589f074b3edc5042ba1696393aadc2a6d005f", + "bdaed6f7daa822318fbb073e162bbe89be37c8f4", [ null, {} ] ], "2d.gradient.radial.touch3.worker.js": [ - "11e17fbb80bfa26742c8067b86c9af43e4d23bb3", + "b2f3b0b4102e1b4cfefe49e340b1460fff4d8516", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.html", {} ] ], "2d.gradient.radial.transform.1.html": [ - "c54044c0ea62bdd3d846c3d63d16f5fd6a9b633e", + "517c9e32886f8707be8d80a93afc8fe040573a39", [ null, {} ] ], "2d.gradient.radial.transform.1.worker.js": [ - "e2159d269f65b303f50a3f05f4455f1e73c9c95a", + "198dab1fceb38194037e2e7569ff769e2443e287", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.html", {} ] ], "2d.gradient.radial.transform.2.html": [ - "145c2923e9037f9ab984d2b6e0d2f54230dddad5", + "f7f4120a9279757d0c2226efada1067b6d2c28c4", [ null, {} ] ], "2d.gradient.radial.transform.2.worker.js": [ - "511b7f362a4360b340feab344771caffda92bb2a", + "27793b90ab639a21bcddaaacc7e2b6326bb2a631", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.html", {} ] ], "2d.gradient.radial.transform.3.html": [ - "01d14cfbfc029669fe4bafe74b8a98da5748ccbe", + "e0ac17fa82aa39c286e244ea17ab2f6338f7eaf8", [ null, {} ] ], "2d.gradient.radial.transform.3.worker.js": [ - "b7bf68a979daab4a905cdb7f599b025b42c7ef4b", + "1b74d8b4d7d3674f6a20374735784635a43c7082", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.html", {} ] ], "2d.pattern.basic.canvas.html": [ - "80bb946660145a41231c9daacfe31da4877d0123", + "6f66f500e3792654bde4648623a26321fd971302", [ null, {} ] ], "2d.pattern.basic.canvas.worker.js": [ - "a2608066eac5f8f5a878ca24b61ca5e60de676b9", + "6f6b882416aa13e733e7ab54bd6560f6d548180f", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.html", {} ] ], "2d.pattern.basic.image.html": [ - "965daccd3aa7a1a72d0ad1cf1569fe1f2abbb8e8", + "4ffbc6d3ac24db4ccd4aaf68f2e6cfabf42757d7", [ null, {} ] ], "2d.pattern.basic.image.worker.js": [ - "725df51307ed0b9d62a924ebd1e8f07dac4b46b2", + "b9a79d74c9571b3efbac7cdc7bc3e632a2f67102", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.html", {} ] ], "2d.pattern.basic.nocontext.html": [ - "50cd38ed0f0cb2ba7a3b0e47448265aa8ada93dd", + "9fa124277ea3fd7facb2d7fbe2662c36d6a4f931", [ null, {} ] ], "2d.pattern.basic.nocontext.worker.js": [ - "8f33ec9d8d93f8f0808dc0df097468278a04e851", + "11c307653d5385ab2813b55594af7f08b748feda", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.html", {} ] ], "2d.pattern.basic.zerocanvas.html": [ - "5c395ab94e6c3ffabc9c4e52dd631b75a0f03f3f", + "c7f61889ad5c969639427ebe3b38e5ace9c00ac0", [ null, {} ] ], "2d.pattern.basic.zerocanvas.worker.js": [ - "b02e3cc232b6eb10c2d4f36eefaead1f965965a2", + "caeff7cdfab3e1b56ba271b49820e94fae991f91", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.html", {} ] ], "2d.pattern.crosscanvas.html": [ - "c6e0b36092e3b3b8bb37e4015e9c145e84033e17", + "b040e023d89f0ca4264a1b5aade7bb6492fe1e9b", [ null, {} ] ], "2d.pattern.crosscanvas.worker.js": [ - "1a1d045ba6f4b2fc1017c6c95559416c010094f8", + "e7a207447a37997473c71384a989a15f83477903", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.html", {} ] ], "2d.pattern.image.null.html": [ - "e3ad03190d6275ee849204ae5a487757a7364204", + "4297814be97f245427652d37e61aa4ef0b509257", [ null, {} ] ], "2d.pattern.image.null.worker.js": [ - "63dcb8f9422c63f2b1e171d70d0bdaad3fb3e4c7", + "c7d9969619b27a10a5b9ef9794d73a129595eb6b", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.html", {} ] ], "2d.pattern.image.string.html": [ - "ac202ee2a436ff1c13949da410fbd869aca91e6f", + "469f2236fed3d1b69c55c0dd88b259581b75f6b8", [ null, {} ] ], "2d.pattern.image.string.worker.js": [ - "c07e7d51effd5ae342cad79ee1b8844b28c000dc", + "f8525e4a49487ed59d762e6772c53ece4a162c79", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.html", {} ] ], "2d.pattern.image.undefined.html": [ - "0593d4152935c291560c4a74a77063fd39eb9a6b", + "475d8ddafaca795302cedba56ae06135c001e561", [ null, {} ] ], "2d.pattern.image.undefined.worker.js": [ - "1e94f39ea918f1022beb464d5fcb08ccbc93b487", + "dbfdbe9a1e1bbfb11c2c77437e892d46d2268945", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.html", {} ] ], "2d.pattern.modify.canvas1.html": [ - "4c27f26347faabd4a038f5cc22cfd90dc0ee8733", + "11586f5aa7230da02bbe9d461325b4b748a98ab0", [ null, {} ] ], "2d.pattern.modify.canvas1.worker.js": [ - "c83755c984c160ca792f5f423ae9c7a1f7209468", + "3dde0ef9a07ef73492b81fcaee8b829636cb4c60", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.html", {} ] ], "2d.pattern.modify.canvas2.html": [ - "08a6cd896eed95ce926bc8d3ef9983a015ae00a2", + "568140a8db34a657a26080cd3cae4f961e13b0fb", [ null, {} ] ], "2d.pattern.modify.canvas2.worker.js": [ - "a49dd10213ed623975abf636449f8afee90d6196", + "fd70a2fcbb9633abfdbc0bc82f9d5d8bbcae05cd", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.html", {} ] ], "2d.pattern.paint.norepeat.basic.html": [ - "f5d9f5a5582ca1bb6ce5ec26920b9cc002955224", + "7ec80af80fd09b676e8b1b347d8f58bbb1fd0266", [ null, {} ] ], "2d.pattern.paint.norepeat.basic.worker.js": [ - "82a49c331b513713fecacec65a5b474292a5f6ae", + "178be23578fc7abc565af48729b38bf07af3f771", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.html", {} ] ], "2d.pattern.paint.norepeat.coord1.html": [ - "87158be57cec82da1184b1a3cb82b7842e2bb241", + "d6ebd24277eba61a3de8c1b1d7074d8f38bce0dc", [ null, {} ] ], "2d.pattern.paint.norepeat.coord1.worker.js": [ - "731df50c00f8ceca845f5f2b6041b554166c44fb", + "8596a460ef189b5c3b9874a3c9aee70b95928376", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.html", {} ] ], "2d.pattern.paint.norepeat.coord2.html": [ - "a600e6ef578c1829c5622f9ffcbf9e59a2e4179e", + "97205f5489a8e148e9beae116558d83bfd6163a5", [ null, {} ] ], "2d.pattern.paint.norepeat.coord2.worker.js": [ - "bd9c115f0da49269ae36d3f80ab1848d9563baf4", + "5c69536d1015cec9c95e5e66d228830f2ceddf87", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.html", {} ] ], "2d.pattern.paint.norepeat.coord3.html": [ - "c569d877053a14bb76de419f71cc62b7055405e8", + "28104abc4e123813420235ee38a3d3e427b6bb69", [ null, {} ] ], "2d.pattern.paint.norepeat.coord3.worker.js": [ - "cf88ebab7348dfc75246785224b0699640bb3293", + "994bcc8a7343d073bf3b8b4b530ddb779a865800", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.html", {} ] ], "2d.pattern.paint.norepeat.outside.html": [ - "4242375b0308626175bf1942e29b133227e996c0", + "5036f8b6b506b1255e2ab9708da1ae5a49a76daa", [ null, {} ] ], "2d.pattern.paint.norepeat.outside.worker.js": [ - "85a6e43bd1094a48820ce18f37248ce40a87ec54", + "f6ccb838ded5f05dd4db53192e07409e69436bc2", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.html", {} ] ], "2d.pattern.paint.orientation.canvas.html": [ - "ccad92e529c6a90902499bcb419399266798f32c", + "f7305573c4668f65f9bb18a8a03cd4594e418fd3", [ null, {} ] ], "2d.pattern.paint.orientation.canvas.worker.js": [ - "38fa35f138dbae6975c1316ff58d1f8c0bec2758", + "7896c70def22cb760f6cbc47dcf5d971eb424591", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.html", {} ] ], "2d.pattern.paint.orientation.image.html": [ - "377cc58685baccab280eb7528748cc2d2b187d93", + "05b278ad81bd5ff9f4e15500132d8f0ed7353bca", [ null, {} ] ], "2d.pattern.paint.orientation.image.worker.js": [ - "fccfe704267b1fbd84e58ad9d8bad0880d12ee6a", + "825e12add0942e8300b125c385455b29e89ee807", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.html", {} ] ], "2d.pattern.paint.repeat.basic.html": [ - "b5613c379801f2120164950166f1de5caa8cbc37", + "15b7ff2c308414e50496191e05464a1d7e994b51", [ null, {} ] ], "2d.pattern.paint.repeat.basic.worker.js": [ - "1f09d297f9d1e440c163323fb7a752e5b84a1424", + "6bf7392451733af1fd306447aecee6acc7cc93d1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.html", {} ] ], "2d.pattern.paint.repeat.coord1.html": [ - "a4b2bbdd7d8964d202419848fbf274127eabf6c6", + "225838972eec509688d75d548ba6d5deb7e2af68", [ null, {} ] ], "2d.pattern.paint.repeat.coord1.worker.js": [ - "ea064ea327a6426431b3536dd72bc1f264d6b71d", + "32d1a27b3491a27d3448942f42aebb50464ae477", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.html", {} ] ], "2d.pattern.paint.repeat.coord2.html": [ - "52449506a7d98fb21e813fcca38ec622b03cea71", + "73c31e02b8e2024ceeb301f3dd0e439a4a026377", [ null, {} ] ], "2d.pattern.paint.repeat.coord2.worker.js": [ - "29c6f8f006deb3c1f877a68273fd89b1cf9bab38", + "a94f8206407850fef6e021546faf178434264396", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.html", {} ] ], "2d.pattern.paint.repeat.coord3.html": [ - "d01acb8a6deb7529246b176b879be91394a5f862", + "c31528d87a758f152fb2241ca22e4cb1cc61e4b7", [ null, {} ] ], "2d.pattern.paint.repeat.coord3.worker.js": [ - "91c14f98dc0b360444d5181c7196216c6fa0bfb1", + "ab7059b7849856de4124543233f3fbc1e5b567d1", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.html", {} ] ], "2d.pattern.paint.repeat.outside.html": [ - "2c91f1d736cfd18b198ce445c76f7a045f2c8fab", + "1230be998aa2b1b255518d7359c8d31b77e35b82", [ null, {} ] ], "2d.pattern.paint.repeat.outside.worker.js": [ - "147eadf8e717f32f9e6e726cf3ec5b6fe751c5ec", + "1874aa9a30a1b4dcc0d59c227b7276fae327f5b2", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.html", {} ] ], "2d.pattern.paint.repeatx.basic.html": [ - "ed7cee297d328431590d35806467e7ffd0df6537", + "3e7b8b2b5027a604e339fc293d0e5b1a3b933d62", [ null, {} ] ], "2d.pattern.paint.repeatx.basic.worker.js": [ - "d7efcfa1e1389eddc4068f2aa2c0d4212a3c0f40", + "49d343cf9049689944211f9221925d51322212c5", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.html", {} ] ], "2d.pattern.paint.repeatx.coord1.html": [ - "342ce06aadf3b1167b162811059bc1cba280204d", + "9405b3a583c8eeef080d92112f7e652e082091c4", [ null, {} ] ], "2d.pattern.paint.repeatx.coord1.worker.js": [ - "351092befd370a1e919b578c31ca970d94899f7c", + "69c54c447a580adb33512feb9f1a296bee45f2f9", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.html", {} ] ], "2d.pattern.paint.repeatx.outside.html": [ - "ad4a4a2461430531d8588ea42366b238931f0ee4", + "c81e3ce196b1ffa391041fc89633d5255a6b8648", [ null, {} ] ], "2d.pattern.paint.repeatx.outside.worker.js": [ - "0e031109f287d8fd5ac3cc4f24539c4617ec55d2", + "c4194a369843f93069a6d9aee67341ed4f9d50b7", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.html", {} ] ], "2d.pattern.paint.repeaty.basic.html": [ - "6069902498e57254cc4bcc0f1b5b68b40cf9951a", + "cef32b3e9d5960fd50716b39890050fe098c4350", [ null, {} ] ], "2d.pattern.paint.repeaty.basic.worker.js": [ - "09e9b023946a016df5a266570810f7baaa426216", + "b460e240b969930d6032fd34dfae193061c0c217", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.html", {} ] ], "2d.pattern.paint.repeaty.coord1.html": [ - "fd1cca2e9592ae954b5a598849f7211364af6bba", + "490b2a19939ab5ffbebe2647315acb0a52ab7f4a", [ null, {} ] ], "2d.pattern.paint.repeaty.coord1.worker.js": [ - "1701d3cc766363ca5f666079574e5ba9444f8eed", + "05fde112be48e9f765476b75120a1643ea734b69", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.html", {} ] ], "2d.pattern.paint.repeaty.outside.html": [ - "b7fbd9eb8794fef5e89563e84bda00ab548d31ef", + "954280620aa33794b8dc0f167ec969f6a75270a4", [ null, {} ] ], "2d.pattern.paint.repeaty.outside.worker.js": [ - "7242c8ff484c16faed0af67ccc342540817ae83f", + "c421fbc0d105b7a5361207f99aa2a5c5b4db95db", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.html", {} ] ], "2d.pattern.repeat.case.html": [ - "5251f93c8f1b3892c6a9daecbda70558b8c1e8a2", + "377ae3edc44b60e66d84ada314b419b4886da019", [ null, {} ] ], "2d.pattern.repeat.case.worker.js": [ - "6a7dd8d6dd7d986279665cd4c84c7140b12fe0e6", + "8073f47ed0b9e17a0eb771827463bd2ab758ae62", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.html", {} ] ], "2d.pattern.repeat.empty.html": [ - "76e54e9616f011ae8748865ba8a5b11d7a90d657", + "95baf291171ab97e5a3b1ff92c9e1283ef7ce1c0", [ null, {} ] ], "2d.pattern.repeat.empty.worker.js": [ - "e3048881e371923781d2244e33b6edb272e5d459", + "5187ea44b6cef4dc5f166889912da1b92d8da9e2", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.html", {} ] ], "2d.pattern.repeat.null.html": [ - "0e97c7aa6755db7cc0a7012e9dec2327b0c13de5", + "d79551a3021b119e7c6502aa713d1c75e62ad7c8", [ null, {} ] ], "2d.pattern.repeat.null.worker.js": [ - "57353f338c7e69c1554951a1ed80beb5d3755069", + "6ab4da9f8e6a562ca81fa908a23b01fb54aa23c7", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.html", {} ] ], "2d.pattern.repeat.nullsuffix.html": [ - "d5166d750b97cb2ba8ada78f527425fb3d52714d", + "2f4a35dedf699ae795683cca0f472d697a01c6a9", [ null, {} ] ], "2d.pattern.repeat.nullsuffix.worker.js": [ - "baafd4b43a04198f90af8a040a0d9afd4e90e6eb", + "83e7c62fe5f453d1da89357631e42beafc00a923", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.html", {} ] ], "2d.pattern.repeat.undefined.html": [ - "731ef86f83546039a4170fbb1e61f554674e49c2", + "8ddd2319852e44cb6ee29a55ef23796cd4cb4c3e", [ null, {} ] ], "2d.pattern.repeat.undefined.worker.js": [ - "1474ac43dcb78f0bb339cebaf2b3cc6f54e51d84", + "f4f25ae5a2868953aa10084c33b0bbd229719c8e", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.html", {} ] ], "2d.pattern.repeat.unrecognised.html": [ - "793ed67a7c1f7c7f5a5605871ed884266ddbac15", + "3a37b46ab7db2189dc9b5bf4b625703652d804a5", [ null, {} ] ], "2d.pattern.repeat.unrecognised.worker.js": [ - "076cba562c419e6e86a799b06333e537076cae06", + "3114dde21a077cd0fd718002d28235deb27e2609", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.html", {} ] ], "2d.pattern.repeat.unrecognisednull.html": [ - "59a0be4296be6c4549f5a98e9fce4058c7bb5a52", + "58fb005d700a97f16b134059148257089f93180a", [ null, {} ] ], "2d.pattern.repeat.unrecognisednull.worker.js": [ - "0adfe9bf41831fcf45e60194fc0ead5e4781468f", + "c8d18511f406cc7274a1fdf615f691adfd4f535a", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.html", {} ] ], "2d.strokeStyle.default.html": [ - "70524cb6d999be2e1ecd3478239350c7713dd5f7", + "cd7e424374a31debc172a150fd41bc572a8a4204", [ null, {} ] ], "2d.strokeStyle.default.worker.js": [ - "0d72f35264b276bf04d55b52014f7760262d6b5d", + "9e0ac8be3ea52d22ee29f96085444c72b153d924", [ "html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.html", {} @@ -596418,7 +597216,7 @@ ] ], "offscreencanvas.resize.html": [ - "e259f79ca2819936e33bafe8d0beb6ce610325f4", + "3ff0eea153f6c3d9ed393fea24d0947b1f8fb53d", [ null, {} @@ -600006,784 +600804,784 @@ }, "shadows": { "2d.shadow.alpha.1.html": [ - "cf887b62a28453ad6d13e07ea72f8fd4f3a47741", + "603d5e5da4274a3f47dd390adb25f40403eae2d0", [ null, {} ] ], "2d.shadow.alpha.1.worker.js": [ - "7bcf74463c55f07d144e7157b2d280eaac6cb1bc", + "0bc92ac4141752c173d1e520ee9c2acd8aea1ab7", [ "html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.html", {} ] ], "2d.shadow.alpha.2.html": [ - "cb03866bc37ed34fc2e81c228955b60efcb29fe4", + "254d214c4cd1f5bd036fe6fa40e1308b429944f1", [ null, {} ] ], "2d.shadow.alpha.2.worker.js": [ - "8f4b98143b345435359a8d89650bca15dbe4c8f1", + "ff543b3c8000b9a83f567ccdf1fa5dcb47f79327", [ "html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.html", {} ] ], "2d.shadow.alpha.3.html": [ - "efc9fca97e262d0837319b88cf46cb2ee6274f45", + "2c50c0d748a59694e8b6f24bd0ca3815af1439d0", [ null, {} ] ], "2d.shadow.alpha.3.worker.js": [ - "ddaae242d969c06b87a23160c3d8552f29ab35db", + "d8bc071c85d9ca97ce50d620eb1e1c407171fd4b", [ "html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.html", {} ] ], "2d.shadow.alpha.4.html": [ - "295b61269cda8606287f042fd0ccf701cb517dfe", + "d86ee4c4bff063ae5c8a3f07e65ce72a607559c7", [ null, {} ] ], "2d.shadow.alpha.4.worker.js": [ - "16defd9094a8f9822153bd9e454aa609ac9ddeaf", + "4fdb8ca7dc58026a7f61940e25aa4b2e66a6b5c9", [ "html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.html", {} ] ], "2d.shadow.alpha.5.html": [ - "3b1089d7d79be5d5236c7b28f3af85955f4840eb", + "4c1a9b08cb051094667aef27d441100312dc0a64", [ null, {} ] ], "2d.shadow.alpha.5.worker.js": [ - "5437c65ec17e019ea234f653b75ecc75f0b65b19", + "be4b78d87c55ecd3eba17836b6507e413d411640", [ "html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.html", {} ] ], "2d.shadow.attributes.shadowBlur.initial.html": [ - "e6c4c2fda8997d0b4fee235cac4bfaa82b339788", + "21225883df9bfa7b42d2edb550a8c9b0e45be01f", [ null, {} ] ], "2d.shadow.attributes.shadowBlur.initial.worker.js": [ - "9cf55e796b4931c2097540b8cb86c72f08d02978", + "7643f0edfa4eb645859e22cf126fcbd3c1f4e67a", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.html", {} ] ], "2d.shadow.attributes.shadowBlur.invalid.html": [ - "a506da4b8bc382d35cb1a52b2dab0dad9cb0ce8a", + "8f199766fe22f77582e0b44c646be4db7fb94dcb", [ null, {} ] ], "2d.shadow.attributes.shadowBlur.invalid.worker.js": [ - "1f79c36d1228dcf3a40e1bdebbb76fd567c599e0", + "303b43e8193e87c15d21d5159223cf5f4f6e3c9f", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.html", {} ] ], "2d.shadow.attributes.shadowBlur.valid.html": [ - "b69b9c471749f05bf016789e84a921c9440b0e34", + "299826a5a2e96de50e1693cd16935def63c6ee3c", [ null, {} ] ], "2d.shadow.attributes.shadowBlur.valid.worker.js": [ - "b41fa249054fbb074127f36b4756b677a8696f8a", + "c41588b50edffd1affd01a722b56c3ce38baea83", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.html", {} ] ], "2d.shadow.attributes.shadowColor.initial.html": [ - "44a25308ac5208d6bc43473a24ea489422626018", + "92a8bd15006de9a1064ec334aebf6d689bca7e64", [ null, {} ] ], "2d.shadow.attributes.shadowColor.initial.worker.js": [ - "f8132d53856463b9120968b25ed7b660ae8dd336", + "8b1ec38d7ffc537822c8190556d56a226256f17c", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.html", {} ] ], "2d.shadow.attributes.shadowColor.invalid.html": [ - "ed09bcbdcf878fae3d5b761c3510d262c3ac772a", + "93a480b307b30c3f13c7043028a0a2aa9efde235", [ null, {} ] ], "2d.shadow.attributes.shadowColor.invalid.worker.js": [ - "b1003718c56abdd9496dd662b9ecd2fc4032e5aa", + "67e0fa80bc072e7901d00948dd5cd9457e9ddb9d", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.html", {} ] ], "2d.shadow.attributes.shadowColor.valid.html": [ - "9511027b5adebba87aaf2aab29643eb4dc8332e5", + "acd36360a8f67ab06c9159fc375f8eefb4aae046", [ null, {} ] ], "2d.shadow.attributes.shadowColor.valid.worker.js": [ - "f47e3660b50baf50a6b0e4d088ad2f1d601cc755", + "02444723b4ed0c6089bcef887bafc03eaf8a394e", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.html", {} ] ], "2d.shadow.attributes.shadowOffset.initial.html": [ - "e568569a585f7ae48c40c075205114527fd55c4c", + "52be5ad532d524cd001719511ad0947d1e8b75cd", [ null, {} ] ], "2d.shadow.attributes.shadowOffset.initial.worker.js": [ - "af2e77f4642561348e6f78c2e7cc48811be22ad4", + "b7b399b37100e914ac42e0ef4ef1ce2daf98439a", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.html", {} ] ], "2d.shadow.attributes.shadowOffset.invalid.html": [ - "58c8efec200e53d8979ac4cd38b35d6e2dc3dc1a", + "be055aa37ce3bcdb18f66d58a092b378df69e89f", [ null, {} ] ], "2d.shadow.attributes.shadowOffset.invalid.worker.js": [ - "892614781ad355c656fa42a2cdc27d4bcf2364fe", + "37ae2e6b7852ae3d1f71530fd91ae84b67da9b7e", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.html", {} ] ], "2d.shadow.attributes.shadowOffset.valid.html": [ - "1ad622c468d4b9572155bbd5f77b294f1e7e1c6d", + "785966cb38e68b849fb559d12e677e52ba70bf19", [ null, {} ] ], "2d.shadow.attributes.shadowOffset.valid.worker.js": [ - "eed84b54e5bc52b2ec653ab412349da687e43047", + "a6e047ee2b701d0d4b4938c36cf7d9b21a10e94e", [ "html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.html", {} ] ], "2d.shadow.canvas.alpha.html": [ - "5fea8a7cf3d7ccf1aa43449d6b8ffc2ff0d1e33e", + "ae046cfe19dfb658adf80706bd68213d4ca52285", [ null, {} ] ], "2d.shadow.canvas.alpha.worker.js": [ - "663e89f28435c85096dead2f20c9c91d1e0a5ad4", + "21d6309c18321bc949f3526623e48d67545dc3a8", [ "html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.html", {} ] ], "2d.shadow.canvas.basic.html": [ - "2fc6b547d57ed334c6b79ccb7f76f8db9d646f8d", + "3ba1cf1fb06b5ea4876c9f12be9981fb423aaa1a", [ null, {} ] ], "2d.shadow.canvas.basic.worker.js": [ - "20c433b2f6a2a1b66ca1ad64a3f698f5e6920663", + "8ec3f4acb3c1dc505e14ca1b8b987b59ba44b5b4", [ "html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.html", {} ] ], "2d.shadow.canvas.transparent.1.html": [ - "1bfcb3bf3b7ab858adc440ea03085e4c8d43c5e8", + "960d870923d4e063b7d0fc61cea90a6d2d8dc9fa", [ null, {} ] ], "2d.shadow.canvas.transparent.1.worker.js": [ - "413ba6b24387cf66bf88e4df3e16b143d10abd10", + "7fd807bda4e65dd7908e560994b7417a7ab36e39", [ "html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.html", {} ] ], "2d.shadow.canvas.transparent.2.html": [ - "6d30dfcb85b96e4a372ada3fe88bec1e98f38d3c", + "2f1d31d7066555906647fecfe237c675eaed9158", [ null, {} ] ], "2d.shadow.canvas.transparent.2.worker.js": [ - "d702ded7463e79b82c7d3cd4c560f81fe6c6ffc6", + "1347eb095feecff4cb0d0318b8552b599678c280", [ "html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.html", {} ] ], "2d.shadow.clip.1.html": [ - "4beb1214b24891a0f4caa79e90eaadd75d780eb2", + "a762ab5f9f1af56996f282b38f71a126fa6a707c", [ null, {} ] ], "2d.shadow.clip.1.worker.js": [ - "4fafad83307e1f4ff24ba262cf198e3359ceb710", + "2a6423a8b290c933dcf480697e28e74be65381ab", [ "html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.html", {} ] ], "2d.shadow.clip.2.html": [ - "bc3de09db7ae11813b4556ef99837d5e67edc334", + "31055d7200d1e5beeaa59f4ec62c8e1f918a8f94", [ null, {} ] ], "2d.shadow.clip.2.worker.js": [ - "dd2712af40cba92f50ec5e720026ec3c32e1db6a", + "2c6b8deacd450bee021dd9c548a345684d9526e0", [ "html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.html", {} ] ], "2d.shadow.clip.3.html": [ - "9656feb41fb179aa633390b316c1b20ad4843547", + "3b62b233d1415f8ab1116dda3e534ad1cb53c5a4", [ null, {} ] ], "2d.shadow.clip.3.worker.js": [ - "ed4983ac8ca6408486cbf559b0d92d1987aa9e3a", + "c97f9e5c63a33f9a34841fcd370b91f0efbe80c6", [ "html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.html", {} ] ], "2d.shadow.composite.1.html": [ - "13e0daf3aa1b491a5b40a969dc0b27aa9e0287b7", + "e9a400f1e10b870480b01cd79036e088e26f5e60", [ null, {} ] ], "2d.shadow.composite.1.worker.js": [ - "04d4801db90f69f31a005ce85c922d5c5dcc01e8", + "10baafad47e4664ac6e5f134d7724b034ed79c50", [ "html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.html", {} ] ], "2d.shadow.composite.2.html": [ - "aea36997b65d1e1db0bc6ff3b7b72a2c0b3609ef", + "0a4c515bac2b433475c72e9ceb6cfcb41c9d0187", [ null, {} ] ], "2d.shadow.composite.2.worker.js": [ - "505e3d535fa8614017582af50b6a357f99a107f0", + "20c89c1390cf17cf940a8ec003fdbc0dccbd6f30", [ "html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.html", {} ] ], "2d.shadow.composite.3.html": [ - "2218602f38d60fac3afe3abc6d8a7464b813b437", + "56218430ef42c715c7e36848db3897a38b7cd754", [ null, {} ] ], "2d.shadow.composite.3.worker.js": [ - "fd58d06192ee8b991f1c33e4f9db4c3064577720", + "1257b3f5749222248588b0df4ed2288d65f8d45a", [ "html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.html", {} ] ], "2d.shadow.enable.blur.html": [ - "edc4c527b21ceb0a69b13a614a3ff11ef659705f", + "a25be8ebcf732c74b9291272f6612ec3c820c7ab", [ null, {} ] ], "2d.shadow.enable.blur.worker.js": [ - "85bf21a0861786bb04d2ef51714047bff48837aa", + "859ae8b612484208169858eb0db0b77acbafccf4", [ "html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.html", {} ] ], "2d.shadow.enable.off.1.html": [ - "f0c92820900f672f9e882b172ba779aad996f443", + "de85b7366b55481d88dd2600a36fa022bf312363", [ null, {} ] ], "2d.shadow.enable.off.1.worker.js": [ - "dae0ea648dd2053423f6db6d414c23ae68ca2673", + "7ccd1351fed3f4576bc13d4155fa9013774add12", [ "html/canvas/offscreen/shadows/2d.shadow.enable.off.1.worker.html", {} ] ], "2d.shadow.enable.off.2.html": [ - "3c27b988c94140aceeea22d283871fed090e31d9", + "a57cb66afffd0fc571588fbe6260d74cee329411", [ null, {} ] ], "2d.shadow.enable.off.2.worker.js": [ - "2f1573ef3fe0384a16c6c7ecfda8c8f846df52b1", + "e068a7ab54c011b69b8a58b7513c5f532f3c4aba", [ "html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.html", {} ] ], "2d.shadow.enable.x.html": [ - "9107ef25de021651d5d416e6582b6660601d7d45", + "70b0a84dcfe40e5ebb8a2aa9f927a59fff5069bb", [ null, {} ] ], "2d.shadow.enable.x.worker.js": [ - "d8e7d5039bb135fcf5788265dc3276c9dbc7dd97", + "975c621ffa30eea7aa3e809d14475078f11a0147", [ "html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.html", {} ] ], "2d.shadow.enable.y.html": [ - "77a79d8457d8799fd44bac6854834e65fb41737a", + "df8bcc2ba280f37ec694a9ebd8a8ad05323c029b", [ null, {} ] ], "2d.shadow.enable.y.worker.js": [ - "53140b13a96d0e2323146784d138b3b88f5a1035", + "1dae1000a3d7a4fb8310e88547676bc7e3b60743", [ "html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.html", {} ] ], "2d.shadow.gradient.alpha.html": [ - "d92a2484408f311c354867dfd8b8f846d6386762", + "384838584e0b6620ec7e8ffe1825da767c8b5962", [ null, {} ] ], "2d.shadow.gradient.alpha.worker.js": [ - "b5b65a00563e7754a6c8306a204251c6819b6114", + "65d582dd790f9eb137774b32b46f4bdf63c99c5c", [ "html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.html", {} ] ], "2d.shadow.gradient.basic.html": [ - "b88281be9a3995273664019774d3eb56a56bb05a", + "c411b64e84359f733b15fc65c8d5346891c6cfe8", [ null, {} ] ], "2d.shadow.gradient.basic.worker.js": [ - "ef9ce712f2b8c23059c1bcb26e755d1a2c5c7bc2", + "2630acc1a4cbe69400202008d0cda48d7969f5ea", [ "html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.html", {} ] ], "2d.shadow.gradient.transparent.1.html": [ - "f71a8b4222aa81195c38d575afb121bff36ff0eb", + "852d4268fd5d18f63d14cbafafce646914198acb", [ null, {} ] ], "2d.shadow.gradient.transparent.1.worker.js": [ - "b60d6f7f593206c52d5a0c21d363100dcf5494fc", + "b08401426af70523d41a370e09d803694ba82b50", [ "html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.html", {} ] ], "2d.shadow.gradient.transparent.2.html": [ - "d7c560ec4637e1749c45728609577aa4435c56ee", + "b2c7967d1a717aecf97e69c1529f3aacd62c23e9", [ null, {} ] ], "2d.shadow.gradient.transparent.2.worker.js": [ - "7226b004b808e152eb8257f7ec85f2049077ae70", + "bc651c594ea6e39c9f99f5c8553e63c772baa4d7", [ "html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.html", {} ] ], "2d.shadow.image.alpha.html": [ - "5add7eae5acaedc5800910ece74403bfc77959b6", + "6a1372eef3fea1452d90aa28e6ee5e4ceafbfffc", [ null, {} ] ], "2d.shadow.image.alpha.worker.js": [ - "7a1d99218f130501b805206416edb94959ebdae7", + "726c6d985e0eb7e81416eadef3fbb5c4def033f1", [ "html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.html", {} ] ], "2d.shadow.image.basic.html": [ - "101cfbab0c167d150f7c5efa2b6fa887229d59fd", + "043988187a87f5b4bfe61d7c4a5ee3c9a09e9f52", [ null, {} ] ], "2d.shadow.image.basic.worker.js": [ - "f1d72def72b6fa99bdb0f9aa092a4123991398cb", + "cf8f072b79f790b90bf40b7bc27688caa5137ac7", [ "html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.html", {} ] ], "2d.shadow.image.scale.html": [ - "c56a73f7366dc2bda073e29f8200cc887135a973", + "b53bd89430b293975bae70433b8d1402dadf5aa5", [ null, {} ] ], "2d.shadow.image.scale.worker.js": [ - "a8c0ead903b8a6add39dd4ec8f9c2e26b7e7dcc3", + "51db38d150dc1a7d6b9bc5d871a2b0a2b4a9560d", [ "html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.html", {} ] ], "2d.shadow.image.section.html": [ - "cd0950349919b2cb8a0b3683caf325a54b9cc654", + "9b04130ae831f8aab4edba3c2903cef669669811", [ null, {} ] ], "2d.shadow.image.section.worker.js": [ - "60e32b48835a16f1f60cf7377caaa1227b1d9f88", + "e5824d9761d865312d7875b7ebd318a22271d5ba", [ "html/canvas/offscreen/shadows/2d.shadow.image.section.worker.html", {} ] ], "2d.shadow.image.transparent.1.html": [ - "37844050a95f59ede4640feb953a540254ec9630", + "fef5711055716627a83a4e95ec98d89561cf9b38", [ null, {} ] ], "2d.shadow.image.transparent.1.worker.js": [ - "8e8ded8bd3d8185cae4fb32c1cb7899ec3201a3e", + "a52914070d1187e75a4ac902bc7bbd0ac2424955", [ "html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.html", {} ] ], "2d.shadow.image.transparent.2.html": [ - "996bce718a34b1fa691249361f99d82f7964bccf", + "bdd5c12b59bc979fb3f345b50439f030760ad3eb", [ null, {} ] ], "2d.shadow.image.transparent.2.worker.js": [ - "5075d6cfa7e07142fe342d4903b4cba3556a1da3", + "26e0afc10d3c49c759d766327a543bdef049be2f", [ "html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.html", {} ] ], "2d.shadow.offset.negativeX.html": [ - "97c04018ac4726ca02b9fd9f2882ff79dbd100cb", + "cc0d1adb973f568a61129a3b01edf30031f4b903", [ null, {} ] ], "2d.shadow.offset.negativeX.worker.js": [ - "93c226570fb4de9309e9fbafe186eafc16dabe62", + "14c709a2a02b203ffebcaa953f256ec415c9b7b0", [ "html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.html", {} ] ], "2d.shadow.offset.negativeY.html": [ - "7f5d5ab9a8923adc29d212d4045e64fe9184bda4", + "82094cf2f9068e4d2691f7fbbed0b487fd2bc257", [ null, {} ] ], "2d.shadow.offset.negativeY.worker.js": [ - "6ee0bcc7c5d1430c70956b7d0140cd6f02d4e98a", + "036c6154cbe67556e55f28aae1446d4ec1255afb", [ "html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.html", {} ] ], "2d.shadow.offset.positiveX.html": [ - "a745de88ab625b7d69d4cded7362b25d0bf8c215", + "7094e98ecf63338d8930604e0c4ba17ebeb71304", [ null, {} ] ], "2d.shadow.offset.positiveX.worker.js": [ - "241fbda8f31ea2305e42cb22a8b1edaeade229da", + "176aca45f498f5a528c7f51fb5afd7a87d806f08", [ "html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.html", {} ] ], "2d.shadow.offset.positiveY.html": [ - "168b179688489e2c778f7bfe4a0eb41d7f74b163", + "75e9b0affada3fa434db0f7d49903549fc0225b3", [ null, {} ] ], "2d.shadow.offset.positiveY.worker.js": [ - "b3236d66a529e49ac716abdceee9fe15309a351e", + "6b4d0c6a214ec6f0b65a941a9e3c59be66b49a7c", [ "html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.html", {} ] ], "2d.shadow.outside.html": [ - "207160d20f56b9b1947b337bd9f2068620e74904", + "498051465be3406b0eaedd923cd2ffd923992afe", [ null, {} ] ], "2d.shadow.outside.worker.js": [ - "d0787d67a41f25eca1503cedae9574c7fa6759f6", + "d2a071f4748fd18d293a36c0c8bc1e8c76dab62e", [ "html/canvas/offscreen/shadows/2d.shadow.outside.worker.html", {} ] ], "2d.shadow.pattern.alpha.html": [ - "48615eadcfeb545689a9a1d8d68695ef913264aa", + "f2aebf795e6d5dd2ec769f0305f3c410a00c1513", [ null, {} ] ], "2d.shadow.pattern.alpha.worker.js": [ - "6a533845ab250fa70b249cb20398da9268c9cbe8", + "2dfa1040941abf4184e78a230669157641d12077", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.html", {} ] ], "2d.shadow.pattern.basic.html": [ - "586f7ef336097cbca192598d651748982474db23", + "b26e476ca03f2404f248e20b7c7f3a0efdc3aac0", [ null, {} ] ], "2d.shadow.pattern.basic.worker.js": [ - "6d2dce7c1b6cbbbd487cd8513be37d3a32ca880b", + "f972db853a5caad1bdf2e43c918515e13234d606", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.html", {} ] ], "2d.shadow.pattern.transparent.1.html": [ - "6d97b590afeab9bcd7b9f31da823ce9f77964ef8", + "62dd7ad20f46333fa291a1f72b8431c63ac947a8", [ null, {} ] ], "2d.shadow.pattern.transparent.1.worker.js": [ - "cda0aa956d5cf495931946b280d869aa8b3f238c", + "120c5e4580f2b3f745db28a61108ec516bcd84fc", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.html", {} ] ], "2d.shadow.pattern.transparent.2.html": [ - "600fbd03ff7661d0510a2da20b2a1e800ce5bcca", + "423f0642d5ecd1bd2b327f1d32f9eb3b1b7e6d05", [ null, {} ] ], "2d.shadow.pattern.transparent.2.worker.js": [ - "2aa31661469021fd12e0d3b34fd306af4e92c2f0", + "ef8313a85c44cf579e34db2bd195ec5375246702", [ "html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.html", {} ] ], "2d.shadow.stroke.basic.html": [ - "27110251346a79389c667b4e900d61818f1915b4", + "27edc8750ba65ba441272a125d65e98f306fed82", [ null, {} ] ], "2d.shadow.stroke.basic.worker.js": [ - "7ebbd8ec5b4922b8657108d204c2cc84d50af755", + "b62e6c75e56f265a119e72201263f2eb82fda5b6", [ "html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.html", {} ] ], "2d.shadow.stroke.cap.1.html": [ - "3854669bf0c87e1440ba8dbd3be228aff6ab318f", + "46f915b73e761d6ed7f23a282955df3280de1ff1", [ null, {} ] ], "2d.shadow.stroke.cap.1.worker.js": [ - "7ecd07b1cdad962ac53565902e53082d9ca9425d", + "21c588ac299c68792332c06e15f642117c38cc0f", [ "html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.html", {} ] ], "2d.shadow.stroke.cap.2.html": [ - "bd18ec6f8cbe3d1301f432655903d4101f94fa93", + "91bfd80d2b18aff8a754ce4603256000e9d8f08b", [ null, {} ] ], "2d.shadow.stroke.cap.2.worker.js": [ - "7c7dc26dd92354587648a0fcd61fa87a91d54972", + "aa607cd6efc0b8f7539cc4802f9f5478f8c7eac6", [ "html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.html", {} ] ], "2d.shadow.stroke.join.1.html": [ - "8faa2fef082c9d30af3c2d862abfbbd638270503", + "1a57acb5f37b839bedf30620be759d495d8a7e4f", [ null, {} ] ], "2d.shadow.stroke.join.1.worker.js": [ - "e81a9b212d4e5b0daee834b5a1fbed2eca901251", + "8628fd993bd831f665d055a63b69ac815b3a9906", [ "html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.html", {} ] ], "2d.shadow.stroke.join.2.html": [ - "7b52a7c9508567d8c4cfc0f1437f91995c1415f4", + "394226c0ed56e8b51f9a8356dfd673fcb7f86020", [ null, {} ] ], "2d.shadow.stroke.join.2.worker.js": [ - "269a49d76cdbe88cce1bb9dfefcf30c8e9f38d77", + "06bcbd2c48adacdfcd7cf4117fa407571664df51", [ "html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.html", {} ] ], "2d.shadow.stroke.join.3.html": [ - "6110d3ae40c447cec685692885ecb959e23ca26a", + "2bf7d3dbc1bbd32e746a4b12635f148b97d557da", [ null, {} ] ], "2d.shadow.stroke.join.3.worker.js": [ - "43144b0fd9b2f76a1865f5c17651698f72f09f0c", + "5c52537a31eb5218ad1e243990df15643ab9a3b3", [ "html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.html", {} ] ], "2d.shadow.transform.1.html": [ - "d6c4e483ba57882b4d661cbf424e054edca545a8", + "3fefcfc087a9263a69d0e07305a3eca5aaceebb9", [ null, {} ] ], "2d.shadow.transform.1.worker.js": [ - "38cdf7eb7cf6290f908fe8b133c7964ec189e76c", + "6227d8487f681b0fab9ff5e8bd7e0676a8223ef5", [ "html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.html", {} ] ], "2d.shadow.transform.2.html": [ - "f0b1607262db25d208958376a6d622aa67cd78b9", + "a4ba056c75927dc20ee2daf09a71bebbad7a4c3f", [ null, {} ] ], "2d.shadow.transform.2.worker.js": [ - "9f204d24393bdd3679533e3ffaae90e9a610e218", + "32c322af916955781512b864a56d51779781f4a0", [ "html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.html", {} @@ -600792,343 +601590,343 @@ }, "text": { "2d.text.align.default.html": [ - "fda5ee496d14d16975097acde5270c734988045e", + "7af2c772f060fbe6b7ac6bc9d46ebdb3008fb774", [ null, {} ] ], "2d.text.align.default.worker.js": [ - "b2c940fac6197973ac441ac8a0fceba64d859b3b", + "adee16c0625b12dd2a33afc96d9e35517a4ecf4a", [ "html/canvas/offscreen/text/2d.text.align.default.worker.html", {} ] ], "2d.text.align.invalid.html": [ - "8b6f409a3dc2aa2cd0c0540534b546d73bf1c6d4", + "a7679d656eaaf3b49f5d09afff7d39a9607cdbb8", [ null, {} ] ], "2d.text.align.invalid.worker.js": [ - "60ad8faac95be1116200c759b36fb81425271adb", + "dfd4c662568cbfdb1e5c1354b79fa15bc3dc44ef", [ "html/canvas/offscreen/text/2d.text.align.invalid.worker.html", {} ] ], "2d.text.align.valid.html": [ - "a78b58edaa57b2023b4f9807a8a234f9b3b2fda2", + "eef6b29633d673165e77ae0170ad6a930ab7a9be", [ null, {} ] ], "2d.text.align.valid.worker.js": [ - "fdf1907585b44e461e07f87f7137f50534d7605d", + "767d6425e722f1fa813459ac8e82c6281c4b909c", [ "html/canvas/offscreen/text/2d.text.align.valid.worker.html", {} ] ], "2d.text.baseline.default.html": [ - "8bd20c6f84acf26bd992f1e7eacf6c18aaf6ae27", + "525a02ff9b0616cf6c2d5e1fa8b6061f80b4e2a7", [ null, {} ] ], "2d.text.baseline.default.worker.js": [ - "ea8693f0a063214a747ef0fac9ace21840e9d58c", + "667adb8c5154e6ad735fb29a92425ba840819046", [ "html/canvas/offscreen/text/2d.text.baseline.default.worker.html", {} ] ], "2d.text.baseline.invalid.html": [ - "a850ac146f2589bed7ee89806f0de80282c8e6b0", + "f30fad63b551f886e500710db58352f29567bf0b", [ null, {} ] ], "2d.text.baseline.invalid.worker.js": [ - "d4cdc858b2f5bdae23142be3f492a1d1d6f8b971", + "4310f81fba05096273aa892146515551e474e022", [ "html/canvas/offscreen/text/2d.text.baseline.invalid.worker.html", {} ] ], "2d.text.baseline.valid.html": [ - "8fdc0588448def7c77025861d8063364488df275", + "9ff843c19fb6b5fa8d94cae5f1520b15c8c93900", [ null, {} ] ], "2d.text.baseline.valid.worker.js": [ - "62f6983ddb75f827a1bdf09262b7ca7e48b174c2", + "2f422f58a8c225cb041148405c62462e5adf44cc", [ "html/canvas/offscreen/text/2d.text.baseline.valid.worker.html", {} ] ], "2d.text.draw.align.center.html": [ - "438e6756a06b6e18e8e5bd9c20d184205b6956ee", + "f855930f302eea94a15ebf42938ff3a8827aa84f", [ null, {} ] ], "2d.text.draw.align.center.worker.js": [ - "9487e6ab8ebdbf9ad49290ae89ff5610db418202", + "a24b839d2f894ed36ae14fe3d7f35c3541bd152e", [ "html/canvas/offscreen/text/2d.text.draw.align.center.worker.html", {} ] ], "2d.text.draw.align.end.ltr.html": [ - "6134042bdc977452b3dc84768bf389a97ac0d85d", + "ae69277be74fa630e7848637a7c13af388252a30", [ null, {} ] ], "2d.text.draw.align.end.ltr.worker.js": [ - "2a7b9e9418c17eca2d15ac69eb4d4b61996285e3", + "64dc013b444968039b7d64d957df09d0f9e5ea7a", [ "html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.html", {} ] ], "2d.text.draw.align.end.rtl.html": [ - "a4b502480aed7778eda15158ba749b18f9b2564f", + "cabc85e55943f8db87978def88018130daf274fb", [ null, {} ] ], "2d.text.draw.align.end.rtl.worker.js": [ - "deb8227ec4379ae039a454a912e3a34a4e3c8d14", + "b177d0e9617061cb685304e0543ab34cdc097069", [ "html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.html", {} ] ], "2d.text.draw.align.left.html": [ - "6e69a830a4ce0fc38cff3397d6963592301bf1a0", + "0166b9b309db445e62a5c2ca2f0899ba964af59e", [ null, {} ] ], "2d.text.draw.align.left.worker.js": [ - "9c555126537cfd186811ff8ded0e314c967978c9", + "be8a4e188e255308dc073b00e172862e7b0d37cb", [ "html/canvas/offscreen/text/2d.text.draw.align.left.worker.html", {} ] ], "2d.text.draw.align.right.html": [ - "a56c7cab1d1369d210411399f373a9e676a95685", + "011f6dccd9cbbbb12f3c58fbc063d09cd3e35b2e", [ null, {} ] ], "2d.text.draw.align.right.worker.js": [ - "f246963f606bf277c869673faba1ad47ef73fbb6", + "43f00dcb95c6fe314ad74efe58257c3629becc58", [ "html/canvas/offscreen/text/2d.text.draw.align.right.worker.html", {} ] ], "2d.text.draw.align.start.ltr.html": [ - "ba8c440c43b6e76a7b657a9f4982e331ec95034b", + "b15fb4c0481828c22c62f2ede4bc02832865d6af", [ null, {} ] ], "2d.text.draw.align.start.ltr.worker.js": [ - "2de9d50fabb4e4925a6b600507c44758909b6caf", + "a3204938c0ab73278866ceec1eb74c196b01a94c", [ "html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.html", {} ] ], "2d.text.draw.align.start.rtl.html": [ - "32f83430e0949e1cecb62fa7644d7930a30afd27", + "c8a0de20b67700721d720705051989ebe10bd519", [ null, {} ] ], "2d.text.draw.align.start.rtl.worker.js": [ - "41cb57b9587bb9906b519b5bad55341ff77f6a6e", + "ad03dd5c46928a7f613ce638e876446220e5d354", [ "html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.html", {} ] ], "2d.text.draw.baseline.alphabetic.html": [ - "bd6a1804a538fe28548858e3be0da1c1d1f61586", + "6cb550fde7a91b36f37c80774ac9c1d255c29ece", [ null, {} ] ], "2d.text.draw.baseline.alphabetic.worker.js": [ - "5b4fe08b1307102cb826ba94b8ac9abd94cb9572", + "ed2c3f88b024e674a843416bfa33562fd42ee8ea", [ "html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.html", {} ] ], "2d.text.draw.baseline.bottom.html": [ - "4e5fc8e346416796b1cb5d00918c3a4daa23c026", + "398b4a9b0a569f3dad9c0dd4fb0d6b95483e6d41", [ null, {} ] ], "2d.text.draw.baseline.bottom.worker.js": [ - "1c7cab3ef99aab8d20aea85337bcc2f6d5b12227", + "727376391f7a5facf97a6d4939033934384e076e", [ "html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.html", {} ] ], "2d.text.draw.baseline.hanging.html": [ - "d0d573790dbb6a4aa470bcb88754d0f7cba88cb8", + "0b8228343289fe59d269b4ccf63dc48b6008edda", [ null, {} ] ], "2d.text.draw.baseline.hanging.worker.js": [ - "79df7d8e484ab56d91fe618051376df9a91d220e", + "fca74d6938184d68f11790b86fbdb0240cd11d8e", [ "html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.html", {} ] ], "2d.text.draw.baseline.ideographic.html": [ - "144d56f784d11d65460a35e25162fcd912afb69c", + "c996444b860a079402dbeb20344578c94877e58d", [ null, {} ] ], "2d.text.draw.baseline.ideographic.worker.js": [ - "ef7d0180cda7627d92166f22b2f0373bde792103", + "0ffa6fe299a0cb9a03778f0f32a57141074d0b7c", [ "html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.html", {} ] ], "2d.text.draw.baseline.middle.html": [ - "3072264bb4a5101c58230633ebb8509f42bd85be", + "911da8bef2c20759daa2361a5ac3b18f14c88632", [ null, {} ] ], "2d.text.draw.baseline.middle.worker.js": [ - "a0509b6711c4929267f1607b192b77bc664f47f0", + "eeb32eafc111ed289a6ddeccd58cde22ac7cc7f6", [ "html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.html", {} ] ], "2d.text.draw.baseline.top.html": [ - "a077aff348f2861ecaa259759730d2e407ad19df", + "56b5bb7d83cfecaab4385f2c9e1926d678c4e06b", [ null, {} ] ], "2d.text.draw.baseline.top.worker.js": [ - "bbc7fc06a31d3b5e9d1d111c69c1293e425186ba", + "d4341c6900abfb9c0578898cc1895dc0a7f0cd20", [ "html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.html", {} ] ], "2d.text.draw.fill.maxWidth.NaN.html": [ - "4bef0e3d70a7fd5a61e10e6baa56d2300d536bf6", + "8f22b9f0930c69494860fb8885f9f0356fba9395", [ null, {} ] ], "2d.text.draw.fill.maxWidth.NaN.worker.js": [ - "32a673f4955455f3b3cabbcff581d5573db7211e", + "fd1dff136e9be8674a2957bf7af1001ca56cb630", [ "html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.html", {} ] ], "2d.text.draw.fill.maxWidth.bound.html": [ - "63b30966f4a27e9fe96343c0a3f27baf10606681", + "ae21607af95b8e5b3b2f253a8470188c371069d3", [ null, {} ] ], "2d.text.draw.fill.maxWidth.bound.worker.js": [ - "092289baf4a2a9c367d6705943e1749845cc9ab1", + "240bffeed41832c7fa626f97ff6abcb844a35dc6", [ "html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.html", {} ] ], "2d.text.draw.fill.maxWidth.fontface.html": [ - "9294bf99736b33383d3b08d5a748de57a37107c1", + "259fdc738ac6918604f93fcc9f8b90a7baa0aa43", [ null, {} ] ], "2d.text.draw.fill.maxWidth.fontface.worker.js": [ - "99cc25e7aeee24e874cfd08c6e97fd042db418f5", + "7aa3f470f5fa865b2b5b311143c757899a73eb41", [ "html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.html", {} ] ], "2d.text.draw.fill.maxWidth.negative.html": [ - "9d06556736c3455e31b25f0391aa8e4b07441d08", + "4411fbfced6004769c7bd4f3670853072fcb662d", [ null, {} ] ], "2d.text.draw.fill.maxWidth.negative.worker.js": [ - "bf852bc54d54f177d4d4ef881d4ee2dd422ab2f4", + "50076b524c130f7461aa588a3dd9813685db34f8", [ "html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.html", {} ] ], "2d.text.draw.fill.maxWidth.small.html": [ - "37c137eab55ebe7d031a50f426cbb9b717ed4bc9", + "94988fc92ebaa876d7e75803572a3172dd9f1907", [ null, {} ] ], "2d.text.draw.fill.maxWidth.small.worker.js": [ - "44cf210e1e55b7abba2bb7e5eb079ea0913460e3", + "5d5ef4e3917d9bd2dd7221bc6537bbf5984ba878", [ "html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.html", {} ] ], "2d.text.draw.fill.maxWidth.zero.html": [ - "c5bec91f9dabb83c0ef91ab3b699b310bec5a119", + "0056d75126ce19e62c0eaa6d31a33f295835dab7", [ null, { @@ -601137,7 +601935,7 @@ ] ], "2d.text.draw.fill.maxWidth.zero.worker.js": [ - "6701f5b8dc31fd8d332810076c49fb5d3c4a9347", + "65e67cce2c76dc4ec96a0d02441757b576192714", [ "html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.html", { @@ -601152,616 +601950,616 @@ ] ], "2d.text.draw.fill.unaffected.html": [ - "e620ae1a181ee34516e28548e9dc44d16e63aea2", + "7124c6eafd29650691207258f515d8a619f6bec8", [ null, {} ] ], "2d.text.draw.fill.unaffected.worker.js": [ - "9640bad6c9a4e1120f1350e085d9a801fba10753", + "0e250286d49105bb9fb9619de24e1152fb6bbfc7", [ "html/canvas/offscreen/text/2d.text.draw.fill.unaffected.worker.html", {} ] ], "2d.text.draw.fontface.html": [ - "d2c65e8bb2b97cd94696d2fb8090dafcf62789b7", + "f8d9085f55b0ca752f3901892a599f6aba3ece32", [ null, {} ] ], "2d.text.draw.fontface.notinpage.html": [ - "f390700ea0c5eeaf81d448b5d0f731e71262df02", + "da552d11cc9ee28f9e74fbd69375caf206b7b428", [ null, {} ] ], "2d.text.draw.fontface.notinpage.worker.js": [ - "8efab418a870908593ee49bb8efcd2ec2481e954", + "3bfb0be818826c1f1e515d33ac6f6f1e9181bd16", [ "html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.html", {} ] ], "2d.text.draw.fontface.repeat.html": [ - "3766ab698900d8ec44173408376f3a630e4d034f", + "3a14462bcd6733037cff24752a65e0cd045fa536", [ null, {} ] ], "2d.text.draw.fontface.repeat.worker.js": [ - "756e844709b9d2b9f2eddfea1cb00826a69d63bd", + "f2210a3239e4d3b15c5da6105de48ff9649415f3", [ "html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.html", {} ] ], "2d.text.draw.fontface.worker.js": [ - "45f18317b094b4c0282ee39bb713a499b44ba2e0", + "1c7e727c5eac308d521cfc41d946df95b9c418d1", [ "html/canvas/offscreen/text/2d.text.draw.fontface.worker.html", {} ] ], "2d.text.draw.space.basic.html": [ - "4bc03bb4adb9de2148d6ac971de47ab02a70d86e", + "fa2fa86c36eb678b9b44d43e2fd84c7a1010a93f", [ null, {} ] ], "2d.text.draw.space.basic.worker.js": [ - "39c00846e92fe02e257433898254843517aa2c48", + "75cacf9ca28e6250136a372b749cb23f11ec7caf", [ "html/canvas/offscreen/text/2d.text.draw.space.basic.worker.html", {} ] ], "2d.text.draw.space.collapse.end.html": [ - "58fb292e132e5660a7d10a3aa8e7939284f6e204", + "9215203eaa7411477c24265e1120d9cca9be220b", [ null, {} ] ], "2d.text.draw.space.collapse.end.worker.js": [ - "81f85baff0b1d3cc254d65b10de55a6dfd3a26c0", + "f910b274bd4ab39e54f9d8ca841bab559e0f5ecb", [ "html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.html", {} ] ], "2d.text.draw.space.collapse.nonspace.html": [ - "f018dc14658e93211f074eed745f5a1d1eaca66d", + "18289e51edf729da0d88e90e99443e9c2c9cf815", [ null, {} ] ], "2d.text.draw.space.collapse.nonspace.worker.js": [ - "cbc98034878a73a27d18ee9c524ddeecb4d5a156", + "2aa7f67a57583a50d72edc1d2e875e9f5b9a2e04", [ "html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.html", {} ] ], "2d.text.draw.space.collapse.other.html": [ - "0a6bb09c07e4323b5594253880f3366d22dcc8a3", + "a0cc560f507f7fc4ad466dd928962e9f7be59616", [ null, {} ] ], "2d.text.draw.space.collapse.other.worker.js": [ - "e13b87a531f578d858d8bfc1c6edbc6d347c6c3f", + "12edf7f7e7f7074a7c47a4d91024e4d6fc2bcf1f", [ "html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.html", {} ] ], "2d.text.draw.space.collapse.space.html": [ - "3308cc75982625ccc7af40fb3d8ba90f64a5b153", + "240ba7460c41e76e02030dd46d564bd3e378b0ba", [ null, {} ] ], "2d.text.draw.space.collapse.space.worker.js": [ - "4ea78a24664f9cf5bfc759363bcd48e6ae6bed0a", + "3ce5ef88f73553136dc0ed74d04ef8dda215c167", [ "html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.html", {} ] ], "2d.text.draw.space.collapse.start.html": [ - "94b3f9ff0b00990f5ddf4790850743a1adc36878", + "43fa32f8aebb47acedaebba8acc91fc42f08e800", [ null, {} ] ], "2d.text.draw.space.collapse.start.worker.js": [ - "20bd10ae57f564f5eba7cfc9db6d805280b55a62", + "2f742ac2b672df16e94818a689e4e208390098f8", [ "html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.html", {} ] ], "2d.text.draw.stroke.unaffected.html": [ - "7cad996cc0414eb5917a919a2d9ddbe14d7a0f16", + "76afc1b006375af114dae39272444b4749d03296", [ null, {} ] ], "2d.text.draw.stroke.unaffected.worker.js": [ - "7ce3b1adc721f80d5ed1067d082b81c8d2865114", + "15c3b617004a68f3718946c562d3764e89a1348b", [ "html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.worker.html", {} ] ], "2d.text.drawing.style.fontKerning.html": [ - "30e12f31bba7911b1e33cc4d44086e33b6741b9c", + "23f353513bfa0e7692e6d05e59bb9c2b8c023d32", [ null, {} ] ], "2d.text.drawing.style.fontKerning.with.uppercase.html": [ - "a9a5ae23f5d2204f949f21b341ff2228c73c5310", + "380d8e7212f73defa0a7fd7b31550e104690800c", [ null, {} ] ], "2d.text.drawing.style.fontKerning.with.uppercase.worker.js": [ - "a8837374e01c89329992b211cb869d8abdcf82c4", + "afce6c3955cfb880767fd8f8cc8d14c1af1fe6bc", [ "html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.html", {} ] ], "2d.text.drawing.style.fontKerning.worker.js": [ - "9478eece85e26f5dd1b2e50cea033cb8cf8f937c", + "ec64214c7fe5211c00446464b86c3d1942e434e7", [ "html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.html", {} ] ], "2d.text.drawing.style.fontVariant.settings.html": [ - "08c48f1bcdabb778dafe2ad23fc7230033a20d51", + "5ed17baf956418e233d6d66b5b566e4f0454be30", [ null, {} ] ], "2d.text.drawing.style.fontVariant.settings.worker.js": [ - "d4e9307bef0615c6b57eddfa5ac8ecdb1261ce11", + "9486b8ae1a4a3a65ef0379086bb6a0150f25ab48", [ "html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.html", {} ] ], "2d.text.drawing.style.invalid.spacing.html": [ - "5030055567a76411fb3c51cddc14eb4bb79a5d22", + "3a99352295c720bbd7f13bcd8ed999c99bc8c1e9", [ null, {} ] ], "2d.text.drawing.style.invalid.spacing.worker.js": [ - "e4b090cc76516851cabf6d1183326aaf5c1ab326", + "271858500e96537b156c09e2cc6205f29c8cc156", [ "html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.html", {} ] ], "2d.text.drawing.style.letterSpacing.change.font.html": [ - "ff84f4541b6d0621387c2244ce7273494b342206", + "636f7199cb19ccf55bc83996d55adbed9ca53372", [ null, {} ] ], "2d.text.drawing.style.letterSpacing.change.font.worker.js": [ - "5a6bf6614de2b38ff9ad1117080db1a884a632fc", + "22fb04f62f921dcafc3457080fa378551a3f9960", [ "html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.html", {} ] ], "2d.text.drawing.style.letterSpacing.measure.absolute.html": [ - "5482c36b37080f962fb3b2289530b524caae2c28", + "46cd55a5cafd9246b15d14b9080e6973af4304b7", [ null, {} ] ], "2d.text.drawing.style.letterSpacing.measure.absolute.worker.js": [ - "22cab4cccd93e9b58ca9c81457167476338e2f5a", + "8c82aebb3c076a0e9f76097857017f8080427229", [ "html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.worker.html", {} ] ], "2d.text.drawing.style.letterSpacing.measure.relative.html": [ - "fa5d2bce75459db2638669e64ea444f132f79c9c", + "296c929dc31a4bc3df86f6c9c52f62544e5701b5", [ null, {} ] ], "2d.text.drawing.style.letterSpacing.measure.relative.worker.js": [ - "59d17ef82cf36f9d7f842b2506c84cefaa5f370c", + "d6afa71abaf6a731037c6cbab1b2aa102a6fa033", [ "html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.worker.html", {} ] ], "2d.text.drawing.style.measure.direction.html": [ - "04774a9d0f88cc6b5bbbccc3669f67b36df6a40d", + "6c0b3756d3823587f232b910d09f14e0c968a9b1", [ null, {} ] ], "2d.text.drawing.style.measure.direction.worker.js": [ - "8f5585682b0654d260f97a7ccf682471f9737c2d", + "852f372101e908dba206ca36b3190b138c598c59", [ "html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.html", {} ] ], "2d.text.drawing.style.measure.rtl.text.html": [ - "7eba676652bba88da0e7d1500635015bd06f0125", + "335014cfd626c2410d736bea25bdbaa87fd1b239", [ null, {} ] ], "2d.text.drawing.style.measure.rtl.text.worker.js": [ - "585e6c0c741472539f7ac6cb3c60f333d4255628", + "09b0e9b8d0adb0044f10061ba436e6e7f0e14a5c", [ "html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.html", {} ] ], "2d.text.drawing.style.measure.textAlign.html": [ - "f784f569b2a727d140cb894f72dd8629c12249ad", + "4c1ca193e5ee6d73f3428c7aae2c600346ab0187", [ null, {} ] ], "2d.text.drawing.style.measure.textAlign.worker.js": [ - "3af2f471434d612e7ac2d4a44aba7c7edf02ece3", + "bc6f167be5b2dfdc3729ce08961557c792a7df38", [ "html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.html", {} ] ], "2d.text.drawing.style.nonfinite.spacing.html": [ - "8e80f9a3abaf3c60199944d61dede72ac31e9c65", + "ca50f13a69bf40f7a6a9115f799a39758e58cb38", [ null, {} ] ], "2d.text.drawing.style.nonfinite.spacing.worker.js": [ - "adba2532829a59f7d2f4e3651595629181adcba3", + "801b8b5c73bb20c631766efb535ae3651ba296d6", [ "html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.html", {} ] ], "2d.text.drawing.style.spacing.html": [ - "ea480c4690e3270c7d30842b545c94708ca9c931", + "aa2e7caa9162be3524c9d5b08adee8c91184ef94", [ null, {} ] ], "2d.text.drawing.style.spacing.worker.js": [ - "a413f9270af45781f5ceccbe782643bf7fd3d4e6", + "938ab966020b751dce5abae01c028e3ca2505221", [ "html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.html", {} ] ], "2d.text.drawing.style.textRendering.settings.html": [ - "d0c7b88a0c2cecf0836ffd52f8ea15f38e9d5bfb", + "47094dc91fa9a9fffbef111ccbc91d02b46cc61e", [ null, {} ] ], "2d.text.drawing.style.textRendering.settings.worker.js": [ - "e8402c2a088520cae79d1805c845c0943faf6a9b", + "ca5741de95404ef84cf4b174737d7f3625d8a8c5", [ "html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.html", {} ] ], "2d.text.drawing.style.wordSpacing.change.font.html": [ - "f8b72fbfab6dca7b215692b6c455fc3db4652b6b", + "3df660ea3e591d770801f53bd1f71d07f1a507b5", [ null, {} ] ], "2d.text.drawing.style.wordSpacing.change.font.worker.js": [ - "993cd28501f9fe702e563debcbaf9b6101ffb8d8", + "e1415ea2873f243995b32e2df4cc048ffdaf546c", [ "html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.html", {} ] ], "2d.text.drawing.style.wordSpacing.measure.absolute.html": [ - "07ca896f9752a2cf58928df7afa07c14b615bb47", + "458f12b008fb8a3350a09dbbf5d33c67627470ae", [ null, {} ] ], "2d.text.drawing.style.wordSpacing.measure.absolute.worker.js": [ - "ebfc05644fcbd3a395730ee4a89f54e5443adc29", + "36d1fefc23d2a2ea16444032eecb48c55c7f4ade", [ "html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.worker.html", {} ] ], "2d.text.drawing.style.wordSpacing.measure.relative.html": [ - "95f87cb03d05b79e1ebb48155723672ae04903e0", + "11988ae157ddfe78da2e5458f09516210f2ef93c", [ null, {} ] ], "2d.text.drawing.style.wordSpacing.measure.relative.worker.js": [ - "2bded51edcbe3571274bb4e9b36d19908127b4a3", + "f5295e915e819824bd494f5a6268c0b7f6829165", [ "html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.worker.html", {} ] ], "2d.text.font.default.html": [ - "191c1a5c317e701361bc3663cf192217b81468a2", + "59828a5db4cc9aa3cc47eb58fab051aaa668fdb0", [ null, {} ] ], "2d.text.font.default.worker.js": [ - "dc620ed439877d7160a789e43acb186384fd5da5", + "fa51ffc8715b1ce676cfc336bb4dddbcff6d7762", [ "html/canvas/offscreen/text/2d.text.font.default.worker.html", {} ] ], "2d.text.font.parse.basic.html": [ - "aee555656a9b89117f0219223ae3ae9294c99091", + "bb39cc4a3c646fe3386aadb4cdc30b7f635f2b1e", [ null, {} ] ], "2d.text.font.parse.basic.worker.js": [ - "0d8a4aad32a6113a6876cc4270e18ec9c73b16bb", + "3596aab66bce5a807a85171ef9ab23fc57e0ef75", [ "html/canvas/offscreen/text/2d.text.font.parse.basic.worker.html", {} ] ], "2d.text.font.parse.complex.html": [ - "361b44de1c84aba7ca35ad2db45052bf052de013", + "30e937804f2db3893077219c209277d4bf43f3b0", [ null, {} ] ], "2d.text.font.parse.complex.worker.js": [ - "3c05b6fb81cc4289afe3834f2be72cacca097fd6", + "28cb41c572a9df5184319c2dc2d742230b0a0c93", [ "html/canvas/offscreen/text/2d.text.font.parse.complex.worker.html", {} ] ], "2d.text.font.parse.family.html": [ - "70127ba67c4f50397513fdcea910b2bfde1636a3", + "989014fb37c786fa74b0f3c8ab1fcf3678b66d7c", [ null, {} ] ], "2d.text.font.parse.family.worker.js": [ - "7640de2be0bb71f99119f9e3252b4ffe82613c13", + "68aefdd0dfd04faa0a54f7e1f833b1c1996773ca", [ "html/canvas/offscreen/text/2d.text.font.parse.family.worker.html", {} ] ], "2d.text.font.parse.invalid.html": [ - "483476bcfaa5e117a2f30f863c0b97dc95194ade", + "8b4fd01d02408531be97a3e09ecbc2f65c6fa6c4", [ null, {} ] ], "2d.text.font.parse.invalid.worker.js": [ - "a4e19a6887c88531d7693c50f502243f017bc4cd", + "31f374579e7c5651fd6d1a98698e69688c548409", [ "html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.html", {} ] ], "2d.text.font.parse.system.html": [ - "24cb730c2250285ba820281361627ac95baf5b69", + "79ae6a38e23b95b20901220a2faa52eeca7d52b3", [ null, {} ] ], "2d.text.font.parse.system.worker.js": [ - "5c2a8b481a47925634c296cf8ad6cc60ca1c4532", + "b965ea763a8bd1e0945138fb7cd23e3dd10258dd", [ "html/canvas/offscreen/text/2d.text.font.parse.system.worker.html", {} ] ], "2d.text.font.parse.tiny.html": [ - "6c17ad47b6b48064147c2edc9ffb4feea70d16eb", + "89f8515967fb5e113416aae337c07224860eefb3", [ null, {} ] ], "2d.text.font.parse.tiny.worker.js": [ - "2171e2cdccc9bfc7925ef0031b6ed236828b5033", + "aba023e3363a8c11303d763bb82c686f1284c943", [ "html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.html", {} ] ], "2d.text.font.relative_size.html": [ - "eef3be79c794fa8567afe60593a24b1b5185bab5", + "a32be3d65c4a0a5554cbf0d852b48eeb79ff22fd", [ null, {} ] ], "2d.text.font.relative_size.worker.js": [ - "c4d78b8bcc0df57ea5f6f46630d8dc8e9853805e", + "9e1247cfe01130eaa9839ac3f5967984a61542e1", [ "html/canvas/offscreen/text/2d.text.font.relative_size.worker.html", {} ] ], "2d.text.measure.actualBoundingBox.html": [ - "b7ce281b410074571b1c371d33ab6138fbfc0975", + "96b37702c48a68cd4bd552492b253189579d281c", [ null, {} ] ], "2d.text.measure.actualBoundingBox.worker.js": [ - "4693bb698417805b99f7434eb6ce91004187dbe3", + "b16ed415ca82cca9c9eec989b99b253c11a38bf2", [ "html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.html", {} ] ], "2d.text.measure.advances.html": [ - "ed3affcda59af76739d80669e9cf4709ea67a88b", + "f3bedd41ef53b060ca6655a7a0214aacc5208c3f", [ null, {} ] ], "2d.text.measure.advances.worker.js": [ - "f1d4bb98f9b1781da43deb45aa2e7a741befe268", + "55c744aaeb1bfeaee929e5ca98dd159818de7483", [ "html/canvas/offscreen/text/2d.text.measure.advances.worker.html", {} ] ], "2d.text.measure.baselines.html": [ - "993fbb082282ade6ea324b81d27014b63cfa8a0f", + "e58f9be455b0cd573da530ff0b37a64117af2740", [ null, {} ] ], "2d.text.measure.baselines.worker.js": [ - "0c060169d3c9f940c404bddc56c84d5d234db768", + "6f157f4e653ef609aceaab2043da6e71234bb86c", [ "html/canvas/offscreen/text/2d.text.measure.baselines.worker.html", {} ] ], "2d.text.measure.emHeights.html": [ - "cc91f4017ca6171fe8d79aaf92c50f019253c65a", + "6a93bac04aa51f26c589c5d176862989a24fe2ae", [ null, {} ] ], "2d.text.measure.emHeights.worker.js": [ - "88432343d175842ed3c4b9a94b8a831bfc85762d", + "1dd5f7ce48c08cca97743d9eb7ce2626e8100f9a", [ "html/canvas/offscreen/text/2d.text.measure.emHeights.worker.html", {} ] ], "2d.text.measure.fontBoundingBox.html": [ - "fca062b6498e40c12546edfa3036a33f76e9c9ba", + "03ee45bcef1dbdee6899f01f0bc6d222d725aa34", [ null, {} ] ], "2d.text.measure.fontBoundingBox.worker.js": [ - "2f4b64d37a69130128018e5d0e9981399401a4cd", + "65c5e9a9133916bd06ebd9f9b99548bb6c974ec4", [ "html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.html", {} ] ], "2d.text.measure.width.basic.html": [ - "074d62eec967c7d354bbc021d6e5a4fb117713c8", + "fa47879836be978c7b6a526325fc7e25de95cf85", [ null, {} ] ], "2d.text.measure.width.basic.worker.js": [ - "a1933c82c24435ccf2240f831c7c1a0f8f2b1295", + "265843ae66e8c5c4575cdb4a9bbf9952561213fd", [ "html/canvas/offscreen/text/2d.text.measure.width.basic.worker.html", {} ] ], "2d.text.measure.width.empty.html": [ - "45792b41dde95e743311b7ebac472a930e9ef6ef", + "7d412008b04e2a430bc04d8c78dec113493c0901", [ null, {} ] ], "2d.text.measure.width.empty.worker.js": [ - "8d806c16ccdeb17fc16aecf5a343a9b1337c8bb4", + "68bba39e9d2762473b7a02907ccbfe3cb5cef04c", [ "html/canvas/offscreen/text/2d.text.measure.width.empty.worker.html", {} ] ], "2d.text.measure.width.space.html": [ - "971a41e29364b3f072ae1e19db398f55373e120c", + "bff53f4f0e49f5ed3a1d6068460f29567f20ebc2", [ null, {} ] ], "2d.text.measure.width.space.worker.js": [ - "a52c1d8367bf4bc38ef01d1c35425e1dcc6fc5b1", + "83020b34f58a5af83023097aa8c56c203058b985", [ "html/canvas/offscreen/text/2d.text.measure.width.space.worker.html", {} ] ], "2d.text.setFont.mathFont.html": [ - "ed4752dfcb64aee5a61e5762ed99f9207d29eabc", + "89d8fe3c7a8538e4ff4abb8a3b8f2a7c2efb9dbb", [ null, {} ] ], "2d.text.setFont.mathFont.worker.js": [ - "39e3031ecf6652610de0f588e8cd3dc7fe03489c", + "b756b45dc51b975829f2caada9053795db16a58f", [ "html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.html", {} @@ -601770,266 +602568,266 @@ }, "the-canvas-state": { "2d.state.saverestore.bitmap.html": [ - "3a6e67b77e4430222462c0ed6bd59d8eec2fedb0", + "208043fbf6eca60482bf8c08905f011659e46149", [ null, {} ] ], "2d.state.saverestore.bitmap.worker.js": [ - "c602488d366f04a7a79b6e879aa79c301d0666e0", + "09c7dcca9067377863a95a245c7054a84d796b5f", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.html", {} ] ], "2d.state.saverestore.clip.html": [ - "e96df9e2a4eb466c4b2608bc047d69c57d66ab59", + "f4d6b6f6e1c2abe8e6b8e96c11d0e91a5ac9f017", [ null, {} ] ], "2d.state.saverestore.clip.worker.js": [ - "622d9416774d9dbac9b2074f2733117d9a689bdc", + "a7bc0615e506912a6af95e61561ea2caa2d29b4b", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.html", {} ] ], "2d.state.saverestore.fillStyle.html": [ - "91b23bd47acc7197b85ebb74718aa89df26fb38d", + "789e1e8d2bc46693bb36288dc4a6971fbf91ce0e", [ null, {} ] ], "2d.state.saverestore.fillStyle.worker.js": [ - "fa4d77328a660485f34c0d8480592e30de3a1ed2", + "46cf6d1daa06a2717f2e5d40d278413b8d9968ab", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.html", {} ] ], "2d.state.saverestore.globalAlpha.html": [ - "01b9616bad7a7c6499248719e56b560734b9f7fe", + "15b59725ab988d61110c542009335d977ac35593", [ null, {} ] ], "2d.state.saverestore.globalAlpha.worker.js": [ - "8b11054673ec7b90936a430ee2781a6357eeea64", + "765f8b00a31d03f142518a684e8d5be99a200ca9", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.html", {} ] ], "2d.state.saverestore.globalCompositeOperation.html": [ - "557d3c074a8a810e7aa7a048e4177d3a5b0d0d06", + "1efb24aa9b6970bfdb21329e154dc4a095590cab", [ null, {} ] ], "2d.state.saverestore.globalCompositeOperation.worker.js": [ - "3534147b926e36ac3fcf8504bc6c0e1b1cbd7d7d", + "cd38d56c51f964754bd27f3e14e65020d4e2bb20", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.html", {} ] ], "2d.state.saverestore.lineCap.html": [ - "e02cbd46ddaf2ba7c7917a98b2699110b3478684", + "5e651d0c7b1277804e406bb3f18499bba596fa23", [ null, {} ] ], "2d.state.saverestore.lineCap.worker.js": [ - "70de46a60425ea1be9386c9dfa84623bd969934a", + "9895b44b0030a3b5e61707fa60a0de4dbcbaae02", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.html", {} ] ], "2d.state.saverestore.lineJoin.html": [ - "92100e9d1fe3f122e7426f11c982cfb5efcb3bcd", + "20f53fec50acd1cdd012d6d56a19307f330799a9", [ null, {} ] ], "2d.state.saverestore.lineJoin.worker.js": [ - "1da6db86be52490d7c2994799866b1c0d046dfda", + "e8c85825f1743eebe20dd22b3497344932324613", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.html", {} ] ], "2d.state.saverestore.lineWidth.html": [ - "24f9550792a83fb93201702e37e058096eda4c8b", + "e234e3efc25648fc1c3127120a16f9057603b396", [ null, {} ] ], "2d.state.saverestore.lineWidth.worker.js": [ - "657ded5b76dc5bf8c541eca1aedcec93e790532d", + "997748c37741dca38a767609f0019acf698a962b", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.html", {} ] ], "2d.state.saverestore.miterLimit.html": [ - "b674467115b6dc7a4228e570d91719080540452d", + "1df2b2420f502e057642da93544cf9bbe4efc8f9", [ null, {} ] ], "2d.state.saverestore.miterLimit.worker.js": [ - "745f2919a081984fa0dc2254db40b3697f3894a5", + "eb5adffe06a3cac79daf3669d20820bbc25a30d9", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.html", {} ] ], "2d.state.saverestore.path.html": [ - "34c0b1e6d70325cd718768c7dd62bef3cef03c40", + "a86851af68c367539c8e583c3f81dba76ffd727a", [ null, {} ] ], "2d.state.saverestore.path.worker.js": [ - "24cec15972c85bd145f6fccd792a8f5a4f453eac", + "d174de5a5089616c2b0804952b49b1db69ca8966", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.worker.html", {} ] ], "2d.state.saverestore.shadowBlur.html": [ - "af2ee91307f9a58754a7b0e350859eff8511ebd6", + "044ee1b4bbbf9740c98a4bfabca36a3993541a34", [ null, {} ] ], "2d.state.saverestore.shadowBlur.worker.js": [ - "12acd3d294d1b50d6cbd4b4505e1b54c94add610", + "00cd6f8317b41b869199546dfcc19c52fb9eba7e", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.html", {} ] ], "2d.state.saverestore.shadowColor.html": [ - "5aa01941009a3772184474badec171584d113de4", + "0e8b4293e044f8ef46c4166e68ff2e5270a42c90", [ null, {} ] ], "2d.state.saverestore.shadowColor.worker.js": [ - "b2f9fb92658e7efe40233e56c4937751002d64df", + "13c033f3968cc2eead4a41fbaa3886f735041a42", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.html", {} ] ], "2d.state.saverestore.shadowOffsetX.html": [ - "f281234801f30938dedd979f919764870c9408d9", + "11aa658f3e7cfda63ac2a0832ef34eabe8b42125", [ null, {} ] ], "2d.state.saverestore.shadowOffsetX.worker.js": [ - "271181775577d9ec86ab1564d8bd10a2c953880e", + "a6ad9226474aaa5d5c343e4c1fd3c66b3702d232", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.html", {} ] ], "2d.state.saverestore.shadowOffsetY.html": [ - "643ce99a245abb77daf0ffb7a444318222febbbb", + "c238f0ec94d4d6202a76d18af1c1a6f6035ecde0", [ null, {} ] ], "2d.state.saverestore.shadowOffsetY.worker.js": [ - "aaa572a4d1d85a824c6c1c7104c26f1897aaac05", + "323fcd14349c6f17c5080350882c2746ed4cd833", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.html", {} ] ], "2d.state.saverestore.stack.html": [ - "979176804b830c0f52ae29d8bfb08e1cfe576be8", + "4a8750867fbae791e0762ce878372abda55c05b7", [ null, {} ] ], "2d.state.saverestore.stack.worker.js": [ - "e1f078e90d1f78d05d53a607edd13688f552c486", + "460df4ec83a2fb4a5fa371f77a585c4f6db4107a", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.html", {} ] ], "2d.state.saverestore.stackdepth.html": [ - "53dbc63c2bae9df416d83b91729e590b539b0c9f", + "d536155e6424c148cf5b1bd6499902f93c6b23e5", [ null, {} ] ], "2d.state.saverestore.stackdepth.worker.js": [ - "a485c1947165c92d69b8b6daf17cb6a558fe074c", + "c494d9ddf88fe99ee21c1d400772d4c12c0e86fa", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.html", {} ] ], "2d.state.saverestore.strokeStyle.html": [ - "60963729f4728fc7d992911fcbe2a9bcf3a5d767", + "561205acd98c80634b616d308925af171692be80", [ null, {} ] ], "2d.state.saverestore.strokeStyle.worker.js": [ - "275ba9e072580e304ff0abd742a45fd62bbc25ca", + "878a6d68cb5606611b6ab6bab711c8572ce3bde5", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.html", {} ] ], "2d.state.saverestore.transformation.html": [ - "fff2ead703604a8dd0b62d8a01db836158545667", + "79ecdece53b42e0d994101c55b47a01f9664f6db", [ null, {} ] ], "2d.state.saverestore.transformation.worker.js": [ - "64fb4c47347c0d076f20bf39b381cddd1814257c", + "1647dfb7900c11d4881ffa2332365626d5a5f8ae", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.html", {} ] ], "2d.state.saverestore.underflow.html": [ - "986d9668858d2e19d21ba2cdd5c1fe680e7262fd", + "a6713adde2dd6bbcc84f6f663960ea2b4cb77f1c", [ null, {} ] ], "2d.state.saverestore.underflow.worker.js": [ - "d38cf97417b8c3aeb87cbf0e142ad812bafcdfc4", + "8ed4bcbc10a86dba21d638feac77998e65e6145f", [ "html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.html", {} @@ -602049,616 +602847,616 @@ ] ], "2d.canvas.readonly.html": [ - "ec6ffe529266ab60203ab88558f98faa0dd9db20", + "6bc6eef2efaabb9e7984e2ea701914cec584ca58", [ null, {} ] ], "2d.canvas.readonly.worker.js": [ - "8f88efd6dc3df927eba5f3a04db406eaaf359f19", + "068c2c2019d32dbe70f64ab6a8c0f8b2672f5425", [ "html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.worker.html", {} ] ], "2d.canvas.reference.html": [ - "024b1fe7d55aba84c3bd50f6651d2e257b09523f", + "c43afd816ae194940b4e1ffa8b9fb57a1b880c49", [ null, {} ] ], "2d.canvas.reference.worker.js": [ - "a80e55905352b14b4d5d39f69c0a6520e808041c", + "a1578af07c0bd5c710a0ae8c7cdc3eacf4f5dc40", [ "html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.worker.html", {} ] ], "2d.getcontext.exists.html": [ - "55bdf1cc1918712f7e2fdc47b26e2527c1e0550c", + "73fc45c30969b3fb929fbb7267940e03a73e9612", [ null, {} ] ], "2d.getcontext.exists.worker.js": [ - "97f8cc745bbc5e52a12388afcf8590d6f1d87271", + "0ed6f242484b855ac6653d95532e44ae5bedd5ea", [ "html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.worker.html", {} ] ], "2d.getcontext.extraargs.cache.html": [ - "a57dbcb655a23d160cc972c80c27389180576a73", + "2f57050a4d54293c5c4eefe402daa9dd3007dcb4", [ null, {} ] ], "2d.getcontext.extraargs.cache.worker.js": [ - "df330e301b78783f666d215fceea0481b554681f", + "88540513ab36116bce0031b396199f5a5f82fdbd", [ "html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.worker.html", {} ] ], "2d.getcontext.extraargs.create.html": [ - "a626318791fdfbcd58cfdadeeba0029a5b6259aa", + "a2869c45f6a76ff503ed119c2d2f0dbdf75c3e6c", [ null, {} ] ], "2d.getcontext.extraargs.create.worker.js": [ - "f34c5a1d0e17bbfe89d05c9f602c31c098c4c5c6", + "21d4f8ce6ddcb0779ff938b4e0c6a45d660cae34", [ "html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.worker.html", {} ] ], "2d.getcontext.shared.html": [ - "6d6162528a84e1e4b43a2d54cbd9efc10b810b4b", + "c37664f9d370d788218e28a2f1e593e106d2cb1a", [ null, {} ] ], "2d.getcontext.shared.worker.js": [ - "4b8dd52e61d53ff154eccf4fd061a746fd5d9ac8", + "936ca03c27b3de0d92426d2ae1326846ef127e26", [ "html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.worker.html", {} ] ], "2d.getcontext.unique.html": [ - "c7e71da63abce6d1e324991800aa1b57c0431753", + "945526c5d183593f254da38eb022a715df5efbea", [ null, {} ] ], "2d.getcontext.unique.worker.js": [ - "a2a744df61e071ead2c80affc17198fd9b8558b0", + "fbf8e3c68d28881b2f0e58ad100d940e18f9bdcf", [ "html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.worker.html", {} ] ], "context.arguments.missing.html": [ - "b69f63cdfb2eb5e11c05efa74245ef41ab572b38", + "4d5478e893a98bc1d0b4b50fb41ba377b164a220", [ null, {} ] ], "context.arguments.missing.worker.js": [ - "f03ca52328c7b16290987a63df81dec201331bc5", + "f20db3ad753516da2480c847d5530e657507c501", [ "html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.worker.html", {} ] ], "context.casesensitive.html": [ - "e7ee0c63ba817ed104bb72699f5411cdba814e08", + "6183607aac5daab865f3e4556b40c17faedbf12d", [ null, {} ] ], "context.casesensitive.worker.js": [ - "265fe959d24961a28094fcba0c1d2c64b285bd00", + "a834a3e13f99a4daacd8035bcb14ba94dec910ce", [ "html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.worker.html", {} ] ], "context.emptystring.html": [ - "c8f8943d9eda33cb88d8cc354c21c0038cb47606", + "b898698bb7e39ed1ec7d562207a4cae75f0e325e", [ null, {} ] ], "context.emptystring.worker.js": [ - "45612d386ca7ebdf7036bd69c3db519483705092", + "df7d06df0c793e020ca73254bba2b8d7e5d37724", [ "html/canvas/offscreen/the-offscreen-canvas/context.emptystring.worker.html", {} ] ], "context.unrecognised.badname.html": [ - "d1b0f2fd1797df32a8e90f6eef87df16540252bf", + "5460fe10796a34b8f944d994b2d798545b1ba492", [ null, {} ] ], "context.unrecognised.badname.worker.js": [ - "cc50c2bdbd436b6171dc4cbfeff28a66fe8fd53b", + "8dfee5498204b6694907e9dd3b7edc8d30db90c0", [ "html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.worker.html", {} ] ], "context.unrecognised.badsuffix.html": [ - "30178af9279615d9fd9372c9a5799489ff74748f", + "72624be12cb452e8cb904aa909bef22f746b2a9f", [ null, {} ] ], "context.unrecognised.badsuffix.worker.js": [ - "7b3d8a09c8d8c4b9e036ec14cf9a5f026ef401c2", + "6cfcbc3c81b94080ab515f0370fe3e27ac0cf45f", [ "html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.worker.html", {} ] ], "context.unrecognised.nullsuffix.html": [ - "2a22549baad0195cc5f0a14d039efe0c36a5bdcd", + "f36f7583fb950b72c3fb967d9e58534fcf4e85d1", [ null, {} ] ], "context.unrecognised.nullsuffix.worker.js": [ - "b6594100f603a84b04b1aaf36638bf507fa240e7", + "d9b563db61d5ed743b655eeabe9c28616e0b2e94", [ "html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.worker.html", {} ] ], "context.unrecognised.unicode.html": [ - "0c826595fe60c560ef1d73fc7e1f18571c59506e", + "f8176f58dfb84f6e13842898305f9723c7128cb0", [ null, {} ] ], "context.unrecognised.unicode.worker.js": [ - "cade5a20b530d93bc9099926b11612fe0a9ec03c", + "2d02a794563939fa012e670d58970e35638f49d0", [ "html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.worker.html", {} ] ], "initial.color.html": [ - "bfdcef7c4f95c062ebb2dca3e6c191c33f3407e0", + "d89b01df6689292836b35a00e626511b404d3693", [ null, {} ] ], "initial.color.worker.js": [ - "2a6e6e576c1fb1da009806325648aefab0495c20", + "c9705727d99b462edde414be0ca491917b5e5bb9", [ "html/canvas/offscreen/the-offscreen-canvas/initial.color.worker.html", {} ] ], "initial.reset.2dstate.html": [ - "76b76070d451c834061ccea71de057ad9a15adf9", + "55954fc421af4f8ad9750b18b13c648bd2a02fbc", [ null, {} ] ], "initial.reset.2dstate.worker.js": [ - "273c5f0bd68ed0f3e4a05dc07ac3c12354c9f0dc", + "dc0d6ea00b71b2be4fe4354cbe2d6f94709eb3d5", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.worker.html", {} ] ], "initial.reset.clip.html": [ - "87a3e43be46aee1fc3d79f3a8c9b5bdf46f54a81", + "9b1354bdabff3963abe1c5ee4a9dacbd125946c1", [ null, {} ] ], "initial.reset.clip.worker.js": [ - "45ee30d08094dea54732df766829d544d8921c59", + "d774aad6c81009dff420aa8f07e114b9c86ed4c5", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.worker.html", {} ] ], "initial.reset.different.html": [ - "632bc2fd69f66e4ace0d5e408a4809ec0c1cc8f6", + "a5c891ff1443873a82ab7cb452cc746abd4a2464", [ null, {} ] ], "initial.reset.different.worker.js": [ - "9d840a59632726b4c059196c6419f5cf4212698c", + "dc8f4bd146d16da642c90ff951b15ef49a09641c", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.worker.html", {} ] ], "initial.reset.gradient.html": [ - "96819a07d3d337e81c5b26246a12c6bdd8f64755", + "8b734d19b4b00cecce8d443ca7e22b0e5b7bfa0c", [ null, {} ] ], "initial.reset.gradient.worker.js": [ - "a18d11e86a02f1b17073e6cf1c8bd0234de9bd31", + "dabc013fed6e0cc7a63e2d6cb3b2076c2d1beea4", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.worker.html", {} ] ], "initial.reset.path.html": [ - "3c9667ca5cb27570ad3ccc66a01f5385e894f44a", + "24b7ff22fb9dbc4b637552baed2fc1c7b7dbd25e", [ null, {} ] ], "initial.reset.path.worker.js": [ - "9f34734a58ee98be3d0fda22bfa5c9397775bde8", + "6535232414946a14d98eb475bca621c9a2357cf8", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.worker.html", {} ] ], "initial.reset.pattern.html": [ - "3766795ba95c8de0fdc425ba6cf597d00c804534", + "2742d8fb5ff827433347ce67c97bedc81ba7c62c", [ null, {} ] ], "initial.reset.pattern.worker.js": [ - "1fe6c01e2d3f6e04bc2853cc382553d73acff46c", + "a69f36e8736974b45286f6e00d37fa2e8e181b33", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.worker.html", {} ] ], "initial.reset.same.html": [ - "bfcf05013ef2dd6636a16159b7083ac18b365cfe", + "137dcbd556eaf2131a7d633ba7324d060f3d4747", [ null, {} ] ], "initial.reset.same.worker.js": [ - "00db682f70aa554114d5f851beac6e4e7fe2f078", + "fd3c46482baddbadf5cb16c09689a16ac9aa84ba", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.worker.html", {} ] ], "initial.reset.transform.html": [ - "402b34f9c5c78ba42d2de6e5443d06f5a9d30cbb", + "d09f8f928f47b699e22185ce844719f4ab8181df", [ null, {} ] ], "initial.reset.transform.worker.js": [ - "3fb80d061ff216c8110231f0809aa858fc5c9fc6", + "564a3bd82f4252eb4d18b146030cb5341c29740f", [ "html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.worker.html", {} ] ], "size.attributes.default.html": [ - "6ebd35fbd0742de151727a702f105ee61da61ed9", + "52ddf116e61f78dd0e7768827b974f5da6cb35e7", [ null, {} ] ], "size.attributes.default.worker.js": [ - "c77b8a492963fcf8df006f51d49fda095fa832ef", + "83e0271f1ab085fa7bec8e16a5deb0c0e4608ed6", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.worker.html", {} ] ], "size.attributes.idl.html": [ - "fda4e92603bb32eb1a55bbee483edb33e773d17b", + "a815a7beb49e7e873dc6466693cb8a25b8443373", [ null, {} ] ], "size.attributes.idl.set.zero.html": [ - "4bf7b9c41b0310d467da5705fa3f634783ccc4eb", + "5a069f3c014358c925557f80e9f9661ac3924468", [ null, {} ] ], "size.attributes.idl.set.zero.worker.js": [ - "2ecf19974ecb44390146100dfc9501cf7ceb51b2", + "d51258ac2a4639ea15be2c0f5aa12d08e10c298c", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.worker.html", {} ] ], "size.attributes.idl.worker.js": [ - "16350aeacd9ad6f1cf6e9b6f781aeeb7a281292b", + "931b95cb65c1a640886075e860aba273ffeed7a5", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.worker.html", {} ] ], "size.attributes.parse.decimal.html": [ - "a74fe158993614e2abe299e9b206167422f9270e", + "688d80b2fa650127e0564b4dba0eafa085b7219f", [ null, {} ] ], "size.attributes.parse.decimal.worker.js": [ - "7b982e8d8771333df30ed3b4636c800d0bb3ed07", + "157bd613bbc0bc31ea2e29ab59823487ac9e5913", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.worker.html", {} ] ], "size.attributes.parse.em.html": [ - "5a8eee2c8ecfeb8b037c5f9569377030b1e40ef7", + "2e5056aad0d4ba426afbed2ce3e6b62c99cd54d8", [ null, {} ] ], "size.attributes.parse.em.worker.js": [ - "a0248d4efcd17e8a78b3f525ead0802deba06de5", + "b939765ee4e26834d0e872737357652b61b21adb", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.worker.html", {} ] ], "size.attributes.parse.empty.html": [ - "eab54b013f3ce11dd6085a7e7c8ef3e2a1f53104", + "7755f9d0db2bc68fc01473390a540977abaf490b", [ null, {} ] ], "size.attributes.parse.empty.worker.js": [ - "93b6cd6fc28e1b62c387d4a1ebc3f3815e9fdbc2", + "72fcd9f6e5a2d7917952a9c6a5323c763db0f22f", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.worker.html", {} ] ], "size.attributes.parse.exp.html": [ - "abfddf185822ffe6059372323116324810917a17", + "0a2f0125834f33bc1cc38be58522a78210001019", [ null, {} ] ], "size.attributes.parse.exp.worker.js": [ - "79fb413f3720ea9a426e26e633d7fc31727556ce", + "0b7d5f2b9759bf719ddf12f889adac2d5ce3813a", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.worker.html", {} ] ], "size.attributes.parse.hex.html": [ - "fba289087f3d97f72935606712e2ca99f099ebc8", + "5a8990183a4b002bbf8f014cbdc98711385e708c", [ null, {} ] ], "size.attributes.parse.hex.worker.js": [ - "b178c55646397913fe37ab5ccd59abdd31ec00c7", + "1edd0edee65ac0815a04f11b7a9cb191dfb0b4f4", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.worker.html", {} ] ], "size.attributes.parse.junk.html": [ - "3ffb674b9e643be01fe0fbe8472ed5ea1593c405", + "10d2e20388fd013756f9422cd8183ddca32791d4", [ null, {} ] ], "size.attributes.parse.junk.worker.js": [ - "6efd3ae5c2385e14141335598ccd51a5ca9c516e", + "c7e18d12cb5d424865cafd6b205b9ff6138b1fcf", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.worker.html", {} ] ], "size.attributes.parse.minus.html": [ - "56435547ca133a9b49167dcbc281f61a3ba95e30", + "2a7d5d1296839693ecd7eab5cf8120e819d945f1", [ null, {} ] ], "size.attributes.parse.minus.worker.js": [ - "a5837528ef7f38ae13f8e492b6753f88b7f7f532", + "9680f90776604b746c798eb6ec07171932421653", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.worker.html", {} ] ], "size.attributes.parse.octal.html": [ - "d452217015f40a46fe9eaf421e2d673e29c9b485", + "3d9c2fb0443767ab81087f89c0ff9b38a4b98185", [ null, {} ] ], "size.attributes.parse.octal.worker.js": [ - "23f228e368c7bc3300c4a63200a4d80ef3b2829d", + "2925361e3b33b0c0659181af0293f0f749177568", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.worker.html", {} ] ], "size.attributes.parse.onlyspace.html": [ - "4164123fd1c1852d0ccba310b31ac35947f13cb2", + "821de438aa41cbe2a680f193784b90f9b635f7a4", [ null, {} ] ], "size.attributes.parse.onlyspace.worker.js": [ - "a4b86624f7f899fcf182a1e4a377d31d0557131a", + "e5fadf13c8eef7c55a788a78dde0ffa5872848d3", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.worker.html", {} ] ], "size.attributes.parse.percent.html": [ - "d6288e996ed26987336474cbd40a085b7140b010", + "58748103a4f876352315d6fb7fcc871478acf2cc", [ null, {} ] ], "size.attributes.parse.percent.worker.js": [ - "e07fa60407a3746347be23dba87ca881860bee0f", + "acbd2a1354814255d12cf59a61e8b1e8aae773b4", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.worker.html", {} ] ], "size.attributes.parse.plus.html": [ - "79d531f06e1c996340156d02bd9909d9a2851f34", + "45558293b6228b7ac06c4470ddd128665a2a2671", [ null, {} ] ], "size.attributes.parse.plus.worker.js": [ - "240a6bd7855305d53ab3ebdd08c2657e96f686af", + "ecf67976769f06186527a4567b10c7688bc00c7f", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.worker.html", {} ] ], "size.attributes.parse.space.html": [ - "695afa540712d98f986bb6e873ba8a752de0dbfc", + "b0d63a4694f3f0b047929a60620f059d3550412f", [ null, {} ] ], "size.attributes.parse.space.worker.js": [ - "29930209bf8c4fc83563613ab51c94b07e1030f2", + "11ac398b0d42e9e20f0f2165382ece487c7843f0", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.worker.html", {} ] ], "size.attributes.parse.trailingjunk.html": [ - "fff231fda7be7021e494dcbbff48bf1bf08900d9", + "536ea901d0e8e7fc79249c774d5bc36b3ca870f8", [ null, {} ] ], "size.attributes.parse.trailingjunk.worker.js": [ - "f8d916c853d6a8aec049ff8d9197d550aff3d49a", + "1d1c5e7f28dcc58aff8e15696584e3aa206aeb39", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.worker.html", {} ] ], "size.attributes.parse.whitespace.html": [ - "b7f0c4b9317cfbb073b29c638e99c8518ccc2244", + "53a3a2e6055b3cf33190dc84e84ce09dfb69186f", [ null, {} ] ], "size.attributes.parse.whitespace.worker.js": [ - "ea3839814538e4ce0f641cadbe94e6c0eb4b206e", + "26296e10234ff4701837726d5e33346832261fe8", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.worker.html", {} ] ], "size.attributes.parse.zero.html": [ - "9a84c95598048340b261c3213352e4d7bd48a1b5", + "1af0d2a61e246fa9678c8dd86ad4a486fca16090", [ null, {} ] ], "size.attributes.parse.zero.worker.js": [ - "4d97a96b42ea6b51372bc0001d4ecc54f5f9119a", + "5348bf6a83c94f147bc9fbcf253067000712e096", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.worker.html", {} ] ], "size.attributes.reflect.setidl.html": [ - "968dad9dda1c95b626581576e1c14cf022c33502", + "997bf974ad839bf0fb7a5305f3cc89a773969234", [ null, {} ] ], "size.attributes.reflect.setidl.worker.js": [ - "3f8050d549c299ce3e622498ec2c8ffd07ae275c", + "9555f665ab391f044366429a147bca78adee399b", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.worker.html", {} ] ], "size.attributes.reflect.setidlzero.html": [ - "5f31f696cff52947391b69c0cf0ce9315e756d86", + "50e9096fdd43063d52eb1dbac029dc28afe4a67e", [ null, {} ] ], "size.attributes.reflect.setidlzero.worker.js": [ - "4ace1f5edbe2ca3ef51e243d50e1c2c6107235da", + "e412b7a5142b780577679a0513a8f481a056dbbe", [ "html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.worker.html", {} ] ], "size.large.html": [ - "9f41e2e23a24473bb8ddd7352bda95d157d39d68", + "46b8a055bb3bde2f553fefdc19ad6fbd20e35e73", [ null, {} ] ], "size.large.worker.js": [ - "b20ff54969cf436f988170013e0a5dadc0d52dfb", + "6a5bb5ee7e06719096b3a33f9acbff2768285e03", [ "html/canvas/offscreen/the-offscreen-canvas/size.large.worker.html", {} @@ -604053,12 +604851,464 @@ ] ], "shared-worker.https.window.js": [ - "0bfa72e2e5464ed060789ee9eef98f8847167619", + "5e259a5acc9731aace980cd99385caa951242c1d", [ - "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html", + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless", { "script_metadata": [ [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "timeout", + "long" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "./resources/common.js" + ] + ], + "timeout": "long" + } + ], + [ + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=cross_origin&worker_coep=credentialless&window_coep=none", + { + "script_metadata": [ + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "timeout", + "long" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "./resources/common.js" + ] + ], + "timeout": "long" + } + ], + [ + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=cross_origin&worker_coep=none&window_coep=credentialless", + { + "script_metadata": [ + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "timeout", + "long" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "./resources/common.js" + ] + ], + "timeout": "long" + } + ], + [ + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=cross_origin&worker_coep=none&window_coep=none", + { + "script_metadata": [ + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "timeout", + "long" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "./resources/common.js" + ] + ], + "timeout": "long" + } + ], + [ + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless", + { + "script_metadata": [ + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "timeout", + "long" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "./resources/common.js" + ] + ], + "timeout": "long" + } + ], + [ + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=same_origin&worker_coep=credentialless&window_coep=none", + { + "script_metadata": [ + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "timeout", + "long" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "./resources/common.js" + ] + ], + "timeout": "long" + } + ], + [ + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=same_origin&worker_coep=none&window_coep=credentialless", + { + "script_metadata": [ + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "timeout", + "long" + ], + [ + "script", + "/common/get-host-info.sub.js" + ], + [ + "script", + "/common/utils.js" + ], + [ + "script", + "/common/dispatcher/dispatcher.js" + ], + [ + "script", + "./resources/common.js" + ] + ], + "timeout": "long" + } + ], + [ + "html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.html?request_origin=same_origin&worker_coep=none&window_coep=none", + { + "script_metadata": [ + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=none&window_coep=credentialless" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=none" + ], + [ + "variant", + "?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless" + ], + [ "timeout", "long" ], @@ -606190,7 +607440,7 @@ ] ], "reporting-from-rp-ro.https.html": [ - "b1da8cf77cefba3ab3ebaa5261dcc1c0b5583470", + "b89030f218ffeb79da7269f70a3432f79700e95a", [ null, { @@ -606199,7 +607449,7 @@ ] ], "reporting-from-rp.https.html": [ - "a8c11d7a4a89f6885e73422510c9046e9faab7a5", + "6b31f7e0098da78db34e91ba179ac1ef86e3035d", [ null, { @@ -606208,7 +607458,7 @@ ] ], "reporting-to-rp-ro.https.html": [ - "eb80842863425fd60d04206354e60942c59232e1", + "c47e59cd8f1aeac7ee6b1dbe2177595730148a38", [ null, { @@ -606217,7 +607467,7 @@ ] ], "reporting-to-rp.https.html": [ - "ad57afccf8fa4703434d39e070cce7744f65600d", + "ff60e8c5afda67ff3ca1573dab5405769b2b2cc3", [ null, { @@ -610701,7 +611951,7 @@ ] ], "video-intrinsic-width-height.html": [ - "ad5b69db21ef30fd7444eccd3d82f9bdae67221c", + "74989be5213d31dd6eef9c913163d370ffe722f4", [ null, {} @@ -612564,7 +613814,7 @@ ] }, "networkState_during_loadstart.html": [ - "e0e1f510190e36ef2a9f7e95ff9c44f78134bd53", + "8570bfd111ddd5e9a639c2ef2955d63d33bfab5f", [ null, {} @@ -613847,91 +615097,91 @@ ] ], "2d.canvas.context.html": [ - "b9d26011e283e7cf07470e51d6f0857a32e7af65", + "51cf0a2ec6d7d17731fc8407214cf3383adaac93", [ null, {} ] ], "2d.canvas.readonly.html": [ - "7f735b9413ad23cb30049a02d6ada13229d5c4d6", + "4b9e68108fe8f5faea7e6f9b343db9c973790a73", [ null, {} ] ], "2d.canvas.reference.html": [ - "dc841121a9cd9af21ead23e8d59171f8cc7fe762", + "182a0170a67b9a46f99829e2bf8a65b3330ccb30", [ null, {} ] ], "2d.getcontext.exists.html": [ - "30032a9930064bd5b51484158eea8e8970e325b1", + "a26bc4040c7d3940d5bb07ea358096fa9c630e7d", [ null, {} ] ], "2d.getcontext.extraargs.cache.html": [ - "18d700645166611b0891d53301bef31c62c14ad1", + "eb47929a09f75d73743ccfd42041e575b36586ad", [ null, {} ] ], "2d.getcontext.extraargs.create.html": [ - "980d1036953d2187fb4622772b96bd88f573c044", + "0683e459c4b37fea779de8314503710faf0b38ab", [ null, {} ] ], "2d.getcontext.invalid.args.html": [ - "ff592c9ba962192dec29ee7d7dc4886051759c50", + "c3407d0500352e4ec0edccf6527a4c6b062f67d4", [ null, {} ] ], "2d.getcontext.shared.html": [ - "93c1603b6959582248d0980751de2d6fc66c9ce0", + "54c1fd13fdedf29022153c4c7147289dbdfc25be", [ null, {} ] ], "2d.getcontext.unique.html": [ - "8632dad109c13260d9a49981fb1c4166b0a3e5d7", + "c6e8980a20c5ce596a95afaa5f5cd9f11a49df9e", [ null, {} ] ], "2d.type.exists.html": [ - "e7fa25c46ef056a9231090e324582746c137e320", + "e2c09e60d742779e76b3da528d60e51382973b61", [ null, {} ] ], "2d.type.extend.html": [ - "1cb5e4869f96f0471b22c74ef00fa8f88ca6713b", + "151b40d36f493328f42ce7dc484221695963ed1a", [ null, {} ] ], "2d.type.prototype.html": [ - "bd95dac8af99a6a5d3ef231d0e9e00ca51b26dcd", + "24ee5068bd5823a85af101af9ee0ce15c3aab53d", [ null, {} ] ], "2d.type.replace.html": [ - "47aa5bb8235a7b5e4892546973e3923e4393b0a8", + "aa0ec1cff4d93b36d1a2bd1fb629147610d9c063", [ null, {} @@ -614064,7 +615314,7 @@ ] ], "initial.reset.2dstate.html": [ - "d0fd3d60221fde9574ebc0a9b0e199d3bec3dda8", + "a99cb5d3898e3ec9dd33e01aa9120e126931fcdf", [ null, {} @@ -614295,105 +615545,105 @@ ] ], "size.attributes.parse.decimal.html": [ - "d1954aa3eb3e0c91423e5df87690ecd055a79af3", + "613cf0e11a5821c7354f022bab7d028cf1b53252", [ null, {} ] ], "size.attributes.parse.em.html": [ - "3fc93a5c4b1571c0449974feb333e01f07a21a30", + "21d9e6ab1e84504705c3c103ec466f7193eaf098", [ null, {} ] ], "size.attributes.parse.empty.html": [ - "df58fcbb0d25f78ff036c19c5acb12fb5b11411e", + "7198ccd3abf8c32426a4a6cd7fe05d4cdec70e00", [ null, {} ] ], "size.attributes.parse.exp.html": [ - "f59ea05fecc2260cc169a130c0e6f6f32ff42345", + "c609939640b3820941b6cffedb1e71bf25874b46", [ null, {} ] ], "size.attributes.parse.hex.html": [ - "1b9b741b20bbf74d8112ce3fcaa1a99fe58b75af", + "a00bb3c4ea2f1900a6fed23f38d5364d434a28e1", [ null, {} ] ], "size.attributes.parse.junk.html": [ - "72e2edbbe7cbe1438df0497e4bb2f4bd3f435c28", + "7b4f837600dbd6ad9c3354a1e32e6bda10aa376b", [ null, {} ] ], "size.attributes.parse.minus.html": [ - "779879d6a802561f81086f8b07072557c9db8d25", + "6d6560b8db92779896450033115abb4d489d0eb2", [ null, {} ] ], "size.attributes.parse.octal.html": [ - "b795d1651a708d003516a6e5c2c586eac9bb2ad0", + "e1f42ea18865f6a2fc8203761aff69e79949e7ec", [ null, {} ] ], "size.attributes.parse.onlyspace.html": [ - "3a1253257e1158bfc4152cdd8fb67512fe53d69f", + "20721dcc6fa2eefb187b8546accdef30b1e12b60", [ null, {} ] ], "size.attributes.parse.percent.html": [ - "bcaaa0e858f447e39eea491cbf81d0600ceba927", + "860703c6c2e4172321c2ef5c975dfd12b4d21b39", [ null, {} ] ], "size.attributes.parse.plus.html": [ - "5ef717020ca0bed166b6f31bdaf2bf00ced8159a", + "2b600941a8db2580d8cb19169e20a2d0486f6840", [ null, {} ] ], "size.attributes.parse.space.html": [ - "0f12f4dd85ef1654981dbed05269869986d8e132", + "34cae4d4c90957740f8785b00bd1a2379d582505", [ null, {} ] ], "size.attributes.parse.trailingjunk.html": [ - "287887b5a37f31ab5cff8aa24e4f6d12df1a57f8", + "e2b92ee0aaed53d6bc7e941a55a7a250779f4635", [ null, {} ] ], "size.attributes.parse.whitespace.html": [ - "13c5fbbea64ca3ae643ff55d8ac58901fdfbd89f", + "c7a76f967e249112941a7e8507c456eaf9026d0d", [ null, {} ] ], "size.attributes.parse.zero.html": [ - "fa0560377ab396779f0b666c3c0b4c83a8a49af4", + "0f7a0415a173a48db72bf7c8925e711ec6327dfd", [ null, {} @@ -614428,105 +615678,105 @@ ] ], "size.attributes.setAttribute.decimal.html": [ - "e2eaa1ff8e29d784017b44357a3da6711237645c", + "9f0b4b1deb052aeda2966e605278b92bf0c8a1ce", [ null, {} ] ], "size.attributes.setAttribute.em.html": [ - "a806ad5f7760d2319909ce1b0a04d70c03b0bb9f", + "df0eee7462e3253968994d97e55f18e1cdec3f43", [ null, {} ] ], "size.attributes.setAttribute.empty.html": [ - "fc9690d858e432b343c2a9dc1df6ccf17cd0691a", + "37e021424a086fb7be7d45d285333dde65b866ba", [ null, {} ] ], "size.attributes.setAttribute.exp.html": [ - "c36d3eca6ddcebddc1c4c7cab76077d9c40d7884", + "943b98b9c3b7a627ad1d9ec475707d41742e9890", [ null, {} ] ], "size.attributes.setAttribute.hex.html": [ - "ee3669adff65eebc0b6a6aa81fc0a48c936fa648", + "a73ff5ec042dbabb9bcff7799caaaf34a3e58ae7", [ null, {} ] ], "size.attributes.setAttribute.junk.html": [ - "e04166bd0d790c129a5ead4db9bce1d87a08ec90", + "607892d3f08e979e85a53a29846bb17225cf1122", [ null, {} ] ], "size.attributes.setAttribute.minus.html": [ - "159a29346c84b427abd8c4a38f19d1d0fc67bd24", + "4fd49e5eccf200782a0440a6e9358188b70674b2", [ null, {} ] ], "size.attributes.setAttribute.octal.html": [ - "9419b449a5d726880f234e5e4b15885283914776", + "d841413d3fe1f5ac85c9ffb74eeca779d96fa21e", [ null, {} ] ], "size.attributes.setAttribute.onlyspace.html": [ - "3e1342957183109f2022dc618e345e44a6b2cdf4", + "7959c303d489fbf1602438d72bead3bf90e6999c", [ null, {} ] ], "size.attributes.setAttribute.percent.html": [ - "03520e8589a8a05ff40eb935b036233c55decd4e", + "6fed0cdae5a4c90907b026cd351c6f886e9276f3", [ null, {} ] ], "size.attributes.setAttribute.plus.html": [ - "bcf24923b11ae58914c13bc3a76d78186471c6d1", + "4be39bf19bdc817fbc209f893298d3ce244bc6f7", [ null, {} ] ], "size.attributes.setAttribute.space.html": [ - "5920f67f961e44dc83fc7dc3dcc9be9f9850a5e1", + "3cc00788ef7acde2c6c425f08db8bde7f733143e", [ null, {} ] ], "size.attributes.setAttribute.trailingjunk.html": [ - "cb76b7a939d32f9821e4337afbbf41957ba3c7f1", + "4c9b7ce54a2c43e1ab1616365f16c1ec0f40feac", [ null, {} ] ], "size.attributes.setAttribute.whitespace.html": [ - "b7c0ed6b5920b93c4172fe34a41d769d4095ca67", + "8f6ecc95b4a8f2b06a6f077fd2bc50a4798856fa", [ null, {} ] ], "size.attributes.setAttribute.zero.html": [ - "0a919e977c502cebce68086be4bf2c0fc3b7e585", + "2bbad823537779286a4f52bf39252e45f09c8d51", [ null, {} @@ -617845,6 +619095,13 @@ {} ] ], + "input-type-change-value.html": [ + "74aeef7cd514c4994e60495cc1247fe8c7c5333f", + [ + null, + {} + ] + ], "input-type-checkbox.html": [ "7dd2f26b12c459405b8e6c59563f09cc1ec15c0c", [ @@ -619289,7 +620546,7 @@ ] ], "dialog-overlay.html": [ - "a366f61a355e639d3a918fb981c49fa57264684b", + "9cd2426b8cbb6ef7c03b1def07d7ae5e871eb3e2", [ null, {} @@ -619945,7 +621202,7 @@ ] ], "popover-light-dismiss.html": [ - "4b888169e1becc6daca007a6d6e71df0004e8049", + "59a12a2c9ac18e8eefe603c481057074541109a5", [ null, { @@ -623844,6 +625101,13 @@ {} ] ], + "script-type-whitespace.html": [ + "5e8acb1a17bace7ad5f55ac9a3545bbb1220ae10", + [ + null, + {} + ] + ], "scripting-enabled.html": [ "a2671a78f69c1f0065892fbeba81e872163c756e", [ @@ -624055,6 +625319,13 @@ {} ] ], + "dir-dynamic.html": [ + "8f2951f8efcd61aef17dbc4cdeea80ab0bfc9d64", + [ + null, + {} + ] + ], "dir-html-input-dynamic-text.html": [ "0c50cec369ba87122aed0982c26a50605fba910b", [ @@ -624063,7 +625334,7 @@ ] ], "dir.html": [ - "fb2a10e0ca303761bf90392a16b3996482bf0f21", + "588c3c685070c99573feee16dee16b3e4ddcde08", [ null, {} @@ -633071,7 +634342,7 @@ ] ], "idlharness.html": [ - "84d1c7ff9aea26fe7b5810b3d236213d8fac6a5a", + "5f5d286b356cf5dcffd76f2ed6f689804e8426ba", [ null, {} @@ -633092,7 +634363,7 @@ ] ], "image-full-viewport.html": [ - "e67e21a17c7d743e632c15770eafa8fe23cc1f6c", + "2f8e17fb3220729eb1ee8841efdb9d3bcc8256d0", [ null, {} @@ -633106,14 +634377,14 @@ ] ], "image-not-fully-visible.html": [ - "1aee495fe194fb3defb1b3296564bd90a76e264a", + "514a424f68ec55f01269be8016ae86cf84f2c522", [ null, {} ] ], "image-removed-before-load.html": [ - "3e557a4fdc77266e8462047dc03658ac450ad79f", + "08e5ee56dba1507cab5d444f01bcbaa18c675d68", [ null, {} @@ -633141,7 +634412,7 @@ ] ], "initially-invisible-images.html": [ - "b4d68a5cb9230232781b88bf1f37b8c19a38e35e", + "061a0140d10c5e070a560edb76ebd2045454a4e2", [ null, {} @@ -633169,14 +634440,14 @@ ] ], "larger-image.html": [ - "948f00d0c61d4bd5e78b6c577fa007c5f3519562", + "9415cbc32fa8092c7206d030246b7e35980a7556", [ null, {} ] ], "larger-text.html": [ - "8758c1c839b5f725e6d15ea6ec6ac7375cf78a49", + "c577899eccbd97cca9730b3849d9e5a20473e549", [ null, {} @@ -633190,7 +634461,7 @@ ] ], "mouseover-heuristics-background.tentative.html": [ - "16cbd0f0cb9ac90ff741f431350dea546ac2269c", + "ddd4f9672e78e5e0ede5ec94fbdbd352081e670d", [ null, { @@ -633199,7 +634470,7 @@ ] ], "mouseover-heuristics-element.tentative.html": [ - "bbd87235e826af4518c869c19920d21dba05cd86", + "afc4b2a50d6bdbe63039b2bec42225dd873f1355", [ null, { @@ -633243,7 +634514,7 @@ ] ], "non-tao-image-subsequent-lcp-candidate.tentative.html": [ - "50f9a229ea6bd99c38e2a40ab4219c1eb96e3cf5", + "4d799c1b05af386a946fdd2eaf1041df555d21e0", [ null, {} @@ -633306,7 +634577,7 @@ ] ], "placeholder-image.html": [ - "6a2ce5c7c6df636e7003e7c69a58e65eb444f454", + "06691cef22e507fc21d9b381d963268d118856da", [ null, {} @@ -638120,7 +639391,7 @@ ] ], "MediaDevices-enumerateDevices-returned-objects.https.html": [ - "2b5687f672b9f6ec288be7003c361f96af83a10c", + "6e6dbaf3bba4fa84d2ebd2a74fc56034afe33070", [ null, { @@ -638129,7 +639400,7 @@ ] ], "MediaDevices-enumerateDevices.https.html": [ - "4971f4fc48280c42388d24085e35dde07e0d9b10", + "88c07048a1b48940787f8659dc32cb78bf041b86", [ null, { @@ -638145,7 +639416,7 @@ ] ], "MediaDevices-getUserMedia.https.html": [ - "96399c804fcf35e5a2f554eae6f2e2dbc2ad8db5", + "9376f528974a95ebf57e920d10678e182ac6582d", [ null, { @@ -638314,7 +639585,7 @@ ] ], "MediaStreamTrack-getSettings.https.html": [ - "c1d90a4f4831abb2a7045dc79c5b662164f2616b", + "1bda4c748ac5a0c0711cc231710c18ed5afa7c25", [ null, { @@ -643461,7 +644732,7 @@ }, "notifications": { "constructor-basic.https.html": [ - "3f704de03e3395e0a4a1266f3e1eec17fc94cbe0", + "df959b922f9745c14045f423de8dafc89556f464", [ null, {} @@ -647564,7 +648835,7 @@ ] ], "pointerevent_mouse-on-object.html": [ - "78edfbde1b81d963e767e36bca0faf9133b935d8", + "27142a4f59c1b8448dab3d1c47ca62ea1f54587a", [ null, { @@ -647838,7 +649109,7 @@ ] ], "pointerevent_click_is_a_pointerevent.html": [ - "2571c9c9034200e03bf2ad904cd859da9ccf6ddf", + "36b80b66f57fef9dd7b007e3c20889eaf2ca224f", [ "pointerevents/pointerevent_click_is_a_pointerevent.html?mouse", { @@ -665818,7 +667089,7 @@ ] ], "animation-range-ignored.html": [ - "dabb4ec5a60427b8137f02441feec0f7bf68658a", + "98a5d45c37f9349eb28b54406e6542e58cb5b2a0", [ null, {} @@ -665845,8 +667116,15 @@ {} ] ], + "animation-timeline-deferred.html": [ + "d0671e5f238bdaf0a2231e22c07509656eedbc77", + [ + null, + {} + ] + ], "animation-timeline-ignored.tentative.html": [ - "8992cdc174fbcacc78476013536c31f30154a03c", + "4a6624caf437d1f310d5228e14a6e0d773036ced", [ null, {} @@ -665860,14 +667138,14 @@ ] ], "animation-timeline-multiple.html": [ - "e812c7d67ea3771c5c0355fa0eb57526d2209fb0", + "3196653656d15e6f813badf43e8062fa6963077d", [ null, {} ] ], "animation-timeline-named-scroll-progress-timeline.tentative.html": [ - "71df9ceda873e29146259d696c5ca9cc6d34fd06", + "5a1f26b3f38838e120b6acf05745e4cbe75b2380", [ null, {} @@ -665888,21 +667166,21 @@ ] ], "animation-timeline-scroll-functional-notation.tentative.html": [ - "0bba4a03f402c18741a62046c785fa20b46227d8", + "31c85810d5595ad22628c99319d38599ffae495f", [ null, {} ] ], "animation-timeline-view-functional-notation.tentative.html": [ - "8a62199b524862b7feee1cfa577275c3490e03a2", + "3ac94478e5955b09d2625c5cc8785514d8cee76f", [ null, {} ] ], "get-animations-inactive-timeline.html": [ - "d3048913cef2229e27d54d19d3e014adfbb7b670", + "83bc5b5f531be108c743cdc75c77d0b6ae6bc5bd", [ null, {} @@ -665923,7 +667201,7 @@ ] ], "progress-based-animation-animation-longhand-properties.tentative.html": [ - "f4f9a669f3dcc05fe9eeef6df175df576ff49056", + "25ce1675533de7643eb0ac2863a7ed88b35322b2", [ null, {} @@ -665936,27 +667214,6 @@ {} ] ], - "scroll-timeline-attachment-computed-tentative.html": [ - "3ec18a0eb9a675a64e61f7e5ef8acfc6b490fe64", - [ - null, - {} - ] - ], - "scroll-timeline-attachment-parsing-tentative.html": [ - "3235292d20bd84e2b7052ee0e9c674bc4f97e949", - [ - null, - {} - ] - ], - "scroll-timeline-attachment.html": [ - "c924302b224acfb351d55b8047f47f5915f4f33b", - [ - null, - {} - ] - ], "scroll-timeline-axis-computed.html": [ "c942fb40932433dd4daf7dbb68557488bebb14e8", [ @@ -665972,7 +667229,7 @@ ] ], "scroll-timeline-axis-writing-mode.html": [ - "872dc1b2b93fe4236f76a78321be7edb10f32a14", + "cb9a98dcd8e57174a5d59f320349cd11dc58fa36", [ null, {} @@ -665986,7 +667243,7 @@ ] ], "scroll-timeline-dynamic.tentative.html": [ - "57c666e2412cb0e7316a78da83980ce608b92bf8", + "d1f143c7c191392b7a52785c371a671a181b5f0c", [ null, {} @@ -666007,7 +667264,7 @@ ] ], "scroll-timeline-multi-pass.tentative.html": [ - "7e0c1339b261bdaa9b59a2a9c76451fd1574fe86", + "403316ead0fed5072111d50b0673d57a95c99cf0", [ null, {} @@ -666055,6 +667312,13 @@ {} ] ], + "scroll-timeline-range-animation.html": [ + "df087da6e2b023a6f8fcf70dc9dc9e930162ab7b", + [ + null, + {} + ] + ], "scroll-timeline-responsiveness-from-endpoint.html": [ "71d3699077e02fafa02e3fecc37edbd1f4060a98", [ @@ -666070,14 +667334,14 @@ ] ], "scroll-timeline-sampling.html": [ - "f77c5082200f6fbafa1201e5f315157409e82daf", + "a67f3b94e49818e3da6bbe69c8407d23674c34da", [ null, {} ] ], "scroll-timeline-shorthand.tentative.html": [ - "7a6d9cdf4ae0771700984ddedd41070e85f4caa4", + "0c8a47ae20d1894a05ed5b615d1cc7d74ebe881f", [ null, {} @@ -666091,14 +667355,14 @@ ] ], "timeline-offset-in-keyframe-change-timeline.tentative.html": [ - "311b2c8929a112940e80371ea3be8e85b6792991", + "5a70820b881edf687961606f79153dab96d6ac2d", [ null, {} ] ], "timeline-offset-keyframes-hidden-subject.html": [ - "10934347821b05331cf59bf27b103aecbf979556", + "011b8d4319a391837f5e1c80b330793b4201337a", [ null, {} @@ -666112,7 +667376,7 @@ ] ], "timeline-range-name-offset-in-keyframes.tentative.html": [ - "cee90f3b1b0112206b9b2522400af0155ec365fd", + "6fab0025dac324bf5f0af79e37af8e832d4d36b6", [ null, {} @@ -666133,7 +667397,7 @@ ] ], "timeline-scope.html": [ - "985e694bfdc89077ba0075bb16cea1772e003c2f", + "e4e90bc03ac5618a4a164b30e3b7d32e0b9f259f", [ null, {} @@ -666147,28 +667411,7 @@ ] ], "view-timeline-animation.html": [ - "9f8ffd176e34e723b465218474be69d0e1ada27b", - [ - null, - {} - ] - ], - "view-timeline-attachment-computed-tentative.html": [ - "dd244e137bb28d8b1d577d6f474ad49ab5c12519", - [ - null, - {} - ] - ], - "view-timeline-attachment-parsing-tentative.html": [ - "25e20135f149d621f0b4cb88bbb69ee6a3f9cc11", - [ - null, - {} - ] - ], - "view-timeline-attachment.html": [ - "a91ae13d64a2c98323adac1defbb1ab741bc0b0d", + "d1ea2f6c07f56e848ed9d178b85af484c668a59c", [ null, {} @@ -666189,7 +667432,7 @@ ] ], "view-timeline-dynamic.html": [ - "9e042b774b9e992fb707d7a27ad5e96940aa80bc", + "81dc8353c20971e338aec81fdb7e76cdf6cdc731", [ null, {} @@ -666224,7 +667467,7 @@ ] ], "view-timeline-lookup.html": [ - "ea9acd22ba70baa8e028790dfa0177640718e2b9", + "98f11b85429c02af8033ad4af1515de7997c69bf", [ null, {} @@ -666252,14 +667495,14 @@ ] ], "view-timeline-range-animation.html": [ - "1c657e40cebf0853a14151e9f46be0fa19c33839", + "9e5993b63a8792077c8e67302cea16671b8521b5", [ null, {} ] ], "view-timeline-shorthand.tentative.html": [ - "fd00acc73ab17ed7642d9c332d6e50aff4b63203", + "e5bf8822932177d621ba80ef42cc2b24ae8bc8ae", [ null, {} @@ -666331,14 +667574,14 @@ ] ], "effect-updateTiming.html": [ - "78ec8e1de540abe7be1808268650c9dc78e62c3c", + "0c7a546572149de772eb2ab7ce753106a0d1774f", [ null, {} ] ], "finish-animation.html": [ - "fd768651b490bafffc8bd75410e51b913ab8a914", + "3faff63dc9300079abb73d7f4835a3333eb9d0b5", [ null, {} @@ -666363,21 +667606,21 @@ ] ], "pause-animation.html": [ - "9b263f843d267566c45830d8670fa909726df0c1", + "1f9641e2f8d61845d64bff98129985c42468cee7", [ null, {} ] ], "play-animation.html": [ - "d408547f5554f49e630f635a1f6af3e53a87347b", + "7d95eaa257748c069079143bd4091c841f32ac3f", [ null, {} ] ], "reverse-animation.html": [ - "cf6173b60a3f78c6923bc0276a67a78d0c184796", + "1054ed3983696e5ef3310db1e2c996f0470d427e", [ null, {} @@ -666393,7 +667636,7 @@ ] ], "scroll-animation-effect-phases.tentative.html": [ - "5ded56bbf780c6bca09c3bc42d081fb072353604", + "67bc36ca104258b970489898872d9932201e3823", [ null, { @@ -666402,21 +667645,21 @@ ] ], "scroll-animation-inactive-timeline.html": [ - "236452eead55d2ad71cb1a19a88a433b22b2d40d", + "02220cee141b0f33591c7e8a00ff8013b15e5219", [ null, {} ] ], "scroll-animation.html": [ - "bc7ab4a476dad28137e088a2430ada9ec3c38df2", + "e3544762f60dac3d1af563b061f5a9064f44a84b", [ null, {} ] ], "scroll-timeline-invalidation.html": [ - "0b9e10c9846d17ae19be1d5c6f1b47e0826dc386", + "cf5e74898afa5f507c50439c501507da80749f5f", [ null, {} @@ -666439,21 +667682,21 @@ ] ], "setting-playback-rate.html": [ - "4d6fecae054514f5f36df938ab1fd7f9f0a58a07", + "e7e96a27e1ff3961b66139fb5fae6d2ac82e9fff", [ null, {} ] ], "setting-start-time.html": [ - "d506df65bf988897d2649870bbce52cae9500ffc", + "aae1849565b15271105614d198b161f27d091940", [ null, {} ] ], "setting-timeline.tentative.html": [ - "34d9af2bff17cb4cced9e7b975f99a190c1f57d6", + "4a7e7366f791722c80003ad262135e8d1302afc1", [ null, {} @@ -666467,7 +667710,7 @@ ] ], "update-playback-rate.html": [ - "1db31602f312c44906a3a14e8ef542d355f31a1f", + "10535319fca2d453271cc0e9ef89dd59deb0c452", [ null, {} @@ -666504,7 +667747,7 @@ ] ], "change-animation-range-updates-play-state.html": [ - "16b9c30141761fadaba5d9652114838a22d1f20c", + "ee01070a53c96be161b5be770e4ed11a3a0c8b8b", [ null, {} @@ -666539,7 +667782,7 @@ ] ], "view-timeline-get-set-range.html": [ - "6de2d84df73bc7f4e729e342670c803e85e0c27a", + "94660abcf27b370b35b67471028237a52af1eb27", [ null, {} @@ -666601,6 +667844,20 @@ {} ] ], + "view-timeline-sticky-block.html": [ + "43b717560ddf599fe358cacf80135b9d901f6dfd", + [ + null, + {} + ] + ], + "view-timeline-sticky-inline.html": [ + "4dc8331d9fa675e379a2648d0a2a5fcacce94b89", + [ + null, + {} + ] + ], "view-timeline-subject-size-changes.html": [ "ee7ce906783c10c2b5e9b9734f14de906c122542", [ @@ -673492,21 +674749,28 @@ ] ], "shared-storage-permissions-policy-default.tentative.https.sub.html": [ - "5439df2a0684331e63059e095396a9b2af89c17f", + "87fcdfe18706bf45617428e3092ebdcc4d070098", [ null, {} ] ], "shared-storage-permissions-policy-none.tentative.https.sub.html": [ - "17a4bf1803ca33edb2d0259d14f484839c9aa3e5", + "1f64d9a538cd558241eb6724ab2193d83a90ac61", [ null, {} ] ], "shared-storage-permissions-policy-self.tentative.https.sub.html": [ - "171325cdf8f0a909eac659e1dcbb334e50eef216", + "d3787f3caa54cddd025b12cef89e921ea5e62500", + [ + null, + {} + ] + ], + "shared-storage-writable-insecure-context.tentative.http.sub.html": [ + "346321a41f46032dadf65a3abe4a69c3fb5f8dba", [ null, {} @@ -673985,7 +675249,7 @@ ] ], "image-lcp-followed-by-image-softnav-lcp.tentative.html": [ - "27e9bbbd13c6c9affad7bbd4b0aa3cdad2d0b3bb", + "7a2018d20ee811ff1ec9ca88c80038b0f1239874", [ null, { @@ -673994,7 +675258,7 @@ ] ], "image-lcp-followed-by-text-softnav-lcp.tentative.html": [ - "5aa1b1da2ef1c1fecddedbef0067a1a24167c9fa", + "501d1c5fb6fa0346f3c5cecd550001f933c9f1f1", [ null, { @@ -674003,7 +675267,7 @@ ] ], "image-lcp-followed-by-two-image-softnavs-lcp.tentative.html": [ - "7f5bafb5e685d9c07eb16663af823d0f06e9023e", + "1489ae1a94a811c9f098f0fca97edc50b53692ba", [ null, { @@ -689759,7 +691023,7 @@ ] ], "fallback-roles.html": [ - "5242a02deec006b6dcfc152c7d5963c0bb85cdbe", + "eb6e89b29aec91cd0ca106488e6237cc1731c60c", [ null, { @@ -694445,14 +695709,14 @@ ] ], "coep.https.tentative.html": [ - "4029fc6f815eb911745d4c1a471352b6c0952e45", + "5e48cb73524aac8eed838b6ab8570fce0ee207ae", [ null, {} ] ], "corp.https.tentative.html": [ - "ce18544b0bd8eea578f19daf041e9d79a72fe1f7", + "3c46de6c76890aec078cb576e87d67006620631d", [ null, {} @@ -694466,14 +695730,14 @@ ] ], "csp-allowed.https.tentative.html": [ - "55498eaa4e50fdc0255463bb08ef5c3301958cbe", + "890a5ba5bc999d4bdcf631d1257ff160d6dd6503", [ null, {} ] ], "csp-blocked.https.tentative.html": [ - "6700533b58cad6e4c47f71bb7e13002dd4df8a8e", + "6e5e82d5399cf1e3b7f99743e188ec8fc8af6881", [ null, {} @@ -694585,7 +695849,7 @@ ] ], "resource-timing.https.tentative.html": [ - "a2fe38de0f6206683e45e7b4ab628cfd40ff7634", + "c486cf1711fcf203756a4afc9b73ec52b2a71da2", [ null, {} @@ -694599,7 +695863,7 @@ ] ], "service-worker-controlled.https.tentative.html": [ - "d5c2a06837163d3416a9c4f7fcd083b024b12fba", + "b2e9abe5be3491f3976db746a691bb4de43c017e", [ null, {} @@ -694619,13 +695883,6 @@ {} ] ], - "subframe-from-web-bundle.https.tentative.html": [ - "9e08ccdd29c43a3f466dac081514a6842c992ce5", - [ - null, - {} - ] - ], "subresource-load.https.tentative.sub.html": [ "10c207020c2e3de5d8aaf053617adaa3d42786f2", [ @@ -697414,21 +698671,21 @@ ] ], "convolver-response-1-chan.html": [ - "300b43622bd96c51cd3a93c9627e31af9d1e2e5f", + "e239a5e86f9797c1fdaf8dfdc705937ef45e8110", [ null, {} ] ], "convolver-response-2-chan.html": [ - "9baf5f9f8d2c5ebda9c297647212eecb6fe9aa25", + "a73eb3f8abb1c974366d5e528c3d30353443edc7", [ null, {} ] ], "convolver-response-4-chan.html": [ - "cf3986e8d04ca203de979174a3db2bc1998a4ce8", + "f188d87b71f4c5d134feebd10ba95ffe165debb1", [ null, {} @@ -701596,24 +702853,26 @@ }, "webdriver": { "tests": { - "idlharness.window.js": [ - "e92e151d89836e06966339daabc6b1be50ded744", - [ - "webdriver/tests/idlharness.window.html", - { - "script_metadata": [ - [ - "script", - "/resources/WebIDLParser.js" - ], - [ - "script", - "/resources/idlharness.js" + "classic": { + "idlharness.window.js": [ + "e92e151d89836e06966339daabc6b1be50ded744", + [ + "webdriver/tests/classic/idlharness.window.html", + { + "script_metadata": [ + [ + "script", + "/resources/WebIDLParser.js" + ], + [ + "script", + "/resources/idlharness.js" + ] ] - ] - } + } + ] ] - ] + } } }, "webgl": { @@ -705974,7 +707233,7 @@ ] ], "bundle.https.html": [ - "3d2b835baf3b48fab62e0c19d142c68a73dd58e0", + "73ea477e0473e698bec25ca01a3b21f1579b8b35", [ null, { @@ -706591,8 +707850,17 @@ {} ] ], - "RTCRtpReceiver-playoutDelayHint.html": [ - "29dfc19a6b68900679b06b3c3527c177c4e38b48", + "RTCRtpReceiver-jitterBufferTarget-stats.html": [ + "98ebea27e43fe990e521cc0f65e8d780d133bc7c", + [ + null, + { + "timeout": "long" + } + ] + ], + "RTCRtpReceiver-jitterBufferTarget.html": [ + "448162d3a2fbbb94d85fd87f2072026a64dd821a", [ null, {} @@ -750331,51 +751599,6 @@ }, "webdriver": { "tests": { - "accept_alert": { - "accept.py": [ - "b83477e5ca7247913e33abda0315a66ee0c0b3ff", - [ - null, - {} - ] - ] - }, - "add_cookie": { - "add.py": [ - "3a19432fc6a243544bcd6b8d9b13ffc01e185eaf", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "f58aacd02a71d73112fcb6140c6b766919f9b85f", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "back": { - "back.py": [ - "62434323e0ad5339a861d0752d29f7d1f95c81cc", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "9d04f0f4ab12d98f0313639013fce4f26869a753", - [ - null, - { - "timeout": "long" - } - ] - ] - }, "bidi": { "browsing_context": { "capture_screenshot": { @@ -750662,14 +751885,21 @@ "input": { "perform_actions": { "invalid.py": [ - "b07802292c9b6886a7ec6bbea9bd78e68b988c15", + "2fb45cd8321e93b8f08d894495dafcf84909a07c", [ null, {} ] ], "key.py": [ - "0521e9ccd42cfe2baa93ef7e62b683e40559cf69", + "9189bc96cc426bc927ab355edc9ddaa032c1b587", + [ + null, + {} + ] + ], + "key_events.py": [ + "8e1075ddc13f1baa9768c85c69c861957f4a81bb", [ null, {} @@ -750755,7 +751985,7 @@ ] ], "sequence.py": [ - "9b4535c1b5fa6f0013317847a276c2256e7e6cc1", + "55bc038a611b96b6db885ac811a8bb7db3661a09", [ null, {} @@ -751254,1486 +752484,1533 @@ } } }, - "close_window": { - "close.py": [ - "7b382fa9bbcb297081027391e9ac052840be48f7", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "c0f9cc7610c21ea97064392eb2e09fce6f853bbc", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "delete_all_cookies": { - "delete.py": [ - "86d66561b00c27100e3b205e6089074f50098d87", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "dca4f3c8bf6473e7fb767519d7f4a9417503f044", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "delete_cookie": { - "delete.py": [ - "4b37c0453b990483a51c62a82a6ed44667ba9edf", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "1ed7db6e8e320575ffa99ec2f7b7cf2cfeb0ee6a", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "delete_session": { - "delete.py": [ - "a3032cc13475bf2980b360d9d140e2d2f58a9034", - [ - null, - {} - ] - ] - }, - "dismiss_alert": { - "dismiss.py": [ - "a28dec768750fef214027534a8e6f18cbc7034c8", - [ - null, - {} - ] - ] - }, - "element_clear": { - "clear.py": [ - "9b0d7f2133f7686603449897c659c7e4220ec746", - [ - null, - { - "timeout": "long" - } - ] - ], - "user_prompts.py": [ - "7a8564a684a7edc5d1af0812b3353f2f5ccba629", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "element_click": { - "bubbling.py": [ - "7620ec3224fc228e57fe42614d978bbb48b0a97a", - [ - null, - {} - ] - ], - "center_point.py": [ - "eb5cc19f14f80b586a731574c1da7963364422d7", - [ - null, - {} - ] - ], - "click.py": [ - "3c3f7d70e6c6b23932e7452f73e160a2d213a5ba", - [ - null, - {} - ] - ], - "events.py": [ - "e3d32c1bcb44c7eb3b810fbce5ca0709c97abcd9", - [ - null, - {} - ] - ], - "file_upload.py": [ - "73832d0f85ae683ee2d1f54e9c0b7e3e432e9afd", - [ - null, - {} - ] - ], - "interactability.py": [ - "d55860c8746f33ba86468fbfc9952363f01e7110", - [ - null, - {} - ] - ], - "navigate.py": [ - "492718292a178e5bfe242d75acad4b6efc3cbf71", - [ - null, - {} - ] - ], - "scroll_into_view.py": [ - "c2dc6485286efc1f65679772d515c31c0d584686", - [ - null, - {} - ] - ], - "select.py": [ - "62d40755b59bc39c8dc4650a03c7ad7127c31013", - [ - null, - {} - ] - ], - "shadow_dom.py": [ - "18768a60b292816a904fdfa4d2805755c5f98034", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "140aceb3cedfe84ec8f9a3ac0285497b6e670285", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "element_send_keys": { - "content_editable.py": [ - "9db19d5b8a2da810b603b369cf1981e036790177", - [ - null, - {} - ] - ], - "events.py": [ - "4be1432bf3c2e02c8ea8a9f7bb034f9739ed0de6", - [ - null, - {} - ] - ], - "file_upload.py": [ - "f62a633c202d6fca8d5062ae6b15e2df8b20783c", - [ - null, - {} - ] - ], - "form_controls.py": [ - "364d4c28fae7807f109cdcdc32aead43d985a1fe", - [ - null, - {} - ] - ], - "interactability.py": [ - "273843fb7b46a31aadf6387ad4815b58a251b4ea", - [ - null, - {} - ] - ], - "scroll_into_view.py": [ - "7ccaeaf8142011ccbe7830876147d73853d0b07a", - [ - null, - {} - ] - ], - "send_keys.py": [ - "281c7ad719ddd05dac2ab7c6de343e9bebde4a5b", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "c1046840fa4ef24a5e063d09aee8c58803e835f7", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "execute_async_script": { - "arguments.py": [ - "ead6e0c186ea40771643aea56ccc7180e6cc28d7", - [ - null, - {} - ] - ], - "collections.py": [ - "5dfbf2059470a2f17604a0a3d9bf47f905bca82e", - [ - null, - {} - ] - ], - "cyclic.py": [ - "ff536f3477c497dce59d60b26834ef986e971c2b", - [ - null, - {} - ] - ], - "execute_async.py": [ - "42cf4aacee8342939c515b5e56a40ef15a1cacfb", - [ - null, - {} - ] - ], - "node.py": [ - "53abda4b300597ade2f5b8d38260caad9cb17f31", - [ - null, - {} - ] - ], - "objects.py": [ - "edcf06505aac243ac54ecf7195887fed387c892f", - [ - null, - {} - ] - ], - "promise.py": [ - "d726d0d71283033086b1ca8851b444968654876b", - [ - null, - {} - ] - ], - "properties.py": [ - "b9592e7edd40a5d4225fc0fc7d2c6bbade01307e", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "e39574fd4ac1b734006614c4ab6caf0a9542676b", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "execute_script": { - "arguments.py": [ - "b8657ce0efae2a266158bb8c2846864cd63c1d5e", - [ - null, - {} - ] - ], - "collections.py": [ - "ec5d5ee1e32beb19b799b633534ec31fcfb0c7ad", - [ - null, - {} - ] - ], - "cyclic.py": [ - "29db2f27e669a9e7b0c2068c09b6d9bb3b5e1f07", - [ - null, - {} - ] - ], - "execute.py": [ - "fbccc98633867b9ab137b26f0f8818b98a29c81f", - [ - null, - {} - ] - ], - "json_serialize_windowproxy.py": [ - "8e76feda23809bf65a77c6bcd3994209aaba40e0", - [ - null, - {} - ] - ], - "node.py": [ - "caf85988f15413eca765c5d5cb019b06777d3b9d", - [ - null, - {} - ] - ], - "objects.py": [ - "e254fe275e26f1adda0cf6f4898616703302e2da", - [ - null, - {} - ] - ], - "promise.py": [ - "c206674baefc75d23443fb5b7999ef465b09a3e2", - [ - null, - {} - ] - ], - "properties.py": [ - "c3b01dea29b5a160cda24ea82d0135cb1761032b", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "48d735ea754c0f74726d5a89f43eabb245b8bc5a", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "find_element": { - "find.py": [ - "50de92554bcb29659d5a5b842ef12a485a0cde3a", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "ada8e8ebee33a6ce9fcfb4871093ce1eef1d1dae", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "find_element_from_element": { - "find.py": [ - "102704cd8e318c69f51a762d3eda2b125eed23ae", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "0537a786189c41420f50e6c3b747482c331fdaa3", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "find_element_from_shadow_root": { - "find.py": [ - "62a5bc60f543aa06aff658056c23117cb2d9cf85", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "3e3381e7853b25577a0f465542c848c9429e3099", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "find_elements": { - "find.py": [ - "0d9ce21186c9a6963018d4dc819038749758ff47", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "f9a45e527515fc7448162a86dca69d3f95e76491", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "find_elements_from_element": { - "find.py": [ - "fc898bc95afecd71535bca0f23d375a1c3738299", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "467bec09a1bd61346b3df2fa5b0b8c16e02fe975", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "find_elements_from_shadow_root": { - "find.py": [ - "db739fd440fc3e7724f740fa5bd04772cc0d9488", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "45986ad6dab9322ca7126050d623904d2542e338", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "forward": { - "forward.py": [ - "f27be403f9e95bd2359d5ae6224f6ae2708ff7c8", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "3eeaf6e71cdb7311614b271257f4cd6d19a2e619", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "fullscreen_window": { - "fullscreen.py": [ - "94f25ed9bdbd4a9cf619982f9b02582b5c137335", - [ - null, - {} - ] - ], - "stress.py": [ - "b907a31f17e0167ff27a4e8ceb2ad44cd372b537", - [ - null, - { - "timeout": "long" - } - ] - ], - "user_prompts.py": [ - "106bc457f0c18769afe1d9f76c39937d17783666", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_active_element": { - "get.py": [ - "1d2960c88c5f587bf2dea86f5b97ad1e5fae9b5c", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "1ff77697b707886bbfeaee8acf08bdb8aba2de38", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_alert_text": { - "get.py": [ - "7ee7ff1808f928e67ab0e3423c13a885e28db08f", - [ - null, - {} - ] - ] - }, - "get_computed_label": { - "get.py": [ - "0dc00a471a9a37509e4ed7a448c1213bb978eeda", - [ - null, - {} - ] - ] - }, - "get_computed_role": { - "get.py": [ - "51b6a8b3b6d1e302be8885e4b2976cc0c02ff4bd", - [ - null, - {} - ] - ] - }, - "get_current_url": { - "file.py": [ - "ef6ae2383550330bfd41c10fffb41b4545d7007d", - [ - null, - {} - ] - ], - "get.py": [ - "baeab0960b6860579a7e648c650dffc4c548fa67", - [ - null, - {} - ] - ], - "iframe.py": [ - "80a960ce8a15e831941b4bf97ab6375b64b70ea7", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "d657c188241d8e0b53153d6b0e64fd386642847a", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_element_attribute": { - "get.py": [ - "375f25032c06a10fecf78a884647056fbd826b9d", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "009cb1e5fa1e1bdf4a9b433fe943f6ee4a97506d", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_element_css_value": { - "get.py": [ - "6f0a8a56395788be0f9152028f569f133fcd79ed", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "b1f9a3fb0a00f17c9c5bd5b590c8628d7888ea2e", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_element_property": { - "get.py": [ - "bb63481dfcae75ee6f80503413c552db78d3c8ac", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "e5e76947863e61ca082a66367e3ea876b8ebec73", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_element_rect": { - "get.py": [ - "942f119f43c9bb30eaefd52f3c793d7e47cfbfc4", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "20131603381bc574e44251a6909e389457dd0059", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_element_shadow_root": { - "get.py": [ - "d9adde0b9e3aee402aa2e03db9d02259d968e81b", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "5b991bac26b6247b743f81ccf82faaa94dcb71a1", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_element_tag_name": { - "get.py": [ - "3bb03d79886d88c6ba045d9f0bedae7414412025", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "89697d0ad6a20503d6ec906862d58e674ed90839", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_element_text": { - "get.py": [ - "e8d559cf661acee18a39cbc4b6bb03289385ca08", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "9f0bb386cdf549ae1edbb7843fe893bd74700212", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_named_cookie": { - "get.py": [ - "d1e83b6a81521728556b20a875164a21924c8b5e", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "3ef52a58a419352ab01a7bd016e9f3adcf1ac321", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_page_source": { - "source.py": [ - "cc4e208835c8620ac5d665db69babb5b2adef1dc", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "13cb31595e6165ffb6e3491661d630921ade5699", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_timeouts": { - "get.py": [ - "aa02c0990e1a110b5d5e7e0f479ade9cc909b956", - [ - null, - {} - ] - ] - }, - "get_title": { - "get.py": [ - "e696ec340339e64d68956c3ea3bcfa5e8fceb774", - [ - null, - {} - ] - ], - "iframe.py": [ - "9c5ab0b595d33ce38b419da1565445c9d7e221e0", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "0fd51e46f32ab5c5a6a14392afe08a0cf725115a", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_window_handle": { - "get.py": [ - "68441da5ef8460bb472beecd2e31a6cc34f0faa3", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "0bd660cfa1fb31ba4fc93bb0ecb239fc4a6c136c", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_window_handles": { - "get.py": [ - "8f4361e30c9c42e5c064b03e47f5471611e4406a", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "217e9849b4417d7124e203f937270a9e4823666a", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "get_window_rect": { - "get.py": [ - "f7592a30e067030f3c6433bc2419db06c0db8da8", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "37c8da6bd3838422441fc089d8191930dd2b3da6", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "interface": { - "interface.py": [ - "6a7afcd26358aaad3779a912fd4bc00a66ca9571", - [ - null, - {} - ] - ] - }, - "is_element_enabled": { - "enabled.py": [ - "fccff383a55a7929179810216407acbdea0a079c", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "5dd7d582bd3d80a3d3affc4052bc933d75bcbca6", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "is_element_selected": { - "selected.py": [ - "1fb5b9ce86b521069f638956272e3101ea62cc5c", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "96da2c08bd7e5465ed12eb49cede25d70a6fbef5", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "maximize_window": { - "maximize.py": [ - "e233e45a10d7136929380e2a80f5d6fdd0c32a9e", - [ - null, - { - "timeout": "long" - } - ] - ], - "stress.py": [ - "4527c64a28844b009f33b8051194a6f624899ba5", - [ - null, - { - "timeout": "long" - } - ] - ], - "user_prompts.py": [ - "032edc893a53a05dd0272cc081265bde6f0b5d53", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "minimize_window": { - "minimize.py": [ - "616b250c705a523f049c7c008c1c3b5c5dd9b095", - [ - null, - { - "timeout": "long" - } - ] - ], - "stress.py": [ - "8990f12669d70aa9693d798c6d75105c6075c3d6", - [ - null, - { - "timeout": "long" - } - ] - ], - "user_prompts.py": [ - "19059b3c395ecd22690d999f60838257cbe93449", - [ - null, - { - "timeout": "long" - } - ] - ] - }, - "navigate_to": { - "file.py": [ - "5dae5f5c4d0edfed3113d5d50511b52dfbd111c5", - [ - null, - {} - ] - ], - "navigate.py": [ - "d61377af275902c48083d3d84b35c3bba30bc34e", - [ - null, - {} - ] - ], - "user_prompts.py": [ - "682bc40f4fe9d4b530b406a74b1451bbf88a5d75", - [ - null, - { - "timeout": "long" - } + "classic": { + "accept_alert": { + "accept.py": [ + "b83477e5ca7247913e33abda0315a66ee0c0b3ff", + [ + null, + {} + ] ] - ] - }, - "new_session": { - "create_alwaysMatch.py": [ - "a4cc9efc02e2a9c61fb8a79eecd5dcff49ca21a6", - [ - null, - { - "timeout": "long" - } + }, + "add_cookie": { + "add.py": [ + "3a19432fc6a243544bcd6b8d9b13ffc01e185eaf", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "f58aacd02a71d73112fcb6140c6b766919f9b85f", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "create_firstMatch.py": [ - "ec671530f79692c04135ec441426f0044a72e8bc", - [ - null, - { - "timeout": "long" - } + }, + "back": { + "back.py": [ + "62434323e0ad5339a861d0752d29f7d1f95c81cc", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "9d04f0f4ab12d98f0313639013fce4f26869a753", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "default_values.py": [ - "abd4a5a64c510ee90ef9f52660581a097873e96c", - [ - null, - { - "timeout": "long" - } + }, + "close_window": { + "close.py": [ + "7b382fa9bbcb297081027391e9ac052840be48f7", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "c0f9cc7610c21ea97064392eb2e09fce6f853bbc", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "invalid_capabilities.py": [ - "afdcea0daf706ca32a875db1eb367db0bd2046a7", - [ - null, - {} + }, + "delete_all_cookies": { + "delete.py": [ + "86d66561b00c27100e3b205e6089074f50098d87", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "dca4f3c8bf6473e7fb767519d7f4a9417503f044", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "merge.py": [ - "857d289fcaf054492e17ba730c6f530d55fe2640", - [ - null, - { - "timeout": "long" - } + }, + "delete_cookie": { + "delete.py": [ + "4b37c0453b990483a51c62a82a6ed44667ba9edf", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "1ed7db6e8e320575ffa99ec2f7b7cf2cfeb0ee6a", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "page_load_strategy.py": [ - "69288ef43335605e4c9d21cfa56bd2806f6e92b0", - [ - null, - {} + }, + "delete_session": { + "delete.py": [ + "a3032cc13475bf2980b360d9d140e2d2f58a9034", + [ + null, + {} + ] ] - ], - "platform_name.py": [ - "54fe4743bed44e75d6771ede5d4b7bf2f267bb95", - [ - null, - {} + }, + "dismiss_alert": { + "dismiss.py": [ + "a28dec768750fef214027534a8e6f18cbc7034c8", + [ + null, + {} + ] ] - ], - "response.py": [ - "43a8d57931143f9cf2b5cb0946f982b003afd85c", - [ - null, - {} + }, + "element_clear": { + "clear.py": [ + "9b0d7f2133f7686603449897c659c7e4220ec746", + [ + null, + { + "timeout": "long" + } + ] + ], + "user_prompts.py": [ + "7a8564a684a7edc5d1af0812b3353f2f5ccba629", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "timeouts.py": [ - "4f2652bba86ce67eb6f6e0c42ee4d2e2685f113e", - [ - null, - {} + }, + "element_click": { + "bubbling.py": [ + "7620ec3224fc228e57fe42614d978bbb48b0a97a", + [ + null, + {} + ] + ], + "center_point.py": [ + "eb5cc19f14f80b586a731574c1da7963364422d7", + [ + null, + {} + ] + ], + "click.py": [ + "3c3f7d70e6c6b23932e7452f73e160a2d213a5ba", + [ + null, + {} + ] + ], + "events.py": [ + "30f2dfa0a4a9b5f643832d751f0b35ecfff89fc2", + [ + null, + {} + ] + ], + "file_upload.py": [ + "73832d0f85ae683ee2d1f54e9c0b7e3e432e9afd", + [ + null, + {} + ] + ], + "interactability.py": [ + "d55860c8746f33ba86468fbfc9952363f01e7110", + [ + null, + {} + ] + ], + "navigate.py": [ + "4d1c48235ca176554375ebd26fb4d96aabad4d4d", + [ + null, + {} + ] + ], + "scroll_into_view.py": [ + "c2dc6485286efc1f65679772d515c31c0d584686", + [ + null, + {} + ] + ], + "select.py": [ + "62d40755b59bc39c8dc4650a03c7ad7127c31013", + [ + null, + {} + ] + ], + "shadow_dom.py": [ + "18768a60b292816a904fdfa4d2805755c5f98034", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "140aceb3cedfe84ec8f9a3ac0285497b6e670285", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "websocket_url.py": [ - "452decc90aa18420459d72886a85d89918a0fb38", - [ - null, - {} + }, + "element_send_keys": { + "content_editable.py": [ + "9db19d5b8a2da810b603b369cf1981e036790177", + [ + null, + {} + ] + ], + "events.py": [ + "4be1432bf3c2e02c8ea8a9f7bb034f9739ed0de6", + [ + null, + {} + ] + ], + "file_upload.py": [ + "f62a633c202d6fca8d5062ae6b15e2df8b20783c", + [ + null, + {} + ] + ], + "form_controls.py": [ + "364d4c28fae7807f109cdcdc32aead43d985a1fe", + [ + null, + {} + ] + ], + "interactability.py": [ + "273843fb7b46a31aadf6387ad4815b58a251b4ea", + [ + null, + {} + ] + ], + "scroll_into_view.py": [ + "7ccaeaf8142011ccbe7830876147d73853d0b07a", + [ + null, + {} + ] + ], + "send_keys.py": [ + "281c7ad719ddd05dac2ab7c6de343e9bebde4a5b", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "c1046840fa4ef24a5e063d09aee8c58803e835f7", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "new_window": { - "new.py": [ - "fd0a1ffceb81de4ef944943a953ee1a3108335e7", - [ - null, - {} + }, + "execute_async_script": { + "arguments.py": [ + "ead6e0c186ea40771643aea56ccc7180e6cc28d7", + [ + null, + {} + ] + ], + "collections.py": [ + "5dfbf2059470a2f17604a0a3d9bf47f905bca82e", + [ + null, + {} + ] + ], + "cyclic.py": [ + "ff536f3477c497dce59d60b26834ef986e971c2b", + [ + null, + {} + ] + ], + "execute_async.py": [ + "42cf4aacee8342939c515b5e56a40ef15a1cacfb", + [ + null, + {} + ] + ], + "node.py": [ + "53abda4b300597ade2f5b8d38260caad9cb17f31", + [ + null, + {} + ] + ], + "objects.py": [ + "edcf06505aac243ac54ecf7195887fed387c892f", + [ + null, + {} + ] + ], + "promise.py": [ + "d726d0d71283033086b1ca8851b444968654876b", + [ + null, + {} + ] + ], + "properties.py": [ + "b9592e7edd40a5d4225fc0fc7d2c6bbade01307e", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "e39574fd4ac1b734006614c4ab6caf0a9542676b", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "new_tab.py": [ - "f6cacf3c3586bc2962e67be4cacf3fbbc838216d", - [ - null, - {} + }, + "execute_script": { + "arguments.py": [ + "b8657ce0efae2a266158bb8c2846864cd63c1d5e", + [ + null, + {} + ] + ], + "collections.py": [ + "ec5d5ee1e32beb19b799b633534ec31fcfb0c7ad", + [ + null, + {} + ] + ], + "cyclic.py": [ + "29db2f27e669a9e7b0c2068c09b6d9bb3b5e1f07", + [ + null, + {} + ] + ], + "execute.py": [ + "fbccc98633867b9ab137b26f0f8818b98a29c81f", + [ + null, + {} + ] + ], + "json_serialize_windowproxy.py": [ + "8e76feda23809bf65a77c6bcd3994209aaba40e0", + [ + null, + {} + ] + ], + "node.py": [ + "caf85988f15413eca765c5d5cb019b06777d3b9d", + [ + null, + {} + ] + ], + "objects.py": [ + "e254fe275e26f1adda0cf6f4898616703302e2da", + [ + null, + {} + ] + ], + "promise.py": [ + "c206674baefc75d23443fb5b7999ef465b09a3e2", + [ + null, + {} + ] + ], + "properties.py": [ + "c3b01dea29b5a160cda24ea82d0135cb1761032b", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "48d735ea754c0f74726d5a89f43eabb245b8bc5a", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "new_window.py": [ - "a3fce364ccc8ac8e7de942d4718a6eda151464f9", - [ - null, - {} + }, + "find_element": { + "find.py": [ + "50de92554bcb29659d5a5b842ef12a485a0cde3a", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "ada8e8ebee33a6ce9fcfb4871093ce1eef1d1dae", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "user_prompts.py": [ - "0d841468ee48995a4f1b2c71ec7f69adcb37baae", - [ - null, - { - "timeout": "long" - } + }, + "find_element_from_element": { + "find.py": [ + "102704cd8e318c69f51a762d3eda2b125eed23ae", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "0537a786189c41420f50e6c3b747482c331fdaa3", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "perform_actions": { - "key.py": [ - "6730b1c18bf761473be2cf1a54eed5f35b0a64e5", - [ - null, - {} + }, + "find_element_from_shadow_root": { + "find.py": [ + "62a5bc60f543aa06aff658056c23117cb2d9cf85", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "3e3381e7853b25577a0f465542c848c9429e3099", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "key_events.py": [ - "472fb54c28509cb936b98ee5c299288776a182e1", - [ - null, - { - "timeout": "long" - } + }, + "find_elements": { + "find.py": [ + "0d9ce21186c9a6963018d4dc819038749758ff47", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "f9a45e527515fc7448162a86dca69d3f95e76491", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "key_modifiers.py": [ - "652106f46c2d3910b81afa6a795ae01a96524077", - [ - null, - {} + }, + "find_elements_from_element": { + "find.py": [ + "fc898bc95afecd71535bca0f23d375a1c3738299", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "467bec09a1bd61346b3df2fa5b0b8c16e02fe975", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "key_shortcuts.py": [ - "46bc3c43390c5b178ff5a03b5f2cb2f8adb113a0", - [ - null, - {} + }, + "find_elements_from_shadow_root": { + "find.py": [ + "db739fd440fc3e7724f740fa5bd04772cc0d9488", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "45986ad6dab9322ca7126050d623904d2542e338", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "key_special_keys.py": [ - "003bba4294105eb2757bfbe9e4f808b4ea13047c", - [ - null, - {} + }, + "forward": { + "forward.py": [ + "f27be403f9e95bd2359d5ae6224f6ae2708ff7c8", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "3eeaf6e71cdb7311614b271257f4cd6d19a2e619", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "none.py": [ - "4fadec40a45cd685ac856551f557b9178abb6040", - [ - null, - {} + }, + "fullscreen_window": { + "fullscreen.py": [ + "94f25ed9bdbd4a9cf619982f9b02582b5c137335", + [ + null, + {} + ] + ], + "stress.py": [ + "b907a31f17e0167ff27a4e8ceb2ad44cd372b537", + [ + null, + { + "timeout": "long" + } + ] + ], + "user_prompts.py": [ + "106bc457f0c18769afe1d9f76c39937d17783666", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "pointer_contextmenu.py": [ - "2e06e8ca59fea429ad00093100c2fb1094263032", - [ - null, - {} + }, + "get_active_element": { + "get.py": [ + "1d2960c88c5f587bf2dea86f5b97ad1e5fae9b5c", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "1ff77697b707886bbfeaee8acf08bdb8aba2de38", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "pointer_dblclick.py": [ - "5be635a4d5604e33bf61c41b2190e620309179b8", - [ - null, - {} + }, + "get_alert_text": { + "get.py": [ + "7ee7ff1808f928e67ab0e3423c13a885e28db08f", + [ + null, + {} + ] ] - ], - "pointer_modifier_click.py": [ - "ffba6fc306b6913375fe0c229363ef08444252cd", - [ - null, - {} + }, + "get_computed_label": { + "get.py": [ + "0dc00a471a9a37509e4ed7a448c1213bb978eeda", + [ + null, + {} + ] ] - ], - "pointer_mouse.py": [ - "14da9871f4047a6dd57e0f394d0870cabb4b3e56", - [ - null, - { - "timeout": "long" - } + }, + "get_computed_role": { + "get.py": [ + "51b6a8b3b6d1e302be8885e4b2976cc0c02ff4bd", + [ + null, + {} + ] ] - ], - "pointer_origin.py": [ - "8d4dc9045e688eb3acad3ca6e5119f59603d117b", - [ - null, - {} + }, + "get_current_url": { + "file.py": [ + "ef6ae2383550330bfd41c10fffb41b4545d7007d", + [ + null, + {} + ] + ], + "get.py": [ + "baeab0960b6860579a7e648c650dffc4c548fa67", + [ + null, + {} + ] + ], + "iframe.py": [ + "80a960ce8a15e831941b4bf97ab6375b64b70ea7", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "d657c188241d8e0b53153d6b0e64fd386642847a", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "pointer_pause_dblclick.py": [ - "d46178a1d650828ef84ccb02f08a12b292f4c3eb", - [ - null, - {} + }, + "get_element_attribute": { + "get.py": [ + "375f25032c06a10fecf78a884647056fbd826b9d", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "009cb1e5fa1e1bdf4a9b433fe943f6ee4a97506d", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "pointer_pen.py": [ - "29d40276b25b11d52099af6a0dbe630d99625ef2", - [ - null, - { - "timeout": "long" - } + }, + "get_element_css_value": { + "get.py": [ + "6f0a8a56395788be0f9152028f569f133fcd79ed", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "b1f9a3fb0a00f17c9c5bd5b590c8628d7888ea2e", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "pointer_touch.py": [ - "03f32af2b48cc03c90f86317ef075ec6b292cc02", - [ - null, - { - "timeout": "long" - } + }, + "get_element_property": { + "get.py": [ + "bb63481dfcae75ee6f80503413c552db78d3c8ac", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "e5e76947863e61ca082a66367e3ea876b8ebec73", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "pointer_tripleclick.py": [ - "fff70b8fa62d82c532f4e665d82bbd8b09f5fcb9", - [ - null, - {} + }, + "get_element_rect": { + "get.py": [ + "942f119f43c9bb30eaefd52f3c793d7e47cfbfc4", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "20131603381bc574e44251a6909e389457dd0059", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "sequence.py": [ - "3536abeb12bcf667e4b6eab2cb723baa10c9ffa7", - [ - null, - { - "timeout": "long" - } + }, + "get_element_shadow_root": { + "get.py": [ + "d9adde0b9e3aee402aa2e03db9d02259d968e81b", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "5b991bac26b6247b743f81ccf82faaa94dcb71a1", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "user_prompts.py": [ - "6bbd22a2a29a574dbacd207e9fc43810a68ebff6", - [ - null, - { - "timeout": "long" - } + }, + "get_element_tag_name": { + "get.py": [ + "3bb03d79886d88c6ba045d9f0bedae7414412025", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "89697d0ad6a20503d6ec906862d58e674ed90839", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "validity.py": [ - "9c056b197d25808864e36dd7a58040a0dbff4abc", - [ - null, - {} + }, + "get_element_text": { + "get.py": [ + "e8d559cf661acee18a39cbc4b6bb03289385ca08", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "9f0bb386cdf549ae1edbb7843fe893bd74700212", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "wheel.py": [ - "59da29fe8922dd08e2c4ed3c52fec49aa8a202d6", - [ - null, - {} + }, + "get_named_cookie": { + "get.py": [ + "d1e83b6a81521728556b20a875164a21924c8b5e", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "3ef52a58a419352ab01a7bd016e9f3adcf1ac321", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "permissions": { - "set.py": [ - "9b71c4486c37a77a78c701c67caee4129c792b5b", - [ - null, - {} + }, + "get_page_source": { + "source.py": [ + "cc4e208835c8620ac5d665db69babb5b2adef1dc", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "13cb31595e6165ffb6e3491661d630921ade5699", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "print": { - "background.py": [ - "22b392db2e3c51dbf68fe616bb3340535adf53f8", - [ - null, - {} + }, + "get_timeouts": { + "get.py": [ + "aa02c0990e1a110b5d5e7e0f479ade9cc909b956", + [ + null, + {} + ] ] - ], - "orientation.py": [ - "c2afacf94fb45adb7d163fd45974416b6a9fcc25", - [ - null, - {} + }, + "get_title": { + "get.py": [ + "e696ec340339e64d68956c3ea3bcfa5e8fceb774", + [ + null, + {} + ] + ], + "iframe.py": [ + "9c5ab0b595d33ce38b419da1565445c9d7e221e0", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "0fd51e46f32ab5c5a6a14392afe08a0cf725115a", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "printcmd.py": [ - "f3fe50bd92d6a7dc4f8bf0c2290f2ecebc0dd1d7", - [ - null, - { - "timeout": "long" - } + }, + "get_window_handle": { + "get.py": [ + "68441da5ef8460bb472beecd2e31a6cc34f0faa3", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "0bd660cfa1fb31ba4fc93bb0ecb239fc4a6c136c", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "user_prompts.py": [ - "fb13ec2d65a25038641a42a67e48237fdef60c10", - [ - null, - { - "timeout": "long" - } + }, + "get_window_handles": { + "get.py": [ + "8f4361e30c9c42e5c064b03e47f5471611e4406a", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "217e9849b4417d7124e203f937270a9e4823666a", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "refresh": { - "refresh.py": [ - "b3647130c77ec6c0c84514ff9f599b9a872303e7", - [ - null, - {} + }, + "get_window_rect": { + "get.py": [ + "f7592a30e067030f3c6433bc2419db06c0db8da8", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "37c8da6bd3838422441fc089d8191930dd2b3da6", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "user_prompts.py": [ - "7e944b53b0964e68b897e6315faa0cfa65802143", - [ - null, - { - "timeout": "long" - } + }, + "interface": { + "interface.py": [ + "6a7afcd26358aaad3779a912fd4bc00a66ca9571", + [ + null, + {} + ] ] - ] - }, - "release_actions": { - "release.py": [ - "5df1ff4be902874529fcc5573bcf4df2755b9ae7", - [ - null, - {} + }, + "is_element_enabled": { + "enabled.py": [ + "fccff383a55a7929179810216407acbdea0a079c", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "5dd7d582bd3d80a3d3affc4052bc933d75bcbca6", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "sequence.py": [ - "24ca16c86043ac091b5173fcc3e8571a50107eca", - [ - null, - { - "timeout": "long" - } + }, + "is_element_selected": { + "selected.py": [ + "1fb5b9ce86b521069f638956272e3101ea62cc5c", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "96da2c08bd7e5465ed12eb49cede25d70a6fbef5", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "send_alert_text": { - "send.py": [ - "df218c803bb0a4f558c8bc1547dc3982af01216b", - [ - null, - {} + }, + "maximize_window": { + "maximize.py": [ + "e233e45a10d7136929380e2a80f5d6fdd0c32a9e", + [ + null, + { + "timeout": "long" + } + ] + ], + "stress.py": [ + "4527c64a28844b009f33b8051194a6f624899ba5", + [ + null, + { + "timeout": "long" + } + ] + ], + "user_prompts.py": [ + "032edc893a53a05dd0272cc081265bde6f0b5d53", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "set_timeouts": { - "set.py": [ - "6620f4df2a8999df28636de7a2121aa691d9d71b", - [ - null, - {} + }, + "minimize_window": { + "minimize.py": [ + "616b250c705a523f049c7c008c1c3b5c5dd9b095", + [ + null, + { + "timeout": "long" + } + ] + ], + "stress.py": [ + "8990f12669d70aa9693d798c6d75105c6075c3d6", + [ + null, + { + "timeout": "long" + } + ] + ], + "user_prompts.py": [ + "19059b3c395ecd22690d999f60838257cbe93449", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "user_prompts.py": [ - "a98d87e9b2e2ca252a3ed7cf215a20bd1c299818", - [ - null, - { - "timeout": "long" - } + }, + "navigate_to": { + "file.py": [ + "5dae5f5c4d0edfed3113d5d50511b52dfbd111c5", + [ + null, + {} + ] + ], + "navigate.py": [ + "d61377af275902c48083d3d84b35c3bba30bc34e", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "682bc40f4fe9d4b530b406a74b1451bbf88a5d75", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "set_window_rect": { - "set.py": [ - "23382288a3d87b6788c2809fd5335bffc2260e70", - [ - null, - { - "timeout": "long" - } + }, + "new_session": { + "create_alwaysMatch.py": [ + "64fd0a7425657fa0596298ec281ea4a1bbe08a4f", + [ + null, + { + "timeout": "long" + } + ] + ], + "create_firstMatch.py": [ + "d4523f4330c76e46fd9441901dc17314aec85c66", + [ + null, + { + "timeout": "long" + } + ] + ], + "default_values.py": [ + "abd4a5a64c510ee90ef9f52660581a097873e96c", + [ + null, + { + "timeout": "long" + } + ] + ], + "invalid_capabilities.py": [ + "be397edcf0f263f381d4901e4064c18d65eae29d", + [ + null, + {} + ] + ], + "merge.py": [ + "857d289fcaf054492e17ba730c6f530d55fe2640", + [ + null, + { + "timeout": "long" + } + ] + ], + "page_load_strategy.py": [ + "69288ef43335605e4c9d21cfa56bd2806f6e92b0", + [ + null, + {} + ] + ], + "platform_name.py": [ + "54fe4743bed44e75d6771ede5d4b7bf2f267bb95", + [ + null, + {} + ] + ], + "response.py": [ + "43a8d57931143f9cf2b5cb0946f982b003afd85c", + [ + null, + {} + ] + ], + "timeouts.py": [ + "4f2652bba86ce67eb6f6e0c42ee4d2e2685f113e", + [ + null, + {} + ] + ], + "websocket_url.py": [ + "452decc90aa18420459d72886a85d89918a0fb38", + [ + null, + {} + ] ] - ], - "user_prompts.py": [ - "908a9d920f36d0b8664c6b906bc71b0aefba96e6", - [ - null, - { - "timeout": "long" - } + }, + "new_window": { + "new.py": [ + "fd0a1ffceb81de4ef944943a953ee1a3108335e7", + [ + null, + {} + ] + ], + "new_tab.py": [ + "f6cacf3c3586bc2962e67be4cacf3fbbc838216d", + [ + null, + {} + ] + ], + "new_window.py": [ + "a3fce364ccc8ac8e7de942d4718a6eda151464f9", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "0d841468ee48995a4f1b2c71ec7f69adcb37baae", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "status": { - "status.py": [ - "8c7ae22a67b5988cd94daa979a5ade8d5377a684", - [ - null, - {} + }, + "perform_actions": { + "key.py": [ + "6c34452082aebbfe2f83a879bea44a75ed2bea1f", + [ + null, + {} + ] + ], + "key_events.py": [ + "a1cd9cea8e438407e5c050bc234e1d02592360f9", + [ + null, + { + "timeout": "long" + } + ] + ], + "key_modifiers.py": [ + "652106f46c2d3910b81afa6a795ae01a96524077", + [ + null, + {} + ] + ], + "key_shortcuts.py": [ + "a5e151569671e03b673cc97bbd664375bc00c9c5", + [ + null, + {} + ] + ], + "key_special_keys.py": [ + "c55f3a113ebf76428bfaab208634a029c87b28e0", + [ + null, + {} + ] + ], + "none.py": [ + "4fadec40a45cd685ac856551f557b9178abb6040", + [ + null, + {} + ] + ], + "pointer_contextmenu.py": [ + "4a48ea0b23750eb7796b5a4bd9796dfcc767fe31", + [ + null, + {} + ] + ], + "pointer_dblclick.py": [ + "659e27bd5c8883db62333cb451c8e40ace6701ee", + [ + null, + {} + ] + ], + "pointer_modifier_click.py": [ + "f3e54288474e829bda1c7311dff547e7b4a82f46", + [ + null, + {} + ] + ], + "pointer_mouse.py": [ + "31d08491ccb832e951bcc7598f3795ec4a38a796", + [ + null, + { + "timeout": "long" + } + ] + ], + "pointer_origin.py": [ + "33b8a25959f9df75983acbfa62116230fb9f6c0f", + [ + null, + {} + ] + ], + "pointer_pause_dblclick.py": [ + "209de727a6cbb14a14a3c1abbee4ff78462c4043", + [ + null, + {} + ] + ], + "pointer_pen.py": [ + "e9cd103301ee7ab965098e7ba048917014b057d7", + [ + null, + { + "timeout": "long" + } + ] + ], + "pointer_touch.py": [ + "7f940f6203c16a7f7bc019f3fe06af3da8330f59", + [ + null, + { + "timeout": "long" + } + ] + ], + "pointer_tripleclick.py": [ + "b45709da3cb06bb037ecb8b18a92ce325a5380dd", + [ + null, + {} + ] + ], + "sequence.py": [ + "f6c12220c450146a7a491b0fa9172264114debdc", + [ + null, + { + "timeout": "long" + } + ] + ], + "user_prompts.py": [ + "820edbe32cbe0ade5fd63966002003e841f67dd4", + [ + null, + { + "timeout": "long" + } + ] + ], + "validity.py": [ + "9c056b197d25808864e36dd7a58040a0dbff4abc", + [ + null, + {} + ] + ], + "wheel.py": [ + "7ee0ae79f773ecf3b5fd0ef1a23ebea51ea0900e", + [ + null, + {} + ] ] - ] - }, - "switch_to_frame": { - "cross_origin.py": [ - "633eba3f4248575f1c06deb1cab536a8c5414ac5", - [ - null, - {} + }, + "permissions": { + "set.py": [ + "9b71c4486c37a77a78c701c67caee4129c792b5b", + [ + null, + {} + ] ] - ], - "switch.py": [ - "b9cccb3ecc099232682955fd0e2fc54362895bc0", - [ - null, - {} + }, + "print": { + "background.py": [ + "22b392db2e3c51dbf68fe616bb3340535adf53f8", + [ + null, + {} + ] + ], + "orientation.py": [ + "c2afacf94fb45adb7d163fd45974416b6a9fcc25", + [ + null, + {} + ] + ], + "printcmd.py": [ + "f3fe50bd92d6a7dc4f8bf0c2290f2ecebc0dd1d7", + [ + null, + { + "timeout": "long" + } + ] + ], + "user_prompts.py": [ + "fb13ec2d65a25038641a42a67e48237fdef60c10", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "switch_number.py": [ - "c8858e77ff10478e982d911f030a615470987df6", - [ - null, - {} + }, + "refresh": { + "refresh.py": [ + "b3647130c77ec6c0c84514ff9f599b9a872303e7", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "7e944b53b0964e68b897e6315faa0cfa65802143", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "switch_webelement.py": [ - "ceadccd812101584b4a8a9ab343048344339cefa", - [ - null, - {} + }, + "release_actions": { + "release.py": [ + "5df1ff4be902874529fcc5573bcf4df2755b9ae7", + [ + null, + {} + ] + ], + "sequence.py": [ + "78912d8b38904ba61a8450995b64358f8105e151", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "switch_to_parent_frame": { - "switch.py": [ - "9c6db8d2cd61d6e92f45ac1843dbe0f43f69af76", - [ - null, - {} + }, + "send_alert_text": { + "send.py": [ + "df218c803bb0a4f558c8bc1547dc3982af01216b", + [ + null, + {} + ] ] - ] - }, - "switch_to_window": { - "alerts.py": [ - "2fc390e8641b980bc1c317db93f9f1166bcb8284", - [ - null, - {} + }, + "set_timeouts": { + "set.py": [ + "6620f4df2a8999df28636de7a2121aa691d9d71b", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "a98d87e9b2e2ca252a3ed7cf215a20bd1c299818", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "switch.py": [ - "28d432a8b5b42623d49c4fbe0d1da0539c36e71c", - [ - null, - {} + }, + "set_window_rect": { + "set.py": [ + "23382288a3d87b6788c2809fd5335bffc2260e70", + [ + null, + { + "timeout": "long" + } + ] + ], + "user_prompts.py": [ + "908a9d920f36d0b8664c6b906bc71b0aefba96e6", + [ + null, + { + "timeout": "long" + } + ] ] - ] - }, - "take_element_screenshot": { - "iframe.py": [ - "e7f1b0c8053db0fedbb37c0a1b528a259591813f", - [ - null, - {} + }, + "status": { + "status.py": [ + "8c7ae22a67b5988cd94daa979a5ade8d5377a684", + [ + null, + {} + ] ] - ], - "screenshot.py": [ - "ea4cc290db4cdd603d9dc20bbc90914c4e241cb5", - [ - null, - {} + }, + "switch_to_frame": { + "cross_origin.py": [ + "633eba3f4248575f1c06deb1cab536a8c5414ac5", + [ + null, + {} + ] + ], + "switch.py": [ + "b9cccb3ecc099232682955fd0e2fc54362895bc0", + [ + null, + {} + ] + ], + "switch_number.py": [ + "c8858e77ff10478e982d911f030a615470987df6", + [ + null, + {} + ] + ], + "switch_webelement.py": [ + "ceadccd812101584b4a8a9ab343048344339cefa", + [ + null, + {} + ] ] - ], - "user_prompts.py": [ - "39fefe9325a9bf2880d333d48a58337edb3508cd", - [ - null, - { - "timeout": "long" - } + }, + "switch_to_parent_frame": { + "switch.py": [ + "9c6db8d2cd61d6e92f45ac1843dbe0f43f69af76", + [ + null, + {} + ] ] - ] - }, - "take_screenshot": { - "iframe.py": [ - "258e764407a7e936455c3c00fdfafb063bf231b8", - [ - null, - {} + }, + "switch_to_window": { + "alerts.py": [ + "2fc390e8641b980bc1c317db93f9f1166bcb8284", + [ + null, + {} + ] + ], + "switch.py": [ + "28d432a8b5b42623d49c4fbe0d1da0539c36e71c", + [ + null, + {} + ] ] - ], - "screenshot.py": [ - "9e71a633c708b628b40fe8e3be143d36c821a8f9", - [ - null, - {} + }, + "take_element_screenshot": { + "iframe.py": [ + "e7f1b0c8053db0fedbb37c0a1b528a259591813f", + [ + null, + {} + ] + ], + "screenshot.py": [ + "ea4cc290db4cdd603d9dc20bbc90914c4e241cb5", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "39fefe9325a9bf2880d333d48a58337edb3508cd", + [ + null, + { + "timeout": "long" + } + ] ] - ], - "user_prompts.py": [ - "7d57f8f2716b393696fb3ce45ded196d83a0bf68", - [ - null, - { - "timeout": "long" - } + }, + "take_screenshot": { + "iframe.py": [ + "258e764407a7e936455c3c00fdfafb063bf231b8", + [ + null, + {} + ] + ], + "screenshot.py": [ + "9e71a633c708b628b40fe8e3be143d36c821a8f9", + [ + null, + {} + ] + ], + "user_prompts.py": [ + "7d57f8f2716b393696fb3ce45ded196d83a0bf68", + [ + null, + { + "timeout": "long" + } + ] ] - ] + } } } } diff --git a/tests/wpt/metadata/css/CSS2/normal-flow/min-width-applies-to-009.xht.ini b/tests/wpt/metadata/css/CSS2/normal-flow/min-width-applies-to-009.xht.ini new file mode 100644 index 00000000000..304306de9b6 --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/normal-flow/min-width-applies-to-009.xht.ini @@ -0,0 +1,2 @@ +[min-width-applies-to-009.xht] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/CSS2/text/text-align-white-space-003.xht.ini b/tests/wpt/metadata/css/CSS2/text/text-align-white-space-003.xht.ini deleted file mode 100644 index c7b62ff5a8e..00000000000 --- a/tests/wpt/metadata/css/CSS2/text/text-align-white-space-003.xht.ini +++ /dev/null @@ -1,3 +0,0 @@ -[text-align-white-space-003.xht] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/background-image-cors-no-reload.html.ini b/tests/wpt/metadata/css/css-backgrounds/background-image-cors-no-reload.html.ini new file mode 100644 index 00000000000..6c63e3e5552 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/background-image-cors-no-reload.html.ini @@ -0,0 +1,3 @@ +[background-image-cors-no-reload.html] + [CORS image from variable doesn't cause re-downloads] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/background-size-016.html.ini b/tests/wpt/metadata/css/css-backgrounds/background-size-016.html.ini new file mode 100644 index 00000000000..3f4ad46ce6a --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/background-size-016.html.ini @@ -0,0 +1,2 @@ +[background-size-016.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow-border-radius-001.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow-border-radius-001.html.ini new file mode 100644 index 00000000000..c4286b08e31 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow-border-radius-001.html.ini @@ -0,0 +1,2 @@ +[box-shadow-border-radius-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow-inset-without-border-radius.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow-inset-without-border-radius.html.ini new file mode 100644 index 00000000000..0e7d21410ad --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow-inset-without-border-radius.html.ini @@ -0,0 +1,2 @@ +[box-shadow-inset-without-border-radius.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html.ini b/tests/wpt/metadata/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html.ini new file mode 100644 index 00000000000..7e3b6770303 --- /dev/null +++ b/tests/wpt/metadata/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html.ini @@ -0,0 +1,2 @@ +[box-shadow-outset-without-border-radius-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-color/oklab-009.html.ini b/tests/wpt/metadata/css/css-color/oklab-009.html.ini new file mode 100644 index 00000000000..1c1ba09c195 --- /dev/null +++ b/tests/wpt/metadata/css/css-color/oklab-009.html.ini @@ -0,0 +1,2 @@ +[oklab-009.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-color/oklch-011.html.ini b/tests/wpt/metadata/css/css-color/oklch-011.html.ini new file mode 100644 index 00000000000..fac99a3e651 --- /dev/null +++ b/tests/wpt/metadata/css/css-color/oklch-011.html.ini @@ -0,0 +1,2 @@ +[oklch-011.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-color/parsing/color-valid-color-mix-function.html.ini b/tests/wpt/metadata/css/css-color/parsing/color-valid-color-mix-function.html.ini index 5cceaf5ee0a..5fbefaad28c 100644 --- a/tests/wpt/metadata/css/css-color/parsing/color-valid-color-mix-function.html.ini +++ b/tests/wpt/metadata/css/css-color/parsing/color-valid-color-mix-function.html.ini @@ -1,5 +1,4 @@ [color-valid-color-mix-function.html] - expected: ERROR [e.style['color'\] = "color-mix(in srgb, red, blue)" should set the property value] expected: FAIL diff --git a/tests/wpt/metadata/css/css-conditional/at-supports-047.html.ini b/tests/wpt/metadata/css/css-conditional/at-supports-047.html.ini deleted file mode 100644 index 8a8194e61d8..00000000000 --- a/tests/wpt/metadata/css/css-conditional/at-supports-047.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[at-supports-047.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/css-conditional/at-supports-selector-placeholder.html.ini b/tests/wpt/metadata/css/css-conditional/at-supports-selector-placeholder.html.ini new file mode 100644 index 00000000000..4103e1ba297 --- /dev/null +++ b/tests/wpt/metadata/css/css-conditional/at-supports-selector-placeholder.html.ini @@ -0,0 +1,2 @@ +[at-supports-selector-placeholder.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html.ini new file mode 100644 index 00000000000..aceb25fcfc0 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html.ini new file mode 100644 index 00000000000..3b87862b88c --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-items.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-items.html.ini new file mode 100644 index 00000000000..183f969854f --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html.ini new file mode 100644 index 00000000000..c44c1278202 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-lr-table-item.html] + [#target > * 1] + expected: FAIL + + [#target > * 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html.ini new file mode 100644 index 00000000000..3f5445372f3 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html.ini new file mode 100644 index 00000000000..67c3195320e --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-items.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-items.html.ini new file mode 100644 index 00000000000..248c349127a --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html.ini new file mode 100644 index 00000000000..073fa50c72c --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-column-vert-rl-table-item.html] + [#target > * 1] + expected: FAIL + + [#target > * 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html.ini new file mode 100644 index 00000000000..a141785e719 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-lr-column-horz-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html.ini new file mode 100644 index 00000000000..7c87b06fa54 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-lr-column-horz-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html.ini new file mode 100644 index 00000000000..4ba9674c941 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-lr-column-horz-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html.ini new file mode 100644 index 00000000000..50dd662bc0f --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html.ini @@ -0,0 +1,3 @@ +[align-items-baseline-vert-lr-column-horz-table-item.html] + [#target > div 1] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html.ini new file mode 100644 index 00000000000..1b52f4b7f52 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-rl-column-horz-flexbox-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html.ini new file mode 100644 index 00000000000..9f462a05094 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-rl-column-horz-grid-item.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html.ini new file mode 100644 index 00000000000..21fc2fcfa98 --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html.ini @@ -0,0 +1,6 @@ +[align-items-baseline-vert-rl-column-horz-items.html] + [#target > div 1] + expected: FAIL + + [#target > div 2] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html.ini b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html.ini new file mode 100644 index 00000000000..7aff68f608d --- /dev/null +++ b/tests/wpt/metadata/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html.ini @@ -0,0 +1,3 @@ +[align-items-baseline-vert-rl-column-horz-table-item.html] + [#target > div 1] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering-3.html.ini b/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering-3.html.ini new file mode 100644 index 00000000000..76678b94be2 --- /dev/null +++ b/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering-3.html.ini @@ -0,0 +1,2 @@ +[image-set-negative-resolution-rendering-3.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/image-set/image-set-parsing.html.ini b/tests/wpt/metadata/css/css-images/image-set/image-set-parsing.html.ini index 80f8e11c556..d79057e5b32 100644 --- a/tests/wpt/metadata/css/css-images/image-set/image-set-parsing.html.ini +++ b/tests/wpt/metadata/css/css-images/image-set/image-set-parsing.html.ini @@ -307,3 +307,15 @@ [e.style['background-image'\] = "-webkit-image-set(url(\\"example.png\\") -113dpcm)" should set the property value] expected: FAIL + + [e.style['background-image'\] = "image-set(url(\\"example.png\\") calc(-1 * 1x))" should set the property value] + expected: FAIL + + [e.style['background-image'\] = "-webkit-image-set(url(\\"example.png\\") calc(-1 * 1x))" should set the property value] + expected: FAIL + + [e.style['background-image'\] = "image-set(url(\\"example.png\\") calc(1x + -1x))" should set the property value] + expected: FAIL + + [e.style['background-image'\] = "-webkit-image-set(url(\\"example.png\\") calc(1x + -1x))" should set the property value] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/image-set/image-set-zero-resolution-rendering-2.html.ini b/tests/wpt/metadata/css/css-images/image-set/image-set-zero-resolution-rendering-2.html.ini new file mode 100644 index 00000000000..778000386d8 --- /dev/null +++ b/tests/wpt/metadata/css/css-images/image-set/image-set-zero-resolution-rendering-2.html.ini @@ -0,0 +1,2 @@ +[image-set-zero-resolution-rendering-2.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-images/image-set/image-set-zero-resolution-rendering.html.ini b/tests/wpt/metadata/css/css-images/image-set/image-set-zero-resolution-rendering.html.ini new file mode 100644 index 00000000000..f2243377a7f --- /dev/null +++ b/tests/wpt/metadata/css/css-images/image-set/image-set-zero-resolution-rendering.html.ini @@ -0,0 +1,2 @@ +[image-set-zero-resolution-rendering.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-position/overlay/overlay-transition-finished.html.ini b/tests/wpt/metadata/css/css-position/overlay/overlay-transition-finished.html.ini new file mode 100644 index 00000000000..998ff04f252 --- /dev/null +++ b/tests/wpt/metadata/css/css-position/overlay/overlay-transition-finished.html.ini @@ -0,0 +1,2 @@ +[overlay-transition-finished.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-position/overlay/overlay-transition-in-rendering.html.ini b/tests/wpt/metadata/css/css-position/overlay/overlay-transition-in-rendering.html.ini new file mode 100644 index 00000000000..c6a2594e7a8 --- /dev/null +++ b/tests/wpt/metadata/css/css-position/overlay/overlay-transition-in-rendering.html.ini @@ -0,0 +1,2 @@ +[overlay-transition-in-rendering.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-position/overlay/overlay-transition-out-rendering.html.ini b/tests/wpt/metadata/css/css-position/overlay/overlay-transition-out-rendering.html.ini new file mode 100644 index 00000000000..eebd31d0478 --- /dev/null +++ b/tests/wpt/metadata/css/css-position/overlay/overlay-transition-out-rendering.html.ini @@ -0,0 +1,2 @@ +[overlay-transition-out-rendering.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-position/overlay/overlay-transition.html.ini b/tests/wpt/metadata/css/css-position/overlay/overlay-transition.html.ini new file mode 100644 index 00000000000..9d4353030d0 --- /dev/null +++ b/tests/wpt/metadata/css/css-position/overlay/overlay-transition.html.ini @@ -0,0 +1,6 @@ +[overlay-transition.html] + [Open the popover to be closed and verify computed overlay for both popovers] + expected: FAIL + + [Transition overlays] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/inheritance.html.ini b/tests/wpt/metadata/css/css-text/inheritance.html.ini index 151ed41303a..415926291db 100644 --- a/tests/wpt/metadata/css/css-text/inheritance.html.ini +++ b/tests/wpt/metadata/css/css-text/inheritance.html.ini @@ -40,3 +40,9 @@ [Property text-wrap inherits] expected: FAIL + + [Property white-space-collapse has initial value collapse] + expected: FAIL + + [Property white-space-collapse inherits] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-001.html.ini b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-001.html.ini new file mode 100644 index 00000000000..e3231d12ba1 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-001.html.ini @@ -0,0 +1,2 @@ +[white-space-pre-wrap-justify-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-002.html.ini b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-002.html.ini new file mode 100644 index 00000000000..06a8420f427 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-002.html.ini @@ -0,0 +1,2 @@ +[white-space-pre-wrap-justify-002.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-003.html.ini b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-003.html.ini new file mode 100644 index 00000000000..dc0e0c3b943 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-003.html.ini @@ -0,0 +1,2 @@ +[white-space-pre-wrap-justify-003.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-004.html.ini b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-004.html.ini new file mode 100644 index 00000000000..c8b58192041 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/white-space-pre-wrap-justify-004.html.ini @@ -0,0 +1,2 @@ +[white-space-pre-wrap-justify-004.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-ui/appearance-cssom-001.html.ini b/tests/wpt/metadata/css/css-ui/appearance-cssom-001.html.ini index 39f7e2be225..4f7cd766dc6 100644 --- a/tests/wpt/metadata/css/css-ui/appearance-cssom-001.html.ini +++ b/tests/wpt/metadata/css/css-ui/appearance-cssom-001.html.ini @@ -2066,3 +2066,21 @@ [appearance: -moz-window-titlebar-maximized (invalid)] expected: FAIL + + [-webkit-appearance: push-button (invalid)] + expected: FAIL + + [-webkit-appearance: slider-horizontal (invalid)] + expected: FAIL + + [-webkit-appearance: square-button (invalid)] + expected: FAIL + + [appearance: push-button (invalid)] + expected: FAIL + + [appearance: slider-horizontal (invalid)] + expected: FAIL + + [appearance: square-button (invalid)] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-values/round-mod-rem-computed.html.ini b/tests/wpt/metadata/css/css-values/round-mod-rem-computed.html.ini index 4acfc2202c3..35b8d3387bc 100644 --- a/tests/wpt/metadata/css/css-values/round-mod-rem-computed.html.ini +++ b/tests/wpt/metadata/css/css-values/round-mod-rem-computed.html.ini @@ -364,3 +364,15 @@ [calc(rem(1px + 0%, 1px + 0%)) should be used-value-equivalent to 0px] expected: FAIL + + [mod(-18px,100% / 10) should be used-value-equivalent to 4.5px] + expected: FAIL + + [mod(-19%,5%) should be used-value-equivalent to 1%] + expected: FAIL + + [calc(mod(3px + 0%, 2px + 0%)) should be used-value-equivalent to 1px] + expected: FAIL + + [calc(rem(3px + 0%, 2px + 0%)) should be used-value-equivalent to 1px] + expected: FAIL diff --git a/tests/wpt/metadata/css/mediaqueries/dynamic-range.html.ini b/tests/wpt/metadata/css/mediaqueries/dynamic-range.html.ini index 41e92d3faac..03bd924871d 100644 --- a/tests/wpt/metadata/css/mediaqueries/dynamic-range.html.ini +++ b/tests/wpt/metadata/css/mediaqueries/dynamic-range.html.ini @@ -70,3 +70,9 @@ [Should be parseable: '(video-dynamic-range: invalid)'] expected: FAIL + + [Should be known: '(dynamic-range)'] + expected: FAIL + + [Should be known: '(video-dynamic-range)'] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/has-style-sharing-001.html.ini b/tests/wpt/metadata/css/selectors/has-style-sharing-001.html.ini new file mode 100644 index 00000000000..ea98bb3ec37 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/has-style-sharing-001.html.ini @@ -0,0 +1,2 @@ +[has-style-sharing-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/has-style-sharing-002.html.ini b/tests/wpt/metadata/css/selectors/has-style-sharing-002.html.ini new file mode 100644 index 00000000000..f94d1e35ecc --- /dev/null +++ b/tests/wpt/metadata/css/selectors/has-style-sharing-002.html.ini @@ -0,0 +1,2 @@ +[has-style-sharing-002.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/has-style-sharing-003.html.ini b/tests/wpt/metadata/css/selectors/has-style-sharing-003.html.ini new file mode 100644 index 00000000000..3e06257d429 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/has-style-sharing-003.html.ini @@ -0,0 +1,2 @@ +[has-style-sharing-003.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/has-style-sharing-004.html.ini b/tests/wpt/metadata/css/selectors/has-style-sharing-004.html.ini new file mode 100644 index 00000000000..7fdcf39dc13 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/has-style-sharing-004.html.ini @@ -0,0 +1,2 @@ +[has-style-sharing-004.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/has-style-sharing-005.html.ini b/tests/wpt/metadata/css/selectors/has-style-sharing-005.html.ini new file mode 100644 index 00000000000..af49c75860c --- /dev/null +++ b/tests/wpt/metadata/css/selectors/has-style-sharing-005.html.ini @@ -0,0 +1,2 @@ +[has-style-sharing-005.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/has-style-sharing-006.html.ini b/tests/wpt/metadata/css/selectors/has-style-sharing-006.html.ini new file mode 100644 index 00000000000..fc363ea1641 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/has-style-sharing-006.html.ini @@ -0,0 +1,2 @@ +[has-style-sharing-006.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/defined-in-has.html.ini b/tests/wpt/metadata/css/selectors/invalidation/defined-in-has.html.ini new file mode 100644 index 00000000000..a0b66cc5ae7 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/defined-in-has.html.ini @@ -0,0 +1,3 @@ +[defined-in-has.html] + [Test :has() invalidation with :defined pseudo-class] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/has-with-nth-child.html.ini b/tests/wpt/metadata/css/selectors/invalidation/has-with-nth-child.html.ini new file mode 100644 index 00000000000..b9c95cb40b2 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/invalidation/has-with-nth-child.html.ini @@ -0,0 +1,3 @@ +[has-with-nth-child.html] + [Initially red] + expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/nth-child-of-pseudo.html.ini b/tests/wpt/metadata/css/selectors/nth-child-of-pseudo.html.ini new file mode 100644 index 00000000000..ba8dd6b85cc --- /dev/null +++ b/tests/wpt/metadata/css/selectors/nth-child-of-pseudo.html.ini @@ -0,0 +1,2 @@ +[nth-child-of-pseudo.html] + expected: FAIL diff --git a/tests/wpt/metadata/dom/idlharness.any.js.ini b/tests/wpt/metadata/dom/idlharness.any.js.ini index f1743f02ff1..53522f04f26 100644 --- a/tests/wpt/metadata/dom/idlharness.any.js.ini +++ b/tests/wpt/metadata/dom/idlharness.any.js.ini @@ -170,6 +170,15 @@ [AbortSignal interface: calling timeout(unsigned long long) on new AbortController().signal with too few arguments must throw TypeError] expected: FAIL + [AbortSignal interface: operation any(sequence<AbortSignal>)] + expected: FAIL + + [AbortSignal interface: new AbortController().signal must inherit property "any(sequence<AbortSignal>)" with the proper type] + expected: FAIL + + [AbortSignal interface: calling any(sequence<AbortSignal>) on new AbortController().signal with too few arguments must throw TypeError] + expected: FAIL + [idlharness.any.sharedworker.html] expected: ERROR diff --git a/tests/wpt/metadata/dom/idlharness.window.js.ini b/tests/wpt/metadata/dom/idlharness.window.js.ini index ab7daf93a54..9e5556fd0ed 100644 --- a/tests/wpt/metadata/dom/idlharness.window.js.ini +++ b/tests/wpt/metadata/dom/idlharness.window.js.ini @@ -899,6 +899,15 @@ [Element interface: element must inherit property "onfullscreenerror" with the proper type] expected: FAIL + [AbortSignal interface: operation any(sequence<AbortSignal>)] + expected: FAIL + + [AbortSignal interface: new AbortController().signal must inherit property "any(sequence<AbortSignal>)" with the proper type] + expected: FAIL + + [AbortSignal interface: calling any(sequence<AbortSignal>) on new AbortController().signal with too few arguments must throw TypeError] + expected: FAIL + [idlharness.window.html?include=Node] [idl_test setup] diff --git a/tests/wpt/metadata/fetch/api/basic/integrity.sub.any.js.ini b/tests/wpt/metadata/fetch/api/basic/integrity.sub.any.js.ini index 98e80ffce7b..ab6678f0e4e 100644 --- a/tests/wpt/metadata/fetch/api/basic/integrity.sub.any.js.ini +++ b/tests/wpt/metadata/fetch/api/basic/integrity.sub.any.js.ini @@ -1,2 +1,23 @@ [integrity.sub.any.sharedworker.html] expected: ERROR + +[integrity.sub.any.worker.html] + [SHA-512 integrity with missing padding] + expected: FAIL + + [SHA-512 integrity base64url encoded] + expected: FAIL + + [SHA-512 integrity base64url encoded with missing padding] + expected: FAIL + + +[integrity.sub.any.html] + [SHA-512 integrity with missing padding] + expected: FAIL + + [SHA-512 integrity base64url encoded] + expected: FAIL + + [SHA-512 integrity base64url encoded with missing padding] + expected: FAIL 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..a3e6497f7c9 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,7 @@ expected: FAIL [public to local, grandparent navigates: failure.] - expected: FAIL + expected: TIMEOUT [public to local, grandparent navigates: success.] 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 36a410bfecb..f9de5391ad6 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,6 +146,3 @@ [list-style-image sec-fetch-site - HTTPS downgrade-upgrade] expected: FAIL - - [border-image sec-fetch-site - HTTPS downgrade (header not sent)] - 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 530635e744f..1bca09f21d6 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 @@ -4,3 +4,6 @@ [Navigating to a different document with link click] expected: FAIL + + [Navigating to a different document with form submission] + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini index b8fd22e2b81..149bcb4ff8c 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html.ini @@ -10,6 +10,3 @@ [load & pageshow events do not fire on contentWindow of <iframe> element created with src='about:blank'] expected: FAIL - - [load & pageshow events do not fire on contentWindow of <iframe> element created with src=''] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini index 5a245d61359..bcda478adb1 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-referrer.window.js.ini @@ -1,6 +1,10 @@ [javascript-url-referrer.window.html] + expected: TIMEOUT [unsafe-url referrer policy used to create the starting page] expected: FAIL [origin referrer policy used to create the starting page] expected: FAIL + + [no-referrer referrer policy used to create the starting page] + expected: TIMEOUT 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 deleted file mode 100644 index 60a4fa51f8a..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[a-click.html] - [aElement.click() before the load event must NOT replace] - expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/windows/dangling-markup-window-name.tentative.html.ini b/tests/wpt/metadata/html/browsers/windows/dangling-markup-window-name.tentative.html.ini new file mode 100644 index 00000000000..4f7e41cd752 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/windows/dangling-markup-window-name.tentative.html.ini @@ -0,0 +1,2 @@ +[dangling-markup-window-name.tentative.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini b/tests/wpt/metadata/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini index 2a54f2f8814..5cdcce07c65 100644 --- a/tests/wpt/metadata/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini +++ b/tests/wpt/metadata/html/canvas/element/manual/drawing-text-to-the-canvas/canvas.2d.disconnected.html.ini @@ -1,2 +1,2 @@ [canvas.2d.disconnected.html] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html.ini b/tests/wpt/metadata/html/canvas/offscreen/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/offscreen/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/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js.ini new file mode 100644 index 00000000000..ee8c386c098 --- /dev/null +++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js.ini @@ -0,0 +1,3 @@ +[2d.drawImage.svg.worker.html] + [drawImage() of an SVG image] + expected: FAIL diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini index bea609ed103..f6d26305495 100644 --- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini +++ b/tests/wpt/metadata/html/canvas/offscreen/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/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js.ini index 2e4d62fc879..e066aa1646f 100644 --- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js.ini +++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js.ini @@ -1,3 +1,6 @@ [2d.drawImage.zerosource.image.worker.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/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini index fdc27d37788..830aeb8ae48 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/autofocus-dialog.html.ini @@ -1,6 +1,7 @@ [autofocus-dialog.html] + expected: TIMEOUT [<dialog> can contain autofocus, without stopping page autofocus content from working] expected: FAIL [<dialog>-contained autofocus element gets focused when the dialog is shown] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index d169bd2e9fa..58a99633547 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,15 +1,19 @@ [supported-elements.html] + expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Element with tabindex should support autofocus] - expected: FAIL + expected: TIMEOUT [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: FAIL + expected: NOTRUN [Area element should support autofocus] - expected: FAIL + expected: NOTRUN [Host element with delegatesFocus should support autofocus] - expected: FAIL + expected: NOTRUN + + [Non-HTMLElement should not support autofocus] + expected: NOTRUN 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/non-replaced-elements/tables/table-bordercolor-001.html.ini b/tests/wpt/metadata/html/rendering/non-replaced-elements/tables/table-bordercolor-001.html.ini new file mode 100644 index 00000000000..c20ef1a28ea --- /dev/null +++ b/tests/wpt/metadata/html/rendering/non-replaced-elements/tables/table-bordercolor-001.html.ini @@ -0,0 +1,2 @@ +[table-bordercolor-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/media-elements/media_fragment_seek.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/media-elements/media_fragment_seek.html.ini new file mode 100644 index 00000000000..09c049e4b58 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/media-elements/media_fragment_seek.html.ini @@ -0,0 +1,3 @@ +[media_fragment_seek.html] + [Video should seek to time specified in media fragment syntax] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini index f9138fb999a..4041e43a4fd 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_nonescaping-1.html] type: testharness - expected: TIMEOUT + expected: CRASH [Check that popups from a sandboxed iframe do not escape the sandbox] expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index ff6467094b8..a24e565bbce 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,3 +1,4 @@ [iframe_sandbox_popups_nonescaping-3.html] + expected: CRASH [Check that popups from a sandboxed iframe do not escape the sandbox] 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 4ba57fcf86e..04f00279ffc 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 @@ -8,9 +8,6 @@ [multipart/form-data: Basic File test (formdata event)] expected: FAIL - [multipart/form-data: 0x00 in name (normal form)] - expected: FAIL - [multipart/form-data: 0x00 in name (formdata event)] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/historical.html.ini b/tests/wpt/metadata/html/semantics/forms/historical.html.ini new file mode 100644 index 00000000000..5d8289307cc --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/historical.html.ini @@ -0,0 +1,3 @@ +[historical.html] + [<input name=isindex> should not be supported] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/input-type-change-value.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/input-type-change-value.html.ini new file mode 100644 index 00000000000..382092f1078 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/input-type-change-value.html.ini @@ -0,0 +1,6 @@ +[input-type-change-value.html] + [Without focus] + expected: FAIL + + [With focus] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/dir-dynamic.html.ini b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/dir-dynamic.html.ini new file mode 100644 index 00000000000..2c3e8c98de3 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/dir-dynamic.html.ini @@ -0,0 +1,12 @@ +[dir-dynamic.html] + [Dynamically changing dir, text on input element] + expected: FAIL + + [Dynamically changing dir, text on textarea element] + expected: FAIL + + [Dynamically changing dir, text on div element] + expected: FAIL + + [Dynamically changing dir, text on pre element] + expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini new file mode 100644 index 00000000000..53acb938c1b --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html.ini @@ -0,0 +1,3 @@ +[module-static-import-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.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini index 31bfd644df0..6ab46a7862c 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini @@ -1,4 +1,5 @@ [promise-job-entry.html] + expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL @@ -6,7 +7,7 @@ expected: FAIL [Sanity check: this all works as expected with no promises involved] - expected: FAIL + expected: TIMEOUT [Thenable resolution] expected: FAIL 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/resource-timing/idlharness.any.js.ini b/tests/wpt/metadata/resource-timing/idlharness.any.js.ini index cb1495ca247..f7443a6dbf2 100644 --- a/tests/wpt/metadata/resource-timing/idlharness.any.js.ini +++ b/tests/wpt/metadata/resource-timing/idlharness.any.js.ini @@ -32,6 +32,12 @@ [PerformanceResourceTiming interface: resource must inherit property "firstInterimResponseStart" with the proper type] expected: FAIL + [PerformanceResourceTiming interface: attribute contentType] + expected: FAIL + + [PerformanceResourceTiming interface: resource must inherit property "contentType" with the proper type] + expected: FAIL + [idlharness.any.worker.html] [PerformanceResourceTiming interface: resource must inherit property "workerStart" with the proper type] @@ -66,3 +72,9 @@ [PerformanceResourceTiming interface: resource must inherit property "firstInterimResponseStart" with the proper type] expected: FAIL + + [PerformanceResourceTiming interface: attribute contentType] + expected: FAIL + + [PerformanceResourceTiming interface: resource must inherit property "contentType" with the proper type] + expected: FAIL diff --git a/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini b/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini index 23c4be4506a..9df96f72c08 100644 --- a/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini +++ b/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini @@ -1,25 +1,10 @@ [nested-context-navigations-iframe.html] expected: TIMEOUT [Test that iframe refreshes are not observable by the parent] - expected: NOTRUN + expected: TIMEOUT [Test that crossorigin iframe refreshes are not observable by the parent] expected: NOTRUN [Test that cross-site iframe refreshes are not observable by the parent] expected: NOTRUN - - [Test that crossorigin iframe navigations are not observable by the parent, even after history navigations by the parent] - expected: TIMEOUT - - [Test that cross-site iframe navigations are not observable by the parent, even after history navigations by the parent] - expected: NOTRUN - - [Test that iframe navigations are not observable by the parent] - expected: NOTRUN - - [Test that crossorigin iframe navigations are not observable by the parent] - expected: NOTRUN - - [Test that cross-site iframe navigations are not observable by the parent] - expected: NOTRUN diff --git a/tests/wpt/metadata/url/a-element-origin-xhtml.xhtml.ini b/tests/wpt/metadata/url/a-element-origin-xhtml.xhtml.ini index 34f05204ed8..109979d64b9 100644 --- a/tests/wpt/metadata/url/a-element-origin-xhtml.xhtml.ini +++ b/tests/wpt/metadata/url/a-element-origin-xhtml.xhtml.ini @@ -1,3 +1,15 @@ [a-element-origin-xhtml.xhtml] [Parsing origin: <http://[::127.0.0.1.\]> against <http://example.org/foo/bar>] expected: FAIL + + [Parsing origin: <blob:blob:https://example.org/> against <about:blank>] + expected: FAIL + + [Parsing origin: <blob:ftp://host/path> against <about:blank>] + expected: FAIL + + [Parsing origin: <blob:ws://example.org/> against <about:blank>] + expected: FAIL + + [Parsing origin: <blob:wss://example.org/> against <about:blank>] + expected: FAIL diff --git a/tests/wpt/metadata/url/a-element-origin.html.ini b/tests/wpt/metadata/url/a-element-origin.html.ini index b25df295432..d542cf148a4 100644 --- a/tests/wpt/metadata/url/a-element-origin.html.ini +++ b/tests/wpt/metadata/url/a-element-origin.html.ini @@ -1,3 +1,15 @@ [a-element-origin.html] [Parsing origin: <http://[::127.0.0.1.\]> against <http://example.org/foo/bar>] expected: FAIL + + [Parsing origin: <blob:blob:https://example.org/> against <about:blank>] + expected: FAIL + + [Parsing origin: <blob:ftp://host/path> against <about:blank>] + expected: FAIL + + [Parsing origin: <blob:ws://example.org/> against <about:blank>] + expected: FAIL + + [Parsing origin: <blob:wss://example.org/> against <about:blank>] + expected: FAIL diff --git a/tests/wpt/metadata/url/url-origin.any.js.ini b/tests/wpt/metadata/url/url-origin.any.js.ini index f17a77bf368..bee6fdc9996 100644 --- a/tests/wpt/metadata/url/url-origin.any.js.ini +++ b/tests/wpt/metadata/url/url-origin.any.js.ini @@ -2,7 +2,31 @@ [Origin parsing: <http://[::127.0.0.1.\]> against <http://example.org/foo/bar>] expected: FAIL + [Origin parsing: <blob:blob:https://example.org/> without base] + expected: FAIL + + [Origin parsing: <blob:ftp://host/path> without base] + expected: FAIL + + [Origin parsing: <blob:ws://example.org/> without base] + expected: FAIL + + [Origin parsing: <blob:wss://example.org/> without base] + expected: FAIL + [url-origin.any.worker.html] [Origin parsing: <http://[::127.0.0.1.\]> against <http://example.org/foo/bar>] expected: FAIL + + [Origin parsing: <blob:blob:https://example.org/> without base] + expected: FAIL + + [Origin parsing: <blob:ftp://host/path> without base] + expected: FAIL + + [Origin parsing: <blob:ws://example.org/> without base] + expected: FAIL + + [Origin parsing: <blob:wss://example.org/> without base] + expected: FAIL diff --git a/tests/wpt/metadata/webdriver/tests/accept_alert/accept.py.ini b/tests/wpt/metadata/webdriver/tests/accept_alert/accept.py.ini deleted file mode 100644 index 99efe3f1b02..00000000000 --- a/tests/wpt/metadata/webdriver/tests/accept_alert/accept.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[accept.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/add_cookie/add.py.ini b/tests/wpt/metadata/webdriver/tests/add_cookie/add.py.ini deleted file mode 100644 index ec142fc1b9d..00000000000 --- a/tests/wpt/metadata/webdriver/tests/add_cookie/add.py.ini +++ /dev/null @@ -1,31 +0,0 @@ -[add.py] - [test_add_non_session_cookie] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_add_cookie_with_invalid_samesite_type[12\]] - expected: FAIL - - [test_add_cookie_with_invalid_samesite_flag] - expected: FAIL - - [test_add_cookie_with_valid_samesite_flag[Strict\]] - expected: FAIL - - [test_add_cookie_with_valid_samesite_flag[None\]] - expected: FAIL - - [test_add_cookie_with_invalid_samesite_type[same_site2\]] - expected: FAIL - - [test_add_cookie_with_valid_samesite_flag[Lax\]] - expected: FAIL - - [test_add_cookie_with_invalid_samesite_type[False\]] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/add_cookie/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/add_cookie/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/add_cookie/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/back/back.py.ini b/tests/wpt/metadata/webdriver/tests/back/back.py.ini deleted file mode 100644 index 468fc5cc50a..00000000000 --- a/tests/wpt/metadata/webdriver/tests/back/back.py.ini +++ /dev/null @@ -1,28 +0,0 @@ -[back.py] - [test_history_pushstate] - expected: ERROR - - [test_no_browsing_history] - expected: ERROR - - [test_null_response_value] - expected: ERROR - - [test_fragments] - expected: ERROR - - [test_data_urls] - expected: ERROR - - [test_no_browsing_context] - expected: ERROR - - [test_dismissed_beforeunload] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - - [test_removed_iframe] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/back/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/back/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/back/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/close_window/close.py.ini b/tests/wpt/metadata/webdriver/tests/close_window/close.py.ini deleted file mode 100644 index 21605510032..00000000000 --- a/tests/wpt/metadata/webdriver/tests/close_window/close.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[close.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/close_window/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/close_window/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/close_window/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/delete_all_cookies/delete.py.ini b/tests/wpt/metadata/webdriver/tests/delete_all_cookies/delete.py.ini deleted file mode 100644 index cfa3b5b01ef..00000000000 --- a/tests/wpt/metadata/webdriver/tests/delete_all_cookies/delete.py.ini +++ /dev/null @@ -1,6 +0,0 @@ -[delete.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR diff --git a/tests/wpt/metadata/webdriver/tests/delete_all_cookies/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/delete_all_cookies/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/delete_all_cookies/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/delete_cookie/delete.py.ini b/tests/wpt/metadata/webdriver/tests/delete_cookie/delete.py.ini deleted file mode 100644 index 7798c2fd142..00000000000 --- a/tests/wpt/metadata/webdriver/tests/delete_cookie/delete.py.ini +++ /dev/null @@ -1,13 +0,0 @@ -[delete.py] - [test_null_response_value] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_unknown_cookie] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/delete_cookie/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/delete_cookie/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/delete_cookie/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/delete_session/delete.py.ini b/tests/wpt/metadata/webdriver/tests/delete_session/delete.py.ini deleted file mode 100644 index 44e37efea17..00000000000 --- a/tests/wpt/metadata/webdriver/tests/delete_session/delete.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[delete.py] - disabled: Triggers setup errors in other tests diff --git a/tests/wpt/metadata/webdriver/tests/dismiss_alert/dismiss.py.ini b/tests/wpt/metadata/webdriver/tests/dismiss_alert/dismiss.py.ini deleted file mode 100644 index a41e2a6a3f9..00000000000 --- a/tests/wpt/metadata/webdriver/tests/dismiss_alert/dismiss.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[dismiss.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/element_clear/clear.py.ini b/tests/wpt/metadata/webdriver/tests/element_clear/clear.py.ini deleted file mode 100644 index 1a68b54230b..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_clear/clear.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[clear.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/element_clear/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/element_clear/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_clear/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/element_click/bubbling.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/bubbling.py.ini deleted file mode 100644 index 9d4fc49114a..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/bubbling.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[bubbling.py] - [test_click_event_bubbles_to_parents] - expected: FAIL - - [test_spin_event_loop] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_click/center_point.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/center_point.py.ini deleted file mode 100644 index 6fd53fbe6b7..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/center_point.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[center_point.py] - disabled: Intermittent failures diff --git a/tests/wpt/metadata/webdriver/tests/element_click/click.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/click.py.ini deleted file mode 100644 index 3378d973420..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/click.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[click.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/element_click/events.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/events.py.ini deleted file mode 100644 index 484ebb8a916..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/events.py.ini +++ /dev/null @@ -1,4 +0,0 @@ -[events.py] - [test_event_mousemove] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_click/interactability.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/interactability.py.ini deleted file mode 100644 index 934ec560920..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/interactability.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[interactability.py] - disabled: Interactability is not checked yet diff --git a/tests/wpt/metadata/webdriver/tests/element_click/navigate.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/navigate.py.ini deleted file mode 100644 index 6fe26101532..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/navigate.py.ini +++ /dev/null @@ -1,49 +0,0 @@ -[navigate.py] - [test_multi_line_link] - expected: FAIL - - [test_link_unload_event] - expected: FAIL - - [test_link_closes_window] - expected: FAIL - - [test_link_hash] - expected: FAIL - - [test_numbers_link] - expected: FAIL - - [test_link_open_target_in_new_window] - expected: FAIL - - [test_link_from_toplevel_context_with_target[_self\]] - expected: FAIL - - [test_link_from_nested_context_with_target[_top\]] - expected: FAIL - - [test_link_from_nested_context_with_target[\]] - expected: FAIL - - [test_link_from_toplevel_context_with_target[_blank\]] - expected: FAIL - - [test_link_from_toplevel_context_with_target[_parent\]] - expected: FAIL - - [test_link_from_toplevel_context_with_target[\]] - expected: FAIL - - [test_link_from_toplevel_context_with_target[_top\]] - expected: FAIL - - [test_link_from_nested_context_with_target[_self\]] - expected: FAIL - - [test_link_from_nested_context_with_target[_blank\]] - expected: FAIL - - [test_link_from_nested_context_with_target[_parent\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_click/scroll_into_view.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/scroll_into_view.py.ini deleted file mode 100644 index 5767fe79c45..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/scroll_into_view.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[scroll_into_view.py] - disabled: scrollIntoView is not implemented diff --git a/tests/wpt/metadata/webdriver/tests/element_click/select.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/select.py.ini deleted file mode 100644 index 156f09966c5..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/select.py.ini +++ /dev/null @@ -1,16 +0,0 @@ -[select.py] - [test_click_selected_option] - expected: FAIL - - [test_click_preselected_option] - expected: FAIL - - [test_out_of_view_dropdown] - expected: FAIL - - [test_click_deselects_others] - expected: FAIL - - [test_click_option] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_click/shadow_dom.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/shadow_dom.py.ini deleted file mode 100644 index 733556b7a10..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/shadow_dom.py.ini +++ /dev/null @@ -1,16 +0,0 @@ -[shadow_dom.py] - [test_nested_shadow_element_click[checkbox_element\]] - expected: FAIL - - [test_nested_shadow_element_click[outer_element\]] - expected: FAIL - - [test_shadow_element_click[checkbox_element\]] - expected: FAIL - - [test_shadow_element_click[custom_element\]] - expected: FAIL - - [test_nested_shadow_element_click[inner_element\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_click/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/element_click/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_click/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/content_editable.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/content_editable.py.ini deleted file mode 100644 index efc9d8e08d0..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/content_editable.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[content_editable.py] - [test_sets_insertion_point_to_after_last_text_node] - expected: FAIL - - [test_sets_insertion_point_to_end] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/events.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/events.py.ini deleted file mode 100644 index aba9010ad1d..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/events.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[events.py] - [test_form_control_send_text[input\]] - expected: FAIL - - [test_form_control_send_text[textarea\]] - expected: FAIL - - [test_file_upload] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/file_upload.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/file_upload.py.ini deleted file mode 100644 index 1894789ebb8..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/file_upload.py.ini +++ /dev/null @@ -1,51 +0,0 @@ -[file_upload.py] - expected: - if os == "linux": TIMEOUT - [test_multiple_files] - expected: FAIL - - [test_multiple_files_last_path_not_found] - expected: FAIL - - [test_multiple_files_without_multiple_attribute] - expected: FAIL - - [test_obscured] - expected: FAIL - - [test_multiple_files_send_twice] - expected: FAIL - - [test_single_file_replaces_without_multiple_attribute] - expected: FAIL - - [test_strict_display_none[capabilities0\]] - expected: ERROR - - [test_outside_viewport] - expected: FAIL - - [test_multiple_files_reset_with_element_clear] - expected: FAIL - - [test_strict_hidden[capabilities0\]] - expected: ERROR - - [test_single_file_appends_with_multiple_attribute] - expected: FAIL - - [test_empty_text] - expected: FAIL - - [test_single_file] - expected: FAIL - - [test_display_none] - expected: FAIL - - [test_hidden] - expected: FAIL - - [test_transparent] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/form_controls.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/form_controls.py.ini deleted file mode 100644 index 3601b6faecc..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/form_controls.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[form_controls.py] - disabled: Triggers setup errors in other tests diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/interactability.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/interactability.py.ini deleted file mode 100644 index b068acec62e..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/interactability.py.ini +++ /dev/null @@ -1,25 +0,0 @@ -[interactability.py] - [test_disabled] - expected: FAIL - - [test_not_a_focusable_element] - expected: FAIL - - [test_visibility_hidden] - expected: FAIL - - [test_iframe_is_interactable] - expected: FAIL - - [test_readonly_element] - expected: FAIL - - [test_document_element_is_interactable] - expected: FAIL - - [test_hidden] - expected: FAIL - - [test_display_none] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/scroll_into_view.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/scroll_into_view.py.ini deleted file mode 100644 index 53f08deca9d..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/scroll_into_view.py.ini +++ /dev/null @@ -1,13 +0,0 @@ -[scroll_into_view.py] - [test_option_select_container_outside_of_scrollable_viewport] - expected: FAIL - - [test_contenteditable_element_outside_of_scrollable_viewport] - expected: FAIL - - [test_element_outside_of_scrollable_viewport] - expected: FAIL - - [test_option_stays_outside_of_scrollable_viewport] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/send_keys.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/send_keys.py.ini deleted file mode 100644 index 386efcf21b6..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/send_keys.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[send_keys.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/element_send_keys/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/element_send_keys/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/element_send_keys/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/execute_async_script/collections.py.ini b/tests/wpt/metadata/webdriver/tests/execute_async_script/collections.py.ini deleted file mode 100644 index 36331e9a320..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_async_script/collections.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[collections.py] - disabled: unstable diff --git a/tests/wpt/metadata/webdriver/tests/execute_async_script/execute_async.py.ini b/tests/wpt/metadata/webdriver/tests/execute_async_script/execute_async.py.ini deleted file mode 100644 index f742fc2fb91..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_async_script/execute_async.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[execute_async.py] - disabled: unstable diff --git a/tests/wpt/metadata/webdriver/tests/execute_async_script/promise.py.ini b/tests/wpt/metadata/webdriver/tests/execute_async_script/promise.py.ini deleted file mode 100644 index 8faeb84de57..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_async_script/promise.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[promise.py] - disabled: unstable diff --git a/tests/wpt/metadata/webdriver/tests/execute_async_script/properties.py.ini b/tests/wpt/metadata/webdriver/tests/execute_async_script/properties.py.ini deleted file mode 100644 index 79781c01b85..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_async_script/properties.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[properties.py] - disabled: unstable diff --git a/tests/wpt/metadata/webdriver/tests/execute_async_script/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/execute_async_script/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_async_script/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/execute_script/collections.py.ini b/tests/wpt/metadata/webdriver/tests/execute_script/collections.py.ini deleted file mode 100644 index a22f4f57734..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_script/collections.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[collections.py] - [test_file_list] - expected: FAIL - - [test_arguments] - expected: FAIL - - [test_html_all_collection] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/execute_script/cyclic.py.ini b/tests/wpt/metadata/webdriver/tests/execute_script/cyclic.py.ini deleted file mode 100644 index d7071b6bcee..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_script/cyclic.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[cyclic.py] - [test_element_in_object] - expected: FAIL - - [test_element_in_collection] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/execute_script/execute.py.ini b/tests/wpt/metadata/webdriver/tests/execute_script/execute.py.ini deleted file mode 100644 index c5150bd9cb3..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_script/execute.py.ini +++ /dev/null @@ -1,31 +0,0 @@ -[execute.py] - [test_abort_by_user_prompt_twice[confirm\]] - expected: FAIL - - [test_ending_comment] - expected: FAIL - - [test_abort_by_user_prompt[alert\]] - expected: FAIL - - [test_abort_by_user_prompt_twice[prompt\]] - expected: FAIL - - [test_abort_by_user_prompt[confirm\]] - expected: FAIL - - [test_abort_by_user_prompt[prompt\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_abort_by_user_prompt_twice[alert\]] - expected: FAIL - - [test_opening_new_window_keeps_current_window_handle] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/execute_script/json_serialize_windowproxy.py.ini b/tests/wpt/metadata/webdriver/tests/execute_script/json_serialize_windowproxy.py.ini deleted file mode 100644 index 431ee10e885..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_script/json_serialize_windowproxy.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[json_serialize_windowproxy.py] - [test_frame] - expected: FAIL - - [test_window_open] - expected: FAIL - - [test_initial_window] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/execute_script/promise.py.ini b/tests/wpt/metadata/webdriver/tests/execute_script/promise.py.ini deleted file mode 100644 index 096b2afe6b0..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_script/promise.py.ini +++ /dev/null @@ -1,31 +0,0 @@ -[promise.py] - [test_await_promise_resolve] - expected: FAIL - - [test_promise_reject_timeout] - expected: FAIL - - [test_await_promise_reject] - expected: FAIL - - [test_promise_resolve_timeout] - expected: FAIL - - [test_promise_resolve] - expected: FAIL - - [test_promise_resolve_delayed] - expected: FAIL - - [test_promise_all_resolve] - expected: FAIL - - [test_promise_all_reject] - expected: FAIL - - [test_promise_reject_delayed] - expected: FAIL - - [test_promise_reject] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/execute_script/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/execute_script/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/execute_script/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/find_element/find.py.ini b/tests/wpt/metadata/webdriver/tests/find_element/find.py.ini deleted file mode 100644 index dacee8c0d35..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_element/find.py.ini +++ /dev/null @@ -1,19 +0,0 @@ -[find.py] - [test_htmldocument[xpath-/html\]] - expected: FAIL - - [test_xhtml_namespace[xpath-//*[name()='a'\]\]] - expected: FAIL - - [test_no_element[css selector-#wontExist\]] - expected: FAIL - - [test_find_element[xpath-//a\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/find_element/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/find_element/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_element/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/find_element_from_element/find.py.ini b/tests/wpt/metadata/webdriver/tests/find_element_from_element/find.py.ini deleted file mode 100644 index eda0f84155b..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_element_from_element/find.py.ini +++ /dev/null @@ -1,22 +0,0 @@ -[find.py] - [test_xhtml_namespace[xpath-//*[name()='a'\]\]] - expected: FAIL - - [test_parent_htmldocument] - expected: FAIL - - [test_parent_of_document_node_errors] - expected: FAIL - - [test_no_element[css selector-#wontExist\]] - expected: FAIL - - [test_find_element[xpath-//a\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/find_element_from_element/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/find_element_from_element/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_element_from_element/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/find_element_from_shadow_root/find.py.ini b/tests/wpt/metadata/webdriver/tests/find_element_from_shadow_root/find.py.ini deleted file mode 100644 index d904318539a..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_element_from_shadow_root/find.py.ini +++ /dev/null @@ -1,100 +0,0 @@ -[find.py] - [test_find_element_partial_link_text[<a href=#>partial link&text</a>-k&t\]] - expected: FAIL - - [test_find_element_link_text[<a href=#>link<br>text</a>-link\\ntext\]] - expected: FAIL - - [test_find_element_partial_link_text[<a href=#> partial link text </a>-link\]] - expected: FAIL - - [test_invalid_selector_argument[value1\]] - expected: FAIL - - [test_invalid_using_argument[using4\]] - expected: FAIL - - [test_invalid_selector_argument[None\]] - expected: FAIL - - [test_find_element_partial_link_text[<a href=# style='text-transform: uppercase'>partial link text</a>-LINK\]] - expected: FAIL - - [test_find_element_partial_link_text[<a href=#>partial link<br>text</a>-k\\nt\]] - expected: FAIL - - [test_find_element_partial_link_text[<a href=#>partial link text</a>-link\]] - expected: FAIL - - [test_find_element_link_text[<a href=#>link&text</a>-link&text\]] - expected: FAIL - - [test_find_element[partial link text-link text\]] - expected: FAIL - - [test_find_element_link_text[<a href=#>LINK TEXT</a>-LINK TEXT\]] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - - [test_find_element[link text-full link text\]] - expected: FAIL - - [test_invalid_using_argument[1\]] - expected: FAIL - - [test_invalid_selector_argument[value2\]] - expected: FAIL - - [test_invalid_using_argument[True\]] - expected: FAIL - - [test_find_element_link_text[<a href=#> link text </a>-link text\]] - expected: FAIL - - [test_find_element_link_text[<a href=# style='text-transform: uppercase'>link text</a>-LINK TEXT\]] - expected: FAIL - - [test_no_element[css selector-#wontExist\]] - expected: FAIL - - [test_find_element_partial_link_text[<a href=#>PARTIAL LINK TEXT</a>-LINK\]] - expected: FAIL - - [test_invalid_using_argument[using5\]] - expected: FAIL - - [test_invalid_using_argument[None\]] - expected: FAIL - - [test_null_parameter_value] - expected: FAIL - - [test_invalid_using_argument[a\]] - expected: FAIL - - [test_find_element[css selector-#linkText\]] - expected: FAIL - - [test_find_element_partial_link_text[<a href=#>partial link text</a>-k t\]] - expected: FAIL - - [test_detached_shadow_root] - expected: FAIL - - [test_found_element_equivalence] - expected: FAIL - - [test_find_element[tag name-a\]] - expected: FAIL - - [test_find_element[xpath-//a\]] - expected: FAIL - - [test_find_element_link_text[<a href=#>link text</a>-link text\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/find_element_from_shadow_root/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/find_element_from_shadow_root/user_prompts.py.ini deleted file mode 100644 index 1af95add6bf..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_element_from_shadow_root/user_prompts.py.ini +++ /dev/null @@ -1,55 +0,0 @@ -[user_prompts.py] - [test_accept_and_notify[capabilities0-prompt-\]] - expected: FAIL - - [test_dismiss[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-prompt-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-confirm-False\]] - expected: FAIL - - [test_default[alert-None\]] - expected: FAIL - - [test_accept[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept[capabilities0-alert-None\]] - expected: FAIL - - [test_ignore[capabilities0-prompt\]] - expected: FAIL - - [test_default[confirm-False\]] - expected: FAIL - - [test_ignore[capabilities0-alert\]] - expected: FAIL - - [test_ignore[capabilities0-confirm\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss[capabilities0-prompt-None\]] - expected: FAIL - - [test_accept[capabilities0-prompt-\]] - expected: FAIL - - [test_default[prompt-None\]] - expected: FAIL - - [test_dismiss[capabilities0-confirm-False\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/find_elements/find.py.ini b/tests/wpt/metadata/webdriver/tests/find_elements/find.py.ini deleted file mode 100644 index c0ddeb5159f..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_elements/find.py.ini +++ /dev/null @@ -1,34 +0,0 @@ -[find.py] - [test_xhtml_namespace[xpath-//*[name()='a'\]\]] - expected: FAIL - - [test_find_elements_link_text[<a href=# style='text-transform: uppercase'>link text</a>-LINK TEXT\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link<br>text</a>-k\nt\]] - expected: FAIL - - [test_htmldocument[xpath-/html\]] - expected: FAIL - - [test_find_elements[xpath-//a\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=# style='text-transform: uppercase'>partial link text</a>-LINK\]] - expected: FAIL - - [test_find_elements_link_text[<a href=#>link<br>text</a>-link\ntext\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - - [test_find_elements_link_text[<a href=#>link<br>text</a>-link\\ntext\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link<br>text</a>-k\\nt\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/find_elements/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/find_elements/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_elements/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/find_elements_from_element/find.py.ini b/tests/wpt/metadata/webdriver/tests/find_elements_from_element/find.py.ini deleted file mode 100644 index bb03774e849..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_elements_from_element/find.py.ini +++ /dev/null @@ -1,37 +0,0 @@ -[find.py] - [test_xhtml_namespace[xpath-//*[name()='a'\]\]] - expected: FAIL - - [test_find_elements_link_text[<a href=# style='text-transform: uppercase'>link text</a>-LINK TEXT\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link<br>text</a>-k\nt\]] - expected: FAIL - - [test_parent_htmldocument] - expected: FAIL - - [test_parent_of_document_node_errors] - expected: FAIL - - [test_find_elements[xpath-//a\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=# style='text-transform: uppercase'>partial link text</a>-LINK\]] - expected: FAIL - - [test_find_elements_link_text[<a href=#>link<br>text</a>-link\ntext\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - - [test_find_elements_link_text[<a href=#>link<br>text</a>-link\\ntext\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link<br>text</a>-k\\nt\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/find_elements_from_element/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/find_elements_from_element/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_elements_from_element/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/find_elements_from_shadow_root/find.py.ini b/tests/wpt/metadata/webdriver/tests/find_elements_from_shadow_root/find.py.ini deleted file mode 100644 index b470ea8a75e..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_elements_from_shadow_root/find.py.ini +++ /dev/null @@ -1,100 +0,0 @@ -[find.py] - [test_find_elements_link_text[<a href=#>link text</a>-link text\]] - expected: FAIL - - [test_find_elements_equivalence] - expected: FAIL - - [test_find_elements[css selector-#linkText\]] - expected: FAIL - - [test_find_elements_link_text[<a href=#>LINK TEXT</a>-LINK TEXT\]] - expected: FAIL - - [test_invalid_selector_argument[value1\]] - expected: FAIL - - [test_invalid_using_argument[using4\]] - expected: FAIL - - [test_invalid_selector_argument[None\]] - expected: FAIL - - [test_find_elements[link text-full link text\]] - expected: FAIL - - [test_find_elements_link_text[<a href=# style='text-transform: uppercase'>link text</a>-LINK TEXT\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#> partial link text </a>-link\]] - expected: FAIL - - [test_find_elements_link_text[<a href=#> link text </a>-link text\]] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - - [test_find_elements_link_text[<a href=#>link<br>text</a>-link\\ntext\]] - expected: FAIL - - [test_find_elements[partial link text-link text\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link text</a>-k t\]] - expected: FAIL - - [test_invalid_using_argument[1\]] - expected: FAIL - - [test_invalid_selector_argument[value2\]] - expected: FAIL - - [test_invalid_using_argument[True\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link<br>text</a>-k\\nt\]] - expected: FAIL - - [test_no_element[css selector-#wontExist\]] - expected: FAIL - - [test_invalid_using_argument[using5\]] - expected: FAIL - - [test_invalid_using_argument[None\]] - expected: FAIL - - [test_null_parameter_value] - expected: FAIL - - [test_invalid_using_argument[a\]] - expected: FAIL - - [test_detached_shadow_root] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link&text</a>-k&t\]] - expected: FAIL - - [test_find_elements[xpath-//a\]] - expected: FAIL - - [test_find_elements[tag name-a\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=# style='text-transform: uppercase'>partial link text</a>-LINK\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>PARTIAL LINK TEXT</a>-LINK\]] - expected: FAIL - - [test_find_elements_link_text[<a href=#>link&text</a>-link&text\]] - expected: FAIL - - [test_find_elements_partial_link_text[<a href=#>partial link text</a>-link\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/find_elements_from_shadow_root/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/find_elements_from_shadow_root/user_prompts.py.ini deleted file mode 100644 index e71bce4c95c..00000000000 --- a/tests/wpt/metadata/webdriver/tests/find_elements_from_shadow_root/user_prompts.py.ini +++ /dev/null @@ -1,56 +0,0 @@ -[user_prompts.py] - expected: ERROR - [test_accept_and_notify[capabilities0-prompt-\]] - expected: FAIL - - [test_dismiss[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-prompt-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-confirm-False\]] - expected: FAIL - - [test_default[alert-None\]] - expected: FAIL - - [test_accept[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept[capabilities0-alert-None\]] - expected: FAIL - - [test_ignore[capabilities0-prompt\]] - expected: FAIL - - [test_default[confirm-False\]] - expected: FAIL - - [test_ignore[capabilities0-alert\]] - expected: FAIL - - [test_ignore[capabilities0-confirm\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss[capabilities0-prompt-None\]] - expected: FAIL - - [test_accept[capabilities0-prompt-\]] - expected: FAIL - - [test_default[prompt-None\]] - expected: FAIL - - [test_dismiss[capabilities0-confirm-False\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/forward/forward.py.ini b/tests/wpt/metadata/webdriver/tests/forward/forward.py.ini deleted file mode 100644 index ce1efd857e8..00000000000 --- a/tests/wpt/metadata/webdriver/tests/forward/forward.py.ini +++ /dev/null @@ -1,28 +0,0 @@ -[forward.py] - [test_history_pushstate] - expected: ERROR - - [test_no_browsing_history] - expected: ERROR - - [test_null_response_value] - expected: ERROR - - [test_fragments] - expected: ERROR - - [test_data_urls] - expected: ERROR - - [test_no_browsing_context] - expected: ERROR - - [test_dismissed_beforeunload] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - - [test_removed_iframe] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/forward/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/forward/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/forward/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/fullscreen_window/fullscreen.py.ini b/tests/wpt/metadata/webdriver/tests/fullscreen_window/fullscreen.py.ini deleted file mode 100644 index f708ad78e4d..00000000000 --- a/tests/wpt/metadata/webdriver/tests/fullscreen_window/fullscreen.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[fullscreen.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/fullscreen_window/stress.py.ini b/tests/wpt/metadata/webdriver/tests/fullscreen_window/stress.py.ini deleted file mode 100644 index e5bfe4a809c..00000000000 --- a/tests/wpt/metadata/webdriver/tests/fullscreen_window/stress.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[stress.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/fullscreen_window/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/fullscreen_window/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/fullscreen_window/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_active_element/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_active_element/get.py.ini deleted file mode 100644 index 4fd986ad6f3..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_active_element/get.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_missing_document_element] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_active_element/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_active_element/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_active_element/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_alert_text/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_alert_text/get.py.ini deleted file mode 100644 index ede060751a2..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_alert_text/get.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[get.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/get_computed_label/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_computed_label/get.py.ini deleted file mode 100644 index cba4c52ff20..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_computed_label/get.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[get.py] - expected: ERROR diff --git a/tests/wpt/metadata/webdriver/tests/get_computed_role/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_computed_role/get.py.ini deleted file mode 100644 index cba4c52ff20..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_computed_role/get.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[get.py] - expected: ERROR diff --git a/tests/wpt/metadata/webdriver/tests/get_current_url/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_current_url/get.py.ini deleted file mode 100644 index e74c2087c23..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_current_url/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_current_url/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_current_url/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_current_url/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_element_attribute/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_attribute/get.py.ini deleted file mode 100644 index 029d1e084ed..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_attribute/get.py.ini +++ /dev/null @@ -1,67 +0,0 @@ -[get.py] - [test_boolean_attribute[video-attrs17\]] - expected: FAIL - - [test_global_boolean_attributes] - expected: FAIL - - [test_boolean_attribute[script-attrs13\]] - expected: FAIL - - [test_boolean_attribute[select-attrs14\]] - expected: FAIL - - [test_boolean_attribute[img-attrs7\]] - expected: FAIL - - [test_boolean_attribute[details-attrs2\]] - expected: FAIL - - [test_boolean_attribute[ol-attrs10\]] - expected: FAIL - - [test_boolean_attribute[track-attrs16\]] - expected: FAIL - - [test_boolean_attribute[option-attrs12\]] - expected: FAIL - - [test_boolean_attribute[form-attrs5\]] - expected: FAIL - - [test_boolean_attribute[audio-attrs0\]] - expected: FAIL - - [test_normal] - expected: FAIL - - [test_boolean_attribute[input-attrs8\]] - expected: FAIL - - [test_boolean_attribute[menuitem-attrs9\]] - expected: FAIL - - [test_boolean_attribute[dialog-attrs3\]] - expected: FAIL - - [test_boolean_attribute[iframe-attrs6\]] - expected: FAIL - - [test_boolean_attribute[optgroup-attrs11\]] - expected: FAIL - - [test_boolean_attribute[textarea-attrs15\]] - expected: FAIL - - [test_boolean_attribute[fieldset-attrs4\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_boolean_attribute[button-attrs1\]] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_attribute/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_attribute/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_attribute/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_element_css_value/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_css_value/get.py.ini deleted file mode 100644 index e74c2087c23..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_css_value/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_css_value/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_css_value/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_css_value/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_element_property/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_property/get.py.ini deleted file mode 100644 index 27a6d7b5be9..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_property/get.py.ini +++ /dev/null @@ -1,25 +0,0 @@ -[get.py] - [test_idl_attribute] - expected: FAIL - - [test_primitives_set_by_execute_script[42-42\]] - expected: FAIL - - [test_primitives_set_by_execute_script[js_primitive2-py_primitive2\]] - expected: FAIL - - [test_mutated_element] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_primitives_set_by_execute_script["foobar"-foobar\]] - expected: FAIL - - [test_primitives_set_by_execute_script[js_primitive3-py_primitive3\]] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_property/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_property/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_property/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_element_rect/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_rect/get.py.ini deleted file mode 100644 index e74c2087c23..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_rect/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_rect/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_rect/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_rect/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_element_shadow_root/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_shadow_root/get.py.ini deleted file mode 100644 index 493f92143f2..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_shadow_root/get.py.ini +++ /dev/null @@ -1,19 +0,0 @@ -[get.py] - [test_no_shadow_root] - expected: FAIL - - [test_element_not_found] - expected: FAIL - - [test_element_stale] - expected: FAIL - - [test_get_shadow_root] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - - [test_no_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_shadow_root/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_shadow_root/user_prompts.py.ini deleted file mode 100644 index 1af95add6bf..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_shadow_root/user_prompts.py.ini +++ /dev/null @@ -1,55 +0,0 @@ -[user_prompts.py] - [test_accept_and_notify[capabilities0-prompt-\]] - expected: FAIL - - [test_dismiss[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-prompt-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-confirm-False\]] - expected: FAIL - - [test_default[alert-None\]] - expected: FAIL - - [test_accept[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept[capabilities0-alert-None\]] - expected: FAIL - - [test_ignore[capabilities0-prompt\]] - expected: FAIL - - [test_default[confirm-False\]] - expected: FAIL - - [test_ignore[capabilities0-alert\]] - expected: FAIL - - [test_ignore[capabilities0-confirm\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss[capabilities0-prompt-None\]] - expected: FAIL - - [test_accept[capabilities0-prompt-\]] - expected: FAIL - - [test_default[prompt-None\]] - expected: FAIL - - [test_dismiss[capabilities0-confirm-False\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_tag_name/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_tag_name/get.py.ini deleted file mode 100644 index d3c763820ef..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_tag_name/get.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_get_element_tag_name] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_tag_name/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_tag_name/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_tag_name/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_element_text/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_text/get.py.ini deleted file mode 100644 index e74c2087c23..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_text/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_element_text/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_element_text/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_element_text/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_named_cookie/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_named_cookie/get.py.ini deleted file mode 100644 index 5735042f307..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_named_cookie/get.py.ini +++ /dev/null @@ -1,25 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_get_named_cookie] - expected: FAIL - - [test_get_cookie_with_same_site_flag[capabilities0-Lax\]] - expected: ERROR - - [test_get_cookie_with_same_site_flag[capabilities0-None\]] - expected: ERROR - - [test_get_named_session_cookie] - expected: FAIL - - [test_get_cookie_with_same_site_flag[capabilities0-Strict\]] - expected: ERROR - - [test_duplicated_cookie] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_named_cookie/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_named_cookie/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_named_cookie/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_page_source/source.py.ini b/tests/wpt/metadata/webdriver/tests/get_page_source/source.py.ini deleted file mode 100644 index 615d9c6648f..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_page_source/source.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[source.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_page_source/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_page_source/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_page_source/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_title/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_title/get.py.ini deleted file mode 100644 index e74c2087c23..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_title/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_title/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_title/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_title/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_window_handle/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_window_handle/get.py.ini deleted file mode 100644 index e74c2087c23..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_window_handle/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_window_handle/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_window_handle/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_window_handle/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_window_handles/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_window_handles/get.py.ini deleted file mode 100644 index c413119cd7b..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_window_handles/get.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[get.py] - [test_multiple_windows] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_window_handles/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_window_handles/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_window_handles/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/get_window_rect/get.py.ini b/tests/wpt/metadata/webdriver/tests/get_window_rect/get.py.ini deleted file mode 100644 index e74c2087c23..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_window_rect/get.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[get.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/get_window_rect/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/get_window_rect/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/get_window_rect/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/idlharness.window.js.ini b/tests/wpt/metadata/webdriver/tests/idlharness.window.js.ini deleted file mode 100644 index f89cd1a148d..00000000000 --- a/tests/wpt/metadata/webdriver/tests/idlharness.window.js.ini +++ /dev/null @@ -1,7 +0,0 @@ -[idlharness.window.html] - [Navigator interface: navigator must inherit property "webdriver" with the proper type] - expected: FAIL - - [Navigator interface: attribute webdriver] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/interface/interface.py.ini b/tests/wpt/metadata/webdriver/tests/interface/interface.py.ini deleted file mode 100644 index 568334a6fb6..00000000000 --- a/tests/wpt/metadata/webdriver/tests/interface/interface.py.ini +++ /dev/null @@ -1,4 +0,0 @@ -[interface.py] - [test_navigator_webdriver_active] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/is_element_enabled/enabled.py.ini b/tests/wpt/metadata/webdriver/tests/is_element_enabled/enabled.py.ini deleted file mode 100644 index 4fa353a9436..00000000000 --- a/tests/wpt/metadata/webdriver/tests/is_element_enabled/enabled.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[enabled.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/is_element_enabled/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/is_element_enabled/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/is_element_enabled/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/is_element_selected/selected.py.ini b/tests/wpt/metadata/webdriver/tests/is_element_selected/selected.py.ini deleted file mode 100644 index 45a4b620927..00000000000 --- a/tests/wpt/metadata/webdriver/tests/is_element_selected/selected.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[selected.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/is_element_selected/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/is_element_selected/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/is_element_selected/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/maximize_window/maximize.py.ini b/tests/wpt/metadata/webdriver/tests/maximize_window/maximize.py.ini deleted file mode 100644 index 196a823e20b..00000000000 --- a/tests/wpt/metadata/webdriver/tests/maximize_window/maximize.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[maximize.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/maximize_window/stress.py.ini b/tests/wpt/metadata/webdriver/tests/maximize_window/stress.py.ini deleted file mode 100644 index e5bfe4a809c..00000000000 --- a/tests/wpt/metadata/webdriver/tests/maximize_window/stress.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[stress.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/maximize_window/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/maximize_window/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/maximize_window/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/minimize_window/minimize.py.ini b/tests/wpt/metadata/webdriver/tests/minimize_window/minimize.py.ini deleted file mode 100644 index bbdc54201d1..00000000000 --- a/tests/wpt/metadata/webdriver/tests/minimize_window/minimize.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[minimize.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/minimize_window/stress.py.ini b/tests/wpt/metadata/webdriver/tests/minimize_window/stress.py.ini deleted file mode 100644 index e5bfe4a809c..00000000000 --- a/tests/wpt/metadata/webdriver/tests/minimize_window/stress.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[stress.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/minimize_window/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/minimize_window/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/minimize_window/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/navigate_to/navigate.py.ini b/tests/wpt/metadata/webdriver/tests/navigate_to/navigate.py.ini deleted file mode 100644 index 1cce4d7fee5..00000000000 --- a/tests/wpt/metadata/webdriver/tests/navigate_to/navigate.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[navigate.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/navigate_to/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/navigate_to/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/navigate_to/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/new_session/default_values.py.ini b/tests/wpt/metadata/webdriver/tests/new_session/default_values.py.ini deleted file mode 100644 index f63217e0040..00000000000 --- a/tests/wpt/metadata/webdriver/tests/new_session/default_values.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[default_values.py] - [test_no_capabilites] - expected: FAIL - - [test_desired] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/new_session/websocket_url.py.ini b/tests/wpt/metadata/webdriver/tests/new_session/websocket_url.py.ini deleted file mode 100644 index 39d8fea21d9..00000000000 --- a/tests/wpt/metadata/webdriver/tests/new_session/websocket_url.py.ini +++ /dev/null @@ -1,4 +0,0 @@ -[websocket_url.py] - [test_websocket_url] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/new_window/new.py.ini b/tests/wpt/metadata/webdriver/tests/new_window/new.py.ini deleted file mode 100644 index 30e8e074bb5..00000000000 --- a/tests/wpt/metadata/webdriver/tests/new_window/new.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[new.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/new_window/new_tab.py.ini b/tests/wpt/metadata/webdriver/tests/new_window/new_tab.py.ini deleted file mode 100644 index 22597eb922f..00000000000 --- a/tests/wpt/metadata/webdriver/tests/new_window/new_tab.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[new_tab.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/new_window/new_window.py.ini b/tests/wpt/metadata/webdriver/tests/new_window/new_window.py.ini deleted file mode 100644 index 756cd0f47ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/new_window/new_window.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[new_window.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/new_window/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/new_window/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/new_window/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/key.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/key.py.ini deleted file mode 100644 index bf80535760b..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/key.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[key.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/key_events.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/key_events.py.ini deleted file mode 100644 index 68c19e2627f..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/key_events.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[key_events.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/key_modifiers.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/key_modifiers.py.ini deleted file mode 100644 index 0a9bba6cfbb..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/key_modifiers.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[key_modifiers.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/key_shortcuts.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/key_shortcuts.py.ini deleted file mode 100644 index 0d4aa28ecd0..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/key_shortcuts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[key_shortcuts.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/key_special_keys.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/key_special_keys.py.ini deleted file mode 100644 index 884da889d55..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/key_special_keys.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[key_special_keys.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/none.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/none.py.ini deleted file mode 100644 index ec77f667fdb..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/none.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[none.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_contextmenu.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_contextmenu.py.ini deleted file mode 100644 index 7412bb21936..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_contextmenu.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pointer_contextmenu.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_dblclick.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_dblclick.py.ini deleted file mode 100644 index c64821cedbf..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_dblclick.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pointer_dblclick.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_modifier_click.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_modifier_click.py.ini deleted file mode 100644 index c16effba740..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_modifier_click.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pointer_modifier_click.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_origin.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_origin.py.ini deleted file mode 100644 index 22a2f55ad85..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_origin.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pointer_origin.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_pause_dblclick.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_pause_dblclick.py.ini deleted file mode 100644 index 0eb6a8e44e0..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_pause_dblclick.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pointer_pause_dblclick.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_tripleclick.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_tripleclick.py.ini deleted file mode 100644 index 83557144ecb..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/pointer_tripleclick.py.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pointer_tripleclick.py] - [test_tripleclick_at_coordinates] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/sequence.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/sequence.py.ini deleted file mode 100644 index e9516632778..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/sequence.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[sequence.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/validity.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/validity.py.ini deleted file mode 100644 index 688ed0747e4..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/validity.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[validity.py] - [test_pause_positive_integer[key\]] - expected: FAIL - - [test_pause_positive_integer[none\]] - expected: FAIL - - [test_pause_positive_integer[pointer\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/perform_actions/wheel.py.ini b/tests/wpt/metadata/webdriver/tests/perform_actions/wheel.py.ini deleted file mode 100644 index 7dd26e0d083..00000000000 --- a/tests/wpt/metadata/webdriver/tests/perform_actions/wheel.py.ini +++ /dev/null @@ -1,19 +0,0 @@ -[wheel.py] - [test_wheel_scroll_overflow] - expected: FAIL - - [test_null_response_value] - expected: FAIL - - [test_wheel_scroll] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - - [test_no_browsing_context] - expected: ERROR - - [test_wheel_scroll_iframe] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/permissions/set.py.ini b/tests/wpt/metadata/webdriver/tests/permissions/set.py.ini deleted file mode 100644 index 4755401387d..00000000000 --- a/tests/wpt/metadata/webdriver/tests/permissions/set.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[set.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/print/printcmd.py.ini b/tests/wpt/metadata/webdriver/tests/print/printcmd.py.ini deleted file mode 100644 index 4893ae6742e..00000000000 --- a/tests/wpt/metadata/webdriver/tests/print/printcmd.py.ini +++ /dev/null @@ -1,37 +0,0 @@ -[printcmd.py] - [test_invalid[options4\]] - expected: FAIL - - [test_invalid[options6\]] - expected: FAIL - - [test_invalid[options5\]] - expected: FAIL - - [test_invalid[options7\]] - expected: FAIL - - [test_invalid[options3\]] - expected: FAIL - - [test_invalid[options8\]] - expected: FAIL - - [test_invalid[options2\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_invalid[options0\]] - expected: FAIL - - [test_html_document] - expected: FAIL - - [test_invalid[options1\]] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/print/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/print/user_prompts.py.ini deleted file mode 100644 index 1af95add6bf..00000000000 --- a/tests/wpt/metadata/webdriver/tests/print/user_prompts.py.ini +++ /dev/null @@ -1,55 +0,0 @@ -[user_prompts.py] - [test_accept_and_notify[capabilities0-prompt-\]] - expected: FAIL - - [test_dismiss[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-prompt-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss_and_notify[capabilities0-confirm-False\]] - expected: FAIL - - [test_default[alert-None\]] - expected: FAIL - - [test_accept[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-confirm-True\]] - expected: FAIL - - [test_accept[capabilities0-alert-None\]] - expected: FAIL - - [test_ignore[capabilities0-prompt\]] - expected: FAIL - - [test_default[confirm-False\]] - expected: FAIL - - [test_ignore[capabilities0-alert\]] - expected: FAIL - - [test_ignore[capabilities0-confirm\]] - expected: FAIL - - [test_accept_and_notify[capabilities0-alert-None\]] - expected: FAIL - - [test_dismiss[capabilities0-prompt-None\]] - expected: FAIL - - [test_accept[capabilities0-prompt-\]] - expected: FAIL - - [test_default[prompt-None\]] - expected: FAIL - - [test_dismiss[capabilities0-confirm-False\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/refresh/refresh.py.ini b/tests/wpt/metadata/webdriver/tests/refresh/refresh.py.ini deleted file mode 100644 index fcb452562ce..00000000000 --- a/tests/wpt/metadata/webdriver/tests/refresh/refresh.py.ini +++ /dev/null @@ -1,13 +0,0 @@ -[refresh.py] - [test_history_pushstate] - expected: FAIL - - [test_refresh_switches_to_parent_browsing_context] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/refresh/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/refresh/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/refresh/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/release_actions/release.py.ini b/tests/wpt/metadata/webdriver/tests/release_actions/release.py.ini deleted file mode 100644 index a6f314a14f1..00000000000 --- a/tests/wpt/metadata/webdriver/tests/release_actions/release.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[release.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/release_actions/sequence.py.ini b/tests/wpt/metadata/webdriver/tests/release_actions/sequence.py.ini deleted file mode 100644 index e9516632778..00000000000 --- a/tests/wpt/metadata/webdriver/tests/release_actions/sequence.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[sequence.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/send_alert_text/send.py.ini b/tests/wpt/metadata/webdriver/tests/send_alert_text/send.py.ini deleted file mode 100644 index 50e85bc2662..00000000000 --- a/tests/wpt/metadata/webdriver/tests/send_alert_text/send.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[send.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/set_timeouts/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/set_timeouts/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/set_timeouts/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/set_window_rect/set.py.ini b/tests/wpt/metadata/webdriver/tests/set_window_rect/set.py.ini deleted file mode 100644 index 6f4b65d41ee..00000000000 --- a/tests/wpt/metadata/webdriver/tests/set_window_rect/set.py.ini +++ /dev/null @@ -1,46 +0,0 @@ -[set.py] - [test_restore_from_maximized] - expected: FAIL - - [test_height_width_smaller_than_minimum_browser_size] - expected: FAIL - - [test_x_y] - expected: FAIL - - [test_width_height_floats] - expected: FAIL - - [test_x_y_floats] - expected: FAIL - - [test_restore_from_minimized] - expected: FAIL - - [test_height_width] - expected: FAIL - - [test_height_as_current] - expected: FAIL - - [test_y_as_current] - expected: FAIL - - [test_fully_exit_fullscreen] - expected: FAIL - - [test_x_as_current] - expected: FAIL - - [test_width_as_current] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - - [test_height_width_larger_than_max] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/set_window_rect/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/set_window_rect/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/set_window_rect/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch.py.ini b/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch.py.ini deleted file mode 100644 index 352eb655d33..00000000000 --- a/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch.py.ini +++ /dev/null @@ -1,46 +0,0 @@ -[switch.py] - [test_frame_id_number_index[1-bar\]] - expected: FAIL - - [test_frame_id_webelement_frame[1-bar\]] - expected: FAIL - - [test_frame_id_webelement_frame[0-foo\]] - expected: FAIL - - [test_frame_id_number_index_out_of_bounds] - expected: FAIL - - [test_frame_id_number_index[0-foo\]] - expected: FAIL - - [test_no_browsing_context] - expected: ERROR - - [test_frame_deleted] - expected: FAIL - - [test_no_top_browsing_context[id2\]] - expected: FAIL - - [test_no_top_browsing_context[None\]] - expected: FAIL - - [test_no_top_browsing_context[0\]] - expected: FAIL - - [test_no_browsing_context[None\]] - expected: ERROR - - [test_no_browsing_context[0\]] - expected: ERROR - - [test_no_browsing_context[id2\]] - expected: ERROR - - [test_no_browsing_context_when_already_top_level] - expected: ERROR - - [test_frame_id_null] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch_number.py.ini b/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch_number.py.ini deleted file mode 100644 index 67a9320f98c..00000000000 --- a/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch_number.py.ini +++ /dev/null @@ -1,16 +0,0 @@ -[switch_number.py] - [test_frame_id_number_index[1-bar\]] - expected: FAIL - - [test_frame_id_number_index_nested] - expected: FAIL - - [test_frame_id_number_index_out_of_bounds[65535\]] - expected: FAIL - - [test_frame_id_number_index[0-foo\]] - expected: FAIL - - [test_frame_id_number_index_out_of_bounds[1\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch_webelement.py.ini b/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch_webelement.py.ini deleted file mode 100644 index 5ed6b633e40..00000000000 --- a/tests/wpt/metadata/webdriver/tests/switch_to_frame/switch_webelement.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[switch_webelement.py] - [test_frame_id_webelement_frame[1-bar\]] - expected: FAIL - - [test_frame_id_webelement_frame[0-foo\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/switch_to_parent_frame/switch.py.ini b/tests/wpt/metadata/webdriver/tests/switch_to_parent_frame/switch.py.ini deleted file mode 100644 index 9078c1ff879..00000000000 --- a/tests/wpt/metadata/webdriver/tests/switch_to_parent_frame/switch.py.ini +++ /dev/null @@ -1,19 +0,0 @@ -[switch.py] - [test_no_browsing_context] - expected: ERROR - - [test_switch_from_top_level] - expected: FAIL - - [test_no_parent_browsing_context] - expected: FAIL - - [test_no_top_browsing_context] - expected: FAIL - - [test_no_browsing_context_when_already_top_level] - expected: ERROR - - [test_switch_from_iframe] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/switch_to_window/alerts.py.ini b/tests/wpt/metadata/webdriver/tests/switch_to_window/alerts.py.ini deleted file mode 100644 index 54f21a5b471..00000000000 --- a/tests/wpt/metadata/webdriver/tests/switch_to_window/alerts.py.ini +++ /dev/null @@ -1,4 +0,0 @@ -[alerts.py] - [test_retain_tab_modal_status] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/switch_to_window/switch.py.ini b/tests/wpt/metadata/webdriver/tests/switch_to_window/switch.py.ini deleted file mode 100644 index c0d1ff01cdb..00000000000 --- a/tests/wpt/metadata/webdriver/tests/switch_to_window/switch.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[switch.py] - disabled: Unimplemented WebDriver command diff --git a/tests/wpt/metadata/webdriver/tests/take_element_screenshot/iframe.py.ini b/tests/wpt/metadata/webdriver/tests/take_element_screenshot/iframe.py.ini deleted file mode 100644 index 2d6c14f5351..00000000000 --- a/tests/wpt/metadata/webdriver/tests/take_element_screenshot/iframe.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[iframe.py] - [test_source_origin[cross_origin\]] - expected: FAIL - - [test_source_origin[same_origin\]] - expected: FAIL - - [test_frame_element] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/take_element_screenshot/screenshot.py.ini b/tests/wpt/metadata/webdriver/tests/take_element_screenshot/screenshot.py.ini deleted file mode 100644 index af6223076e1..00000000000 --- a/tests/wpt/metadata/webdriver/tests/take_element_screenshot/screenshot.py.ini +++ /dev/null @@ -1,10 +0,0 @@ -[screenshot.py] - [test_no_browsing_context] - expected: ERROR - - [test_format_and_dimensions] - expected: FAIL - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/take_element_screenshot/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/take_element_screenshot/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/take_element_screenshot/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented diff --git a/tests/wpt/metadata/webdriver/tests/take_screenshot/iframe.py.ini b/tests/wpt/metadata/webdriver/tests/take_screenshot/iframe.py.ini deleted file mode 100644 index 6a671eb554c..00000000000 --- a/tests/wpt/metadata/webdriver/tests/take_screenshot/iframe.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[iframe.py] - [test_source_origin[cross_origin\]] - expected: FAIL - - [test_source_origin[same_origin\]] - expected: FAIL - diff --git a/tests/wpt/metadata/webdriver/tests/take_screenshot/screenshot.py.ini b/tests/wpt/metadata/webdriver/tests/take_screenshot/screenshot.py.ini deleted file mode 100644 index c641aacb3ab..00000000000 --- a/tests/wpt/metadata/webdriver/tests/take_screenshot/screenshot.py.ini +++ /dev/null @@ -1,7 +0,0 @@ -[screenshot.py] - [test_no_browsing_context] - expected: ERROR - - [test_no_top_browsing_context] - expected: ERROR - diff --git a/tests/wpt/metadata/webdriver/tests/take_screenshot/user_prompts.py.ini b/tests/wpt/metadata/webdriver/tests/take_screenshot/user_prompts.py.ini deleted file mode 100644 index b41ce3d02ae..00000000000 --- a/tests/wpt/metadata/webdriver/tests/take_screenshot/user_prompts.py.ini +++ /dev/null @@ -1,2 +0,0 @@ -[user_prompts.py] - disabled: User prompts not yet implemented 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 new file mode 100644 index 00000000000..b7b36c1d3a4 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini @@ -0,0 +1,4 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini new file mode 100644 index 00000000000..b7b36c1d3a4 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini @@ -0,0 +1,4 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT diff --git a/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini b/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini new file mode 100644 index 00000000000..aa6c9e5b826 --- /dev/null +++ b/tests/wpt/metadata/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html.ini @@ -0,0 +1,4 @@ +[localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html] + expected: TIMEOUT + [StorageKey: test 3P about:blank window opened from a 3P iframe] + expected: TIMEOUT diff --git a/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini b/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini deleted file mode 100644 index d0154d3e5d7..00000000000 --- a/tests/wpt/metadata/workers/dedicated-worker-from-blob-url.window.js.ini +++ /dev/null @@ -1,3 +0,0 @@ -[dedicated-worker-from-blob-url.window.html] - [Creating a dedicated worker from a blob URL works immediately before revoking.] - expected: FAIL diff --git a/tests/wpt/web-platform-tests/.azure-pipelines.yml b/tests/wpt/web-platform-tests/.azure-pipelines.yml index a21ebce6bc7..efa5ee18a1d 100644 --- a/tests/wpt/web-platform-tests/.azure-pipelines.yml +++ b/tests/wpt/web-platform-tests/.azure-pipelines.yml @@ -21,6 +21,7 @@ trigger: - triggers/edge_canary - triggers/safari_stable - triggers/safari_preview +- triggers/wktr_preview # Set safaridriver_diagnose to true to enable safaridriver diagnostics. The # logs won't appear in `./wpt run` output but will be uploaded as an artifact. @@ -575,7 +576,7 @@ jobs: - 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 + ./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 experimental --install-browser --yes wktr displayName: 'Run tests' - task: PublishBuildArtifacts@1 displayName: 'Publish results' diff --git a/tests/wpt/web-platform-tests/.github/workflows/documentation.yml b/tests/wpt/web-platform-tests/.github/workflows/documentation.yml index 14c52ebc40c..4f1f3b2ed38 100644 --- a/tests/wpt/web-platform-tests/.github/workflows/documentation.yml +++ b/tests/wpt/web-platform-tests/.github/workflows/documentation.yml @@ -19,9 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - # Documentation is generated using Python 3.9 due to spinx-js not - # supporting 3.10: https://github.com/mozilla/sphinx-js/issues/186 - python-version: '3.9' + python-version: '3.10' - name: Set up Node uses: actions/setup-node@v3 with: diff --git a/tests/wpt/web-platform-tests/.taskcluster.yml b/tests/wpt/web-platform-tests/.taskcluster.yml index c80e92af204..c817999b8e6 100644 --- a/tests/wpt/web-platform-tests/.taskcluster.yml +++ b/tests/wpt/web-platform-tests/.taskcluster.yml @@ -57,7 +57,7 @@ tasks: owner: ${owner} source: ${event.repository.clone_url} payload: - image: webplatformtests/wpt:0.53 + image: webplatformtests/wpt:0.54 maxRunTime: 7200 artifacts: public/results: diff --git a/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py b/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py index 9682a6dd24d..2511dd67cd7 100644 --- a/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py +++ b/tests/wpt/web-platform-tests/attribution-reporting/resources/reports.py @@ -1,6 +1,7 @@ """Methods for the report-event-attribution and report-aggregate-attribution endpoints""" import json from typing import List, Optional, Tuple, TypedDict +import urllib.parse from wptserve.request import Request from wptserve.stash import Stash @@ -8,14 +9,15 @@ from wptserve.utils import isomorphic_decode, isomorphic_encode # Key used to access the reports in the stash. REPORTS = "4691a2d7fca5430fb0f33b1bd8a9d388" +REDIRECT = "9250f93f-2c05-4aae-83b9-2817b0e18b4e" CLEAR_STASH = isomorphic_encode("clear_stash") +CONFIG_REDIRECT = isomorphic_encode("redirect_to") Header = Tuple[str, str] Status = Tuple[int, str] Response = Tuple[Status, List[Header], str] - def decode_headers(headers: dict) -> dict: """Decodes the headers from wptserve. @@ -35,6 +37,20 @@ def get_request_origin(request: Request) -> str: return "%s://%s" % (request.url_parts.scheme, request.url_parts.netloc) +def configure_redirect(request, origin) -> None: + with request.server.stash.lock: + request.server.stash.put(REDIRECT, origin) + return None + +def get_report_redirect_url(request): + with request.server.stash.lock: + origin = request.server.stash.take(REDIRECT) + if origin is None: + return None + origin_parts = urllib.parse.urlsplit(origin) + parts = request.url_parts + new_parts = origin_parts._replace(path=bytes(parts.path, 'utf-8')) + return urllib.parse.urlunsplit(new_parts) def handle_post_report(request: Request, headers: List[Header]) -> Response: """Handles POST request for reports. @@ -48,6 +64,22 @@ def handle_post_report(request: Request, headers: List[Header]) -> Response: "code": 200, "message": "Stash successfully cleared.", }) + + redirect_origin = request.GET.get(CONFIG_REDIRECT) + if redirect_origin: + configure_redirect(request, redirect_origin) + return (200, "OK"), headers, json.dumps({ + "code": 200, + "message": "Redirect successfully configured.", + }) + + redirect_url = get_report_redirect_url(request) + if redirect_url is not None: + headers.append(("Location", redirect_url)) + return (308, "Permanent Redirect"), headers, json.dumps({ + "code": 308 + }) + store_report( request.server.stash, get_request_origin(request), { "body": request.body.decode("utf-8"), @@ -87,6 +119,7 @@ def store_report(stash: Stash, origin: str, report: str) -> None: def clear_stash(stash: Stash) -> None: "Clears the stash." stash.take(REPORTS) + stash.take(REDIRECT) return None def take_reports(stash: Stash, origin: str) -> List[str]: diff --git a/tests/wpt/web-platform-tests/audio-output/enumerateDevices-with-selectAudioOutput.https.html b/tests/wpt/web-platform-tests/audio-output/enumerateDevices-with-selectAudioOutput.https.html index 51da44286a7..c1a825592a6 100644 --- a/tests/wpt/web-platform-tests/audio-output/enumerateDevices-with-selectAudioOutput.https.html +++ b/tests/wpt/web-platform-tests/audio-output/enumerateDevices-with-selectAudioOutput.https.html @@ -40,9 +40,9 @@ promise_test(async () => { const outputDevices = devices.filter(info => info.kind == "audiooutput"); assert_equals(outputDevices.length, 1, "number of audiooutput devices."); assert_not_equals(selected, undefined); - const info = outputDevices[0]; - assert_equals(info.deviceId, selected.deviceId); - assert_equals(info.groupId, selected.groupId); - assert_equals(info.label, selected.label); + const [info] = outputDevices; + assert_equals(info.deviceId, selected.deviceId, "deviceId exposed"); + assert_equals(info.groupId, selected.groupId, "groupId exposed"); + assert_equals(info.label, selected.label, "label exposed"); }, "enumerateDevices() after selectAudioOutput()"); </script> diff --git a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-name-unicode.https.window.js b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-name-unicode.https.window.js index 23de63d293f..3458c92b65e 100644 --- a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-name-unicode.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-name-unicode.https.window.js @@ -9,7 +9,7 @@ const expected = new DOMException( 'Failed to execute \'requestDevice\' on \'Bluetooth\': ' + 'A device name can\'t be longer than 248 bytes.', new TypeError()); -// \u2764's UTF-8 respresentation is 3 bytes long. +// \u2764's UTF-8 representation is 3 bytes long. // 83 chars * 3 bytes/char = 249 bytes const unicode_name = '\u2764'.repeat(83); diff --git a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-namePrefix-unicode.https.window.js b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-namePrefix-unicode.https.window.js index aa832b2e764..b2e6668e4b9 100644 --- a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-namePrefix-unicode.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-namePrefix-unicode.https.window.js @@ -9,7 +9,7 @@ const expected = new DOMException( 'Failed to execute \'requestDevice\' on \'Bluetooth\': ' + 'A device name can\'t be longer than 248 bytes.', new TypeError()); -// \u2764's UTF-8 respresentation is 3 bytes long. +// \u2764's UTF-8 representation is 3 bytes long. // 83 chars * 3 bytes/char = 249 bytes const unicode_name = '\u2764'.repeat(83); diff --git a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-name-unicode.https.window.js b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-name-unicode.https.window.js index 1232a030e9d..6a3cf5bead0 100644 --- a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-name-unicode.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-name-unicode.https.window.js @@ -4,7 +4,7 @@ // META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'A unicode device name of 248 bytes is valid.'; -// \u00A1's UTF-8 respresentation is 2 bytes long. +// \u00A1's UTF-8 representation is 2 bytes long. // 124 chars * 2 bytes/char = 248 bytes const DEVICE_NAME = '\u00A1'.repeat(124); diff --git a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-namePrefix-unicode.https.window.js b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-namePrefix-unicode.https.window.js index 2932dc1cde5..2061e9863b4 100644 --- a/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-namePrefix-unicode.https.window.js +++ b/tests/wpt/web-platform-tests/bluetooth/requestDevice/canonicalizeFilter/max-length-namePrefix-unicode.https.window.js @@ -4,7 +4,7 @@ // META: script=/bluetooth/resources/bluetooth-fake-devices.js 'use strict'; const test_desc = 'A unicode device namePrefix of 248 bytes is valid.'; -// \u00A1's UTF-8 respresentation is 2 bytes long. +// \u00A1's UTF-8 representation is 2 bytes long. // 124 chars * 2 bytes/char = 248 bytes const DEVICE_NAME = '\u00A1'.repeat(124); diff --git a/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-default.tentative.https.sub.html b/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-default.tentative.https.sub.html index 884ad9276a1..8467ab65691 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-default.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-default.tentative.https.sub.html @@ -2,7 +2,7 @@ <body> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> - <script src=/browsing-topics/resources/navigation-header-util.sub.js></script> + <script src=/browsing-topics/resources/header-util.sub.js></script> <script src=/browsing-topics/resources/permissions-policy-util.sub.js></script> <script> 'use strict'; @@ -30,13 +30,13 @@ promise_test(async t => { let response = await fetch(same_origin_url, {browsingTopics: true}); let topics_header = await response.text(); - assert_equals(topics_header, ""); + assert_equals(topics_header, EMPTY_TOPICS_HEADER); }, header + 'allows the \'Sec-Browsing-Topics\' header to be sent for the same-origin topics fetch request.'); promise_test(async t => { let response = await fetch(cross_origin_url, {browsingTopics: true}); let topics_header = await response.text(); - assert_equals(topics_header, ""); + assert_equals(topics_header, EMPTY_TOPICS_HEADER); }, header + 'allows the \'Sec-Browsing-Topics\' header to be sent for the cross-origin topics fetch request.'); async_test(t => { diff --git a/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-none.tentative.https.sub.html b/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-none.tentative.https.sub.html index 2f80daa2714..23bac4381f0 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-none.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-none.tentative.https.sub.html @@ -2,7 +2,7 @@ <body> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> - <script src=/browsing-topics/resources/navigation-header-util.sub.js></script> + <script src=/browsing-topics/resources/header-util.sub.js></script> <script src=/browsing-topics/resources/permissions-policy-util.sub.js></script> <script> 'use strict'; diff --git a/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-self.tentative.https.sub.html b/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-self.tentative.https.sub.html index 60126679479..91ee4f05f3a 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-self.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/browsing-topics/browsing-topics-permissions-policy-self.tentative.https.sub.html @@ -2,7 +2,7 @@ <body> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> - <script src=/browsing-topics/resources/navigation-header-util.sub.js></script> + <script src=/browsing-topics/resources/header-util.sub.js></script> <script src=/browsing-topics/resources/permissions-policy-util.sub.js></script> <script> 'use strict'; @@ -30,7 +30,7 @@ promise_test(async t => { let response = await fetch(same_origin_url, {browsingTopics: true}); let topics_header = await response.text(); - assert_equals(topics_header, ""); + assert_equals(topics_header, EMPTY_TOPICS_HEADER); }, header + 'allows the \'Sec-Browsing-Topics\' header to be sent for the same-origin topics fetch request.'); promise_test(async t => { @@ -42,7 +42,7 @@ promise_test(async t => { let response = await fetch('/common/redirect.py?location=' + same_origin_url, {browsingTopics: true}); let topics_header = await response.text(); - assert_equals(topics_header, ""); + assert_equals(topics_header, EMPTY_TOPICS_HEADER); }, header + 'allows the \'Sec-Browsing-Topics\' header to be sent for the redirect of a topics fetch request, where the redirect has a same-origin URL.'); promise_test(async t => { diff --git a/tests/wpt/web-platform-tests/browsing-topics/fetch-topics.tentative.https.html b/tests/wpt/web-platform-tests/browsing-topics/fetch-topics.tentative.https.html index e5dd1d9b986..c33d4dd11d8 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/fetch-topics.tentative.https.html +++ b/tests/wpt/web-platform-tests/browsing-topics/fetch-topics.tentative.https.html @@ -2,6 +2,7 @@ <body> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> + <script src=/browsing-topics/resources/header-util.sub.js></script> <script> promise_test(async t => { let response = await fetch('./resources/check-topics-request-header.py', {browsingTopics: true}); @@ -10,7 +11,7 @@ // An empty result indicates that the request was eligible for topics. // Currently, the web-platform-tests framework does not support actually // handling the topics request. - assert_equals(topics_header, ""); + assert_equals(topics_header, EMPTY_TOPICS_HEADER); }, 'test fetch(<url>, {browsingTopics: true})'); </script> </body> diff --git a/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute-insecure-context.tentative.http.sub.html b/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute-insecure-context.tentative.http.sub.html index 19c79e0d7f0..8e25b769cec 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute-insecure-context.tentative.http.sub.html +++ b/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute-insecure-context.tentative.http.sub.html @@ -2,7 +2,7 @@ <body> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> - <script src=/browsing-topics/resources/navigation-header-util.sub.js></script> + <script src=/browsing-topics/resources/header-util.sub.js></script> <script> async_test(t => { test_topics_iframe_navigation_header( diff --git a/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute.tentative.https.html b/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute.tentative.https.html index b90f967146c..7b3b6c70450 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute.tentative.https.html +++ b/tests/wpt/web-platform-tests/browsing-topics/iframe-topics-attribute.tentative.https.html @@ -2,7 +2,7 @@ <body> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> - <script src=/browsing-topics/resources/navigation-header-util.sub.js></script> + <script src=/browsing-topics/resources/header-util.sub.js></script> <script> async_test(t => { test_topics_iframe_navigation_header( diff --git a/tests/wpt/web-platform-tests/browsing-topics/resources/navigation-header-util.sub.js b/tests/wpt/web-platform-tests/browsing-topics/resources/header-util.sub.js index b3bec79651d..c38e5aa59d8 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/resources/navigation-header-util.sub.js +++ b/tests/wpt/web-platform-tests/browsing-topics/resources/header-util.sub.js @@ -1,3 +1,5 @@ +const EMPTY_TOPICS_HEADER = 't=(), p=P000000000000000000000000000'; + function test_topics_iframe_navigation_header( test, has_browsing_topics_attribute, is_same_origin, expect_topics_header_available_func) { const same_origin_src = '/browsing-topics/resources/check-topics-request-header-notify-parent.py'; @@ -32,5 +34,5 @@ function expect_topics_header_available(data) { // An empty result indicates that the request was eligible for topics. // Currently, the web-platform-tests framework does not support actually // handling the topics request. - assert_equals(data.topicsHeader, ''); + assert_equals(data.topicsHeader, EMPTY_TOPICS_HEADER); }
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/browsing-topics/xhr-topics.tentative.https.html b/tests/wpt/web-platform-tests/browsing-topics/xhr-topics.tentative.https.html index 532a0404240..fcca74a1ce5 100644 --- a/tests/wpt/web-platform-tests/browsing-topics/xhr-topics.tentative.https.html +++ b/tests/wpt/web-platform-tests/browsing-topics/xhr-topics.tentative.https.html @@ -2,6 +2,7 @@ <body> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> + <script src=/browsing-topics/resources/header-util.sub.js></script> <script> promise_test(async t => { const xhr = new XMLHttpRequest(); @@ -12,7 +13,7 @@ // An empty result indicates that the request was eligible for // topics. Currently, the web-platform-tests framework does not // support actually handling the topics request. - assert_equals(xhr.responseText, ""); + assert_equals(xhr.responseText, EMPTY_TOPICS_HEADER); resolve(); } } diff --git a/tests/wpt/web-platform-tests/compression/compression-large-flush-output.any.js b/tests/wpt/web-platform-tests/compression/compression-large-flush-output.any.js new file mode 100644 index 00000000000..c7455807fb2 --- /dev/null +++ b/tests/wpt/web-platform-tests/compression/compression-large-flush-output.any.js @@ -0,0 +1,41 @@ +// META: global=window,worker +// META: script=third_party/pako/pako_inflate.min.js +// META: script=resources/concatenate-stream.js +// META: timeout=long + +'use strict'; + +// This test verifies that a large flush output will not truncate the +// final results. + +async function compressData(chunk, format) { + const cs = new CompressionStream(format); + const writer = cs.writable.getWriter(); + writer.write(chunk); + writer.close(); + return await concatenateStream(cs.readable); +} + +// JSON-encoded array of 10 thousands numbers ("[0,1,2,...]"). This produces 48_891 bytes of data. +const fullData = new TextEncoder().encode(JSON.stringify(Array.from({ length: 10_000 }, (_, i) => i))); +const data = fullData.subarray(0, 35_579); +const expectedValue = data; + +promise_test(async t => { + const compressedData = await compressData(data, 'deflate'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); +}, `deflate compression with large flush output`); + +promise_test(async t => { + const compressedData = await compressData(data, 'gzip'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); +}, `gzip compression with large flush output`); + +promise_test(async t => { + const compressedData = await compressData(data, 'deflate-raw'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflateRaw(compressedData), 'value should match'); +}, `deflate-raw compression with large flush output`); + diff --git a/tests/wpt/web-platform-tests/credential-management/credentialscontainer-prevent-silent-access.https.html b/tests/wpt/web-platform-tests/credential-management/credentialscontainer-prevent-silent-access.https.html new file mode 100644 index 00000000000..5a83e556a73 --- /dev/null +++ b/tests/wpt/web-platform-tests/credential-management/credentialscontainer-prevent-silent-access.https.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>Credential Management API: preventSilentAccess().</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +promise_test(function() { + return navigator.credentials.preventSilentAccess() + .then((result) => { + assert_equals(result, undefined); + }); +}, "navigator.credentials.preventSilentAccess() resolves with undefined."); +</script> diff --git a/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html b/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html index 73d83de9119..62c0791ab48 100644 --- a/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html +++ b/tests/wpt/web-platform-tests/credential-management/fedcm-network-requests.https.html @@ -211,6 +211,9 @@ credential-management/support/fedcm/userinfo-iframe.html`; assert_equals(message.result, "Pass"); assert_equals(message.numAccounts, 1); assert_equals(message.firstAccountEmail, "john_doe@idp.example"); + assert_equals(message.firstAccountName, "John Doe"); + assert_equals(message.firstAccountGivenName, "John"); + assert_equals(message.firstAccountPicture, "https://idp.example/profile/123"); }, 'Test basic User InFo API flow'); fedcm_test(async t => { diff --git a/tests/wpt/web-platform-tests/credential-management/support/fedcm/userinfo-iframe.html b/tests/wpt/web-platform-tests/credential-management/support/fedcm/userinfo-iframe.html index 1a38c405af1..45a1a34ce9e 100644 --- a/tests/wpt/web-platform-tests/credential-management/support/fedcm/userinfo-iframe.html +++ b/tests/wpt/web-platform-tests/credential-management/support/fedcm/userinfo-iframe.html @@ -22,7 +22,10 @@ credential-management/support/fedcm/manifest.py`; let results = { result: "Pass", numAccounts: user_info.length, - firstAccountEmail: user_info[0].email + firstAccountEmail: user_info[0].email, + firstAccountName: user_info[0].name, + firstAccountGivenName: user_info[0].givenName, + firstAccountPicture: user_info[0].picture }; window.top.postMessage(results, '*'); } catch (error) { diff --git a/tests/wpt/web-platform-tests/css/CSS2/floats/float-root.html b/tests/wpt/web-platform-tests/css/CSS2/floats/float-root.html index ee7f70e7844..944ae7ad5f4 100644 --- a/tests/wpt/web-platform-tests/css/CSS2/floats/float-root.html +++ b/tests/wpt/web-platform-tests/css/CSS2/floats/float-root.html @@ -1,5 +1,5 @@ <!DOCTYPe html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css2/#propdef-float"> +<link rel="help" href="https://drafts.csswg.org/css2/#propdef-float"> <link rel="match" href="float-root-ref.html"> <style> diff --git a/tests/wpt/web-platform-tests/css/CSS2/text/text-align-white-space-003.xht b/tests/wpt/web-platform-tests/css/CSS2/text/text-align-white-space-003.xht deleted file mode 100644 index 947e869223e..00000000000 --- a/tests/wpt/web-platform-tests/css/CSS2/text/text-align-white-space-003.xht +++ /dev/null @@ -1,51 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>CSS Test: Text-align set to 'justify' with 'white-space' set to 'pre-wrap'</title> - <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> - <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-06-28 --> - <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#alignment-prop" /> - <link rel="match" href="text-align-white-space-002-ref.xht" /> - - <meta name="flags" content="ahem may" /> <!-- "may" because level 3 makes it no longer mandatory --> - <link rel="help" href="https://drafts.csswg.org/css-text-3/#text-align-property" /> - <meta name="assert" content="Setting 'text-align' to 'justify' and 'white-space' to 'pre-wrap', text-align is computed to its initial value." /> - <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> - <style type="text/css"> - div - { - font: 20px/1 Ahem; - position: relative; - width: 9em; - } - div div - { - position: absolute; - } - #test - { - color: green; - text-align: justify; - white-space: pre-wrap; - } - .red - { - color: red; - } - .green - { - color: green; - } - </style> - </head> - <body> - <p>Test passes if there is <strong>no red</strong>.</p> - <div> - <div><span class="red">xxx</span><span class="green">x</span><span class="red">xxx</span><span class="green">xx</span> - <span class="red">xxx</span><span class="green">x</span><span class="red">xxx</span><span class="green">xx</span> - <span class="red">xxx</span><span class="green">x</span><span class="red">xxx</span><span class="green">xx</span> - <span class="red">xxx</span><span class="green">x</span><span class="red">xxx</span><span class="green">xx</span></div> - <div id="test">XXX XXX XXX XXX XXX XXX XXX XXX</div> - </div> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-align/animation/justify-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-align/animation/justify-no-interpolation.html index a242fb73e90..b72ccdc4355 100644 --- a/tests/wpt/web-platform-tests/css/css-align/animation/justify-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-align/animation/justify-no-interpolation.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-align/#justify-items-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-align/#justify-self-property"> +<link rel=help href="https://drafts.csswg.org/css-align/#justify-items-property"> +<link rel=help href="https://drafts.csswg.org/css-align/#justify-self-property"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-getComputedStyle.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-getComputedStyle.html index cce571c4d0d..6d77cf9a9d4 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-getComputedStyle.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-getComputedStyle.html @@ -2,7 +2,7 @@ <meta charset="utf-8"> <title>Tests that getComputedStyle() resolves anchor functions</title> <link rel="help" href="https://drafts4.csswg.org/css-anchor-position-1"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/cssom/#resolved-value"> +<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-value"> <link rel="author" href="mailto:xiaochengh@chromium.org"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-003.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-003.html new file mode 100644 index 00000000000..87d8153e7e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-003.html @@ -0,0 +1,76 @@ +<!DOCTYPE html> +<title>Tests anchor-scroll with fragmented containing block</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#scroll"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/test-common.js"></script> + +<style> +body { + margin: 0; +} +#multicol { + column-count: 3; + column-width: 90px; + column-gap: 10px; + width: 300px; + height: 100px; +} + +#cb { + height: 300px; + background: yellow; + position: relative; +} + +#spacer { + height: 110px; +} + +#scroller { + overflow-y: scroll; + height: 80px; + background: blue; +} + +#anchor { + anchor-name: --a; + width: 50px; + height: 50px; + background: orange; + position: relative; + top: 80px; +} + +#target { + position: absolute; + left: anchor(--a left); + bottom: anchor(--a top); + anchor-scroll: --a; + width: 50px; + height: 50px; + background: lime; +} +</style> + +<div id=multicol> + <div id=cb> + <div id=spacer></div> + <div id=scroller> + <div id=anchor></div> + </div> + <div id=target></div> + </div> +</div> + +<script> +promise_test(async () => { + scroller.scrollTop = 10; + await waitUntilNextAnimationFrame(); + await waitUntilNextAnimationFrame(); + + let targetRect = target.getBoundingClientRect(); + assert_equals(targetRect.top, 30); +}, 'anchor-scroll should work in fragmented containing block'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-004.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-004.html new file mode 100644 index 00000000000..ce66a27422c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-004.html @@ -0,0 +1,89 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Tests anchor-scroll with relatively positioned inline containers</title> +<link rel="help" href="https://drafts4.csswg.org/css-anchor-position-1/#scroll"> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/test-common.js"></script> + +<style> +body { + margin: 0; +} + +.cb { + position: relative; + font: 20px/1 Ahem, monospace; +} + +.scroller { + display: inline-block; + overflow-x: scroll; + width: 160px; + white-space: nowrap; +} + +.anchor { + anchor-name: --a; + color: orange; +} + +.target { + position: absolute; + anchor-scroll: --a; + top: anchor(--a bottom); + left: anchor(--a left); + color: lime; +} +</style> + +<div> + <span class="cb"> + <span class="scroller" id="scroller1"> + before + <span class="anchor" id="anchor1">anchor</span> + after + </span> + <span class="target" id="target1">target</span> + </span> + + <br> + <br> + + <span class="cb"> + <span class="scroller" id="scroller2"> + before + <span class="anchor" id="anchor2">anchor</span> + after + </span> + <span class="target" id="target2">target</span> + </span> +</div> + +<script> +promise_test(async () => { + await waitUntilNextAnimationFrame(); + await waitUntilNextAnimationFrame(); + + assert_equals(target1.getBoundingClientRect().left, 140); + assert_equals(target2.getBoundingClientRect().left, 140); +}, 'Initial position of the targets'); + +promise_test(async () => { + scroller1.scrollLeft = 20; + await waitUntilNextAnimationFrame(); + await waitUntilNextAnimationFrame(); + + assert_equals(target1.getBoundingClientRect().left, 120); +}, '#target1 should scroll with #anchor1'); + +promise_test(async () => { + scroller2.scrollLeft = 40; + await waitUntilNextAnimationFrame(); + await waitUntilNextAnimationFrame(); + + assert_equals(target2.getBoundingClientRect().left, 100); +}, '#target2 should scroll with #anchor2'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos.html index ee7d22608b6..ee7d22608b6 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-fixedpos.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-js-expose.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-js-expose.html index f19d010d359..f19d010d359 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-js-expose.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-js-expose.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-nested.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-nested.html index 964b02a5b04..964b02a5b04 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-nested.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-nested.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-001.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-001.html index 9400136e982..9400136e982 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-001.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-001.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-002.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-002.html index 4e8fcbe295d..4e8fcbe295d 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-002.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-002.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-003.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-003.html index 0d3ec2830cb..0d3ec2830cb 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-003.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-003.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-004.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-004.html index 7d1aadc95db..7d1aadc95db 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-004.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-004.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-005.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-005.html index 5675507a477..5675507a477 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-005.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-005.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-006.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-006.html index 7a8e675baa1..7a8e675baa1 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-006.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-006.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-007.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-007.html new file mode 100644 index 00000000000..b08bcc53ee7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-update-007.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>Fixed positioned anchored elements should update location on anchor's `anchor-name` property changes</title> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-anchor-1/"> +<link rel="match" href="reference/anchor-scroll-ref.html"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> +body { + font: 20px/1 Ahem; + margin: 0; +} + +#scroll-container { + width: 400px; + height: 400px; + overflow: scroll; +} + +#scroll-contents { + width: 1000px; + height: 1000px; + position: relative; +} + +#placefiller-above-anchor { + height: 500px; +} + +#placefiller-before-anchor { + display: inline-block; + width: 500px; +} + +#inner-anchored { + color: green; + position: absolute; + left: anchor(--anchor left); + bottom: anchor(--anchor top); + anchor-scroll: --anchor; +} + +#outer-anchored { + color: yellow; + position: fixed; + left: anchor(--anchor left); + top: anchor(--anchor bottom); + anchor-scroll: --anchor; +} +</style> + +<div style="position: relative"> + <div id="scroll-container"> + <div id="scroll-contents"> + <div id="placefiller-above-anchor"></div> + <div id="placefiller-before-anchor"></div> + <span id="anchor">anchor</span> + <div id="inner-anchored">inner-anchored</div> + </div> + </div> +</div> + +<div id="outer-anchored">outer-anchored</div> + +<script> +const scroller = document.getElementById('scroll-container'); +scroller.scrollTop = 300; +scroller.scrollLeft = 450; + +function raf() { + return new Promise(resolve => requestAnimationFrame(resolve)); +} + +async function runTest() { + await raf(); + await raf(); + document.getElementById('anchor').style.anchorName = '--anchor'; + document.documentElement.classList.remove('reftest-wait'); +} +runTest(); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vlr.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vlr.html index 82d167f48d9..82d167f48d9 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vlr.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vlr.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vrl.tentative.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vrl.html index 55b73558974..55b73558974 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vrl.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-scroll-vrl.html diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-001.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-001.html index b5849510e83..e69a3882051 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-001.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-001.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>Tests CSS transition of anchor() and anchor-size() functions</title> -<link rel="help" href="https://drafts4.csswg.org/css-anchor-1/"> +<link rel="help" href="https://drafts4.csswg.org/css-anchor-position-1/"> <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/8180"></script> <link rel="author" href="mailto:xiaochengh@chromium.org"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-002.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-002.html index b6a1ff4511a..b0fddc4943a 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-002.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-002.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>Tests CSS transition of anchor() across tree scopes</title> -<link rel="help" href="https://drafts4.csswg.org/css-anchor-1/"> +<link rel="help" href="https://drafts4.csswg.org/css-anchor-position-1/"> <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/8180"></script> <link rel="author" href="mailto:xiaochengh@chromium.org"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-003.html b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-003.html index e7441275141..e7624575da5 100644 --- a/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-003.html +++ b/tests/wpt/web-platform-tests/css/css-anchor-position/anchor-transition-003.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>Tests CSS transition of anchor() across three tree scopes</title> -<link rel="help" href="https://drafts4.csswg.org/css-anchor-1/"> +<link rel="help" href="https://drafts4.csswg.org/css-anchor-position-1/"> <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/8180"></script> <link rel="author" href="mailto:xiaochengh@chromium.org"> <script src="/resources/testharness.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-composition-keyframes.html b/tests/wpt/web-platform-tests/css/css-animations/animation-composition-keyframes.html index 86a27a2b526..7051186f8b2 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/animation-composition-keyframes.html +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-composition-keyframes.html @@ -1,7 +1,7 @@ <!doctype html> <meta charset=utf-8> <title>animation-composition test in keyframes</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-animations-2/#animation-composition"> +<link rel="help" href="https://drafts.csswg.org/css-animations-2/#animation-composition"> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src="support/testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-composition.html b/tests/wpt/web-platform-tests/css/css-animations/animation-composition.html index 48e757c5981..c46d55a877e 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/animation-composition.html +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-composition.html @@ -1,7 +1,7 @@ <!doctype html> <meta charset=utf-8> <title>animation-composition test</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-animations-2/#animation-composition"> +<link rel="help" href="https://drafts.csswg.org/css-animations-2/#animation-composition"> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src="support/testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/background-image-cors-no-reload.html b/tests/wpt/web-platform-tests/css/css-backgrounds/background-image-cors-no-reload.html new file mode 100644 index 00000000000..964ca0919c9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/background-image-cors-no-reload.html @@ -0,0 +1,50 @@ +<!doctype html> +<meta charset="utf-8"> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1832528"> +<link rel="help" href="https://drafts.csswg.org/css-backgrounds/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +:root { + --icon: url("/images/green.png?variable-cors-no-reload"); +} +.item::before, +.item::after { + display: block; + content: ""; + height: 1.25rem; + width: 1.25rem; + transform: rotate(180deg); + background: var(--icon) 50%/2rem 2rem; +} +.item::after { + background: blue; + mask: var(--icon); +} +.item.toggled::after, +.item.toggled::before { + color: blue; +} +</style> +<div class="item"></div> +<script> +let t = async_test("CORS image from variable doesn't cause re-downloads"); + +function getEntries() { + let url = new URL("/images/green.png?variable-cors-no-reload", location.href).href; + return performance.getEntriesByName(url); +} + +onload = t.step_func(function() { + let entries = getEntries(); + assert_equals(entries.length, 2, "should be loaded (twice, once with anon cors mode once without)"); + document.querySelector(".item").classList.toggle("toggled"); + // Assume that at least some of the time the load would complete under a second. + t.step_timeout(t.step_func_done(function() { + let entries_after = getEntries(); + assert_equals(entries_after.length, entries.length, "Shouldn't have caused re-downloads"); + }), 1000); +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-border-radius-001.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-border-radius-001.html new file mode 100644 index 00000000000..6f81ca81fac --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-border-radius-001.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Backgrounds Test: 'border-radius: 50%' with a box-shadow that has a tall and wide spread</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-text-decor-3/#text-shadow-property"> + <link rel="match" href="reference/box-shadow-border-radius-001-ref.html"> + <link rel="mismatch" href="reference/box-shadow-border-radius-001-notref.html"> + + <meta content="" name="flags"> + + <!-- + + [css-backgrounds] The shape of box-shadow should be a circle for a box with border-radius:50% and big spread + https://github.com/w3c/csswg-drafts/issues/7103 + + https://lists.w3.org/Archives/Public/www-archive/2022Sep/att-0012/shadow-radius.html + + --> + + <style> + div + { + background-color: black; + border-radius: 50%; + box-shadow: black 0 0 0 149px; + height: 2px; + margin: 157px 149px 0px; + width: 2px; + } + + /* + + 149px + + + 2px + + + 149px + ======== + 300px + + */ + </style> + + <div></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-inset-spread-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-inset-spread-without-border-radius.html deleted file mode 100644 index 0e74fbf5b64..00000000000 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-inset-spread-without-border-radius.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>CSS Backgrounds and Borders Test: box-shadow</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> - <link rel="match" href="reference/box-shadow-inset-spread-without-border-radius.html"> - <meta name="assert" content="inset spread box-shadow should show shadow."> - <style type="text/css"> - .container { - position: relative; - } - .container div { - position: absolute; - height: 150px; - width: 150px; - left: 0; - top: 0; - } - .container .test { - box-shadow: red 10px 10px 0 10px inset; - } - .container .ref { - background-color: green; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="test"></div> - <div class="ref"></div> - </div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-inset-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-inset-without-border-radius.html index a6ad9440f3c..8b2c691ebc8 100644 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-inset-without-border-radius.html +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-inset-without-border-radius.html @@ -1,35 +1,94 @@ <!DOCTYPE html> -<html> -<head> - <title>CSS Backgrounds and Borders Test: box-shadow</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> - <link rel="match" href="reference/box-shadow-inset-without-border-radius.html"> - <meta name="assert" content="inset box-shadow should show shadow."> - <style type="text/css"> - .container { - position: relative; - } - .container div { - position: absolute; - height: 150px; - width: 150px; - left: 0; - top: 0; - } - .container .test { - box-shadow: red 10px 10px inset; - } - .container .ref { - background-color: green; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="test"></div> - <div class="ref"></div> - </div> -</body> -</html> + + <meta charset="UTF-8"> + + <title>CSS Backgrounds and Borders Test: box-shadow inset without border-radius</title> + + <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> + <link rel="match" href="reference/box-shadow-inset-without-border-radius-ref.html"> + + <meta content="" name="flags"> + + <!-- + + Reviewed by Gérard Talbot on April 9th 2023 + + More info: https://github.com/web-platform-tests/wpt/issues/10013 + + https://github.com/web-platform-tests/wpt/pull/39445 + + --> + + <style> + div + { + border: transparent solid 8px; + display: inline-block; + height: 32px; + margin: 0px 8px 8px 0px; + padding: 16px; + vertical-align: top; + width: 32px; + } + + /* + + An inner box-shadow casts a shadow as if everything outside + the padding edge were opaque. Assuming a spread distance of + zero, its perimeter has the exact same size and shape as the + padding box. The shadow is drawn inside the padding edge only: + it is clipped outside the padding box of the element. + + If a spread distance is defined, the shadow perimeter + defined above is contracted inward (for inner box-shadows) + by insetting the shadow’s straight edges by the spread + distance (and flooring the resulting width/height at zero). + + */ + + div#first-subtest /* inset with NO spread */ + { + box-shadow: black 10px 10px 0px 0px inset; + } + + div#second-subtest /* inset with a 15px spread */ + { + box-shadow: black 10px 10px 0px 15px inset; + } + + div#third-subtest /* inset with NO spread */ + { + box-shadow: black 10px -10px 0px 0px inset; + } + + div#fourth-subtest /* inset with a 15px spread */ + { + box-shadow: black 10px -10px 0px 15px inset; + } + + div#fifth-subtest /* inset with NO spread */ + { + box-shadow: black -10px 10px 0px 0px inset; + } + + div#sixth-subtest /* inset with a 15px spread */ + { + box-shadow: black -10px 10px 0px 15px inset; + } + + div#seventh-subtest /* inset with NO spread */ + { + box-shadow: black -10px -10px 0px 0px inset; + } + + div#eighth-subtest /* inset with a 15px spread */ + { + box-shadow: black -10px -10px 0px 15px inset; + } + </style> + + <div id="first-subtest"></div><div id="second-subtest"></div><div id="third-subtest"></div><div id="fourth-subtest"></div><br> + + <div id="fifth-subtest"></div><div id="sixth-subtest"></div><div id="seventh-subtest"></div><div id="eighth-subtest"></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-invalid-001.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-invalid-001.html new file mode 100644 index 00000000000..acd0bdf41bd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-invalid-001.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Background and Borders Test: invalid box-shadow declarations</title> + + <!-- + + Created: May 20th 2023 + + Last modified: May 20th 2023 + + --> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#box-shadow"> + <link rel="match" href="reference/ref-filled-green-100px-square.xht"> + + <meta content="This test checks that 'box-shadow' accepts either the 'none' value or (exclusive or) a comma-separated list of shadows but not both at the same time." name="assert"> + <meta content="invalid" name="flags"> + + <!-- + + <shadow> = <color>? && [<length>{2} <length [0,∞]>? <length>?] && inset? + + The box-shadow property attaches one or more drop-shadows to + the box. The property accepts either the none value, which + indicates no shadows, or a comma-separated list of shadows, + ordered front to back. + + --> + + <style> + div + { + background-color: red; + box-shadow: green 100px 100px inset; + /* + This inset 'box-shadow' declaration will paint and cover + the inside of the red square. This way, we verify that + the UA actually supports 'box-shadow'. + */ + box-shadow: none, red 0px -100px, red 100px 0px, red 0px 100px, red -100px 0px; /* invalid */ + box-shadow: red 0px -100px, none, red 100px 0px, red 0px 100px, red -100px 0px; /* invalid */ + box-shadow: red 0px -100px, red 100px 0px, none, red 0px 100px, red -100px 0px; /* invalid */ + box-shadow: red 0px -100px, red 100px 0px, red 0px 100px, none, red -100px 0px; /* invalid */ + box-shadow: red 0px -100px, red 100px 0px, red 0px 100px, red -100px 0px, none; /* invalid */ + height: 100px; + width: 100px; + } + </style> + + <p>Test passes if there is a filled green square and <strong>no red</strong>. + + <div></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-multiple-001.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-multiple-001.html new file mode 100644 index 00000000000..e95fb6841ad --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-multiple-001.html @@ -0,0 +1,102 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Backgrounds Test: multiple outset box-shadow</title> + + <!-- + + Created: May 18th 2023 + + Last modified: May 18th 2023 + + --> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#box-shadow"> + <link rel="match" href="reference/box-shadow-multiple-001-ref.html"> + + <meta content="" name="flags"> + + <!-- + + <shadow> = <color>? && [<length>{2} <length [0,∞]>? <length>?] && inset? + + The box-shadow property attaches one or more drop-shadows to + the box. The property accepts either the none value, which + indicates no shadows, or a comma-separated list of shadows, + ordered front to back. + + Each shadow is given as a <shadow>, represented by 2-4 length + values, an optional color, and an optional inset keyword. + + --> + + <style> + div + { + background-color: yellow; + font-size: 50px; + height: 1em; + margin: 1em auto 2.2em 1em; + width: 1em; + } + + div#multiple + { + box-shadow: purple 0em -1em, blue 1em 0em, fuchsia 0em 1em, orange -1em 0em; + margin-top: 58px; + } + + div#multiple-overlapping1 + { + box-shadow: purple 0em -1em, red 0em -1em, blue 1em 0em, red 1em 0em, fuchsia 0em 1em, red 0em 1em, orange -1em 0em, red -1em 0em; + } + + div#multiple-overlapping2 + { + box-shadow: rgb(128 0 128 / 50%) 0em -1em, rgb(255 255 0 / 50%) 0em -1em, rgb(0 0 255 / 50%) 1em 0em, rgb(255 255 0 / 50%) 1em 0em, rgb(255 0 255 / 50%) 0em 1em, rgb(255 255 0 / 50%) 0em 1em, rgb(255 165 0 / 50%) -1em 0em, rgb(255 255 0 / 50%) -1em 0em; + } + </style> + + <div id="multiple"></div> + + <div id="multiple-overlapping1"></div> + + <div id="multiple-overlapping2"></div> + + <!-- + + The top first 2 are: + + ......... + . . + . . <-purple + . . + ....................... + . . . . + orange-> . . yel . . <-blue + . . low . . + ....................... + . . + . . <-fuchsia + . . + ......... + + The bottom one is: + + ......... + . . + . . <-#BF7F7F + . . + ....................... + . . . . + #FFD23F-> . . yel . . <-#7F7FBF + . . low . . + ....................... + . . + . . <-#FF7FBF + . . + ......... + + --> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-spread-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-spread-without-border-radius.html deleted file mode 100644 index 5ebde5519ca..00000000000 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-spread-without-border-radius.html +++ /dev/null @@ -1,39 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>CSS Backgrounds and Borders Test: box-shadow</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> - <link rel="match" href="reference/box-shadow-outset-spread-without-border-radius.html"> - <meta name="assert" content="outset spread box-shadow should show shadow."> - <style type="text/css"> - .container { - position: relative; - } - .container div { - position: absolute; - height: 150px; - left: 0; - top: 0; - width: 150px; - } - .container .test { - box-shadow: red 10px 10px 0 5px; - } - .container .ref { - background-color: green; - height: 160px; - left: 5px; - top: 5px; - width: 160px; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="test"></div> - <div class="ref"></div> - </div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html new file mode 100644 index 00000000000..71735a98ce7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-without-border-radius-001.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Backgrounds and Borders Test: box-shadow outset without border-radius</title> + + <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> + <link rel="match" href="reference/box-shadow-outset-without-border-radius-001-ref.html"> + + <meta content="" name="flags"> + + <!-- + + Reviewed by Gérard Talbot on April 9th 2023 + + More info: https://github.com/web-platform-tests/wpt/issues/10013 + + https://github.com/web-platform-tests/wpt/pull/39445 + + --> + + <style> + div + { + border: transparent solid 8px; + display: inline-block; + height: 32px; + margin: 32px 20px; + padding: 16px; + vertical-align: top; + width: 32px; + } + + /* + + An outer box-shadow casts a shadow as if the border-box + of the element were opaque. Assuming a spread distance + of zero, its perimeter has the exact same size and + shape as the border box. The shadow is drawn outside + the border edge only: it is clipped inside the border-box + of the element. + + If a spread distance is defined, the shadow perimeter + defined above is expanded outward (for outer box-shadows) + by outset withting the shadow’s straight edges by the spread + distance (and flooring the resulting width/height at zero). + + */ + + div#first-subtest /* outset with NO spread */ + { + box-shadow: black 10px 10px 0px 0px; + } + + div#second-subtest /* outset with a 15px spread */ + { + box-shadow: black 10px 10px 0px 15px; + } + + div#third-subtest /* outset with NO spread */ + { + box-shadow: black 10px -10px 0px 0px; + } + + div#fourth-subtest /* outset with a 15px spread */ + { + box-shadow: black 10px -10px 0px 15px; + } + + div#fifth-subtest /* outset with NO spread */ + { + box-shadow: black -10px 10px 0px 0px; + } + + div#sixth-subtest /* outset with a 15px spread */ + { + box-shadow: black -10px 10px 0px 15px; + } + + div#seventh-subtest /* outset with NO spread */ + { + box-shadow: black -10px -10px 0px 0px; + } + + div#eighth-subtest /* outset with a 15px spread */ + { + box-shadow: black -10px -10px 0px 15px; + } + </style> + + <div id="first-subtest"></div><div id="second-subtest"></div><div id="third-subtest"></div><div id="fourth-subtest"></div><br> + + <div id="fifth-subtest"></div><div id="sixth-subtest"></div><div id="seventh-subtest"></div><div id="eighth-subtest"></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-without-border-radius.html deleted file mode 100644 index 9f213541727..00000000000 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/box-shadow-outset-without-border-radius.html +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>CSS Backgrounds and Borders Test: box-shadow</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <link rel="help" href="http://www.w3.org/TR/css3-background/#the-box-shadow"> - <link rel="match" href="reference/box-shadow-outset-without-border-radius.html"> - <meta name="assert" content="box-shadow should show shadow."> - <style type="text/css"> - .container { - position: relative; - } - .container div { - position: absolute; - height: 150px; - width: 150px; - } - .container .test { - box-shadow: red 10px 10px; - left: 0; - top: 0; - } - .container .ref { - background-color: green; - left: 10px; - top: 10px; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="test"></div> - <div class="ref"></div> - </div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable-ref.html index e4e3d3455f2..b88cf1547af 100644 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable-ref.html +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable-ref.html @@ -2,7 +2,7 @@ <html> <head> <title>Testing that child-background doesn't bleed through its parent border for a inner-border-radius that is larger than the content rect</title> - <link rel="help" href="https://w3c.github.io/csswg-drafts/css-backgrounds/#border-radius"> + <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#border-radius"> <link rel="assert" content="Testing that child-background doesn't bleed through its parent border for a inner-border-radius that is larger than the content rect"> <style> body { diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable.html b/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable.html index 46fbcc6c920..7c3cff79881 100644 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable.html +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/inner-border-non-renderable.html @@ -3,7 +3,7 @@ <head> <title>Testing that child-background doesn't bleed through its parent border for a inner-border-radius that is larger than the content rect</title> <link rel="match" href="inner-border-non-renderable-ref.html"> - <link rel="help" href="https://w3c.github.io/csswg-drafts/css-backgrounds/#border-radius"> + <link rel="help" href="https://drafts.csswg.org/css-backgrounds/#border-radius"> <link rel="assert" content="Testing that child-background doesn't bleed through its parent border for a inner-border-radius that is larger than the content rect"> <style> body { diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-border-radius-001-notref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-border-radius-001-notref.html new file mode 100644 index 00000000000..fd0c1eb8036 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-border-radius-001-notref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reftest reference</title> + + <style> + div + { + background-color: black; + border-radius: 4px; + height: 300px; + width: 300px; + } + </style> + + <div></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-border-radius-001-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-border-radius-001-ref.html new file mode 100644 index 00000000000..ff99f43feec --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-border-radius-001-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reftest reference</title> + + <style> + div + { + background-color: black; + border-radius: 50%; + height: 300px; + width: 300px; + } + </style> + + <div></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-spread-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-spread-without-border-radius.html deleted file mode 100644 index 5e9cf0d34ec..00000000000 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-spread-without-border-radius.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Reference File</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <style type="text/css"> - .container { - position: relative; - } - .ref { - background-color: green; - height: 150px; - position: absolute; - width: 150px; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="ref"></div> - </div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-without-border-radius-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-without-border-radius-ref.html new file mode 100644 index 00000000000..dca329fafe5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-without-border-radius-ref.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reftest reference</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border-color: black; + border-style: solid; + display: inline-block; + margin: 8px 8px 16px 16px; + vertical-align: top; + } + + </style> + + <div id="first-subtest" style="border-width: 10px 0px 0px 10px; height: 54px; width: 54px; margin-left: 8px;"></div><div id="second-subtest" style="border-width: 25px 5px 5px 25px; height: 34px; width: 34px;"></div><div id="third-subtest" style="border-width: 0px 0px 10px 10px; height: 54px; width: 54px;"></div><div id="fourth-subtest" style="border-width: 5px 5px 25px 25px; height: 34px; width: 34px;"></div><br> + + <div id="fifth-subtest" style="border-width: 10px 10px 0px 0px; height: 54px; width: 54px; margin-left: 8px;"></div><div id="sixth-subtest" style="border-width: 25px 25px 5px 5px; height: 34px; width: 34px;"></div><div id="seventh-subtest" style="border-width: 0px 10px 10px 0px; height: 54px; width: 54px;"></div><div id="eighth-subtest" style="border-width: 5px 25px 25px 5px; height: 34px; width: 34px;"></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-without-border-radius.html deleted file mode 100644 index 5e9cf0d34ec..00000000000 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-inset-without-border-radius.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Reference File</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <style type="text/css"> - .container { - position: relative; - } - .ref { - background-color: green; - height: 150px; - position: absolute; - width: 150px; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="ref"></div> - </div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-multiple-001-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-multiple-001-ref.html new file mode 100644 index 00000000000..ada9dbac1f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-multiple-001-ref.html @@ -0,0 +1,110 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference Test</title> + + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + color: transparent; + font-family: Ahem; + font-size: 50px; + line-height: 1; + } + + div.purple + { + text-shadow: 1em 0em purple; + } + + div.orange-blue + { + color: yellow; + margin-left: 1em; + text-shadow: -1em 0em orange, 1em 0em blue; + } + + div.fuchsia + { + margin-bottom: 0.2em; + text-shadow: 1em 0em fuchsia; + } + + div#third-top + { + text-shadow: 1em 0em #BF7F7F; + } + + div#third-horiz-left-right + { + color: yellow; + margin-left: 1em; + text-shadow: -1em 0em #FFD23F , 1em 0em #7F7FBF; + } + + div#third-bottom + { + text-shadow: 1em 0em #FF7FBF; + } + </style> + + <div class="purple">U</div> + + <div class="orange-blue">B</div> + + <div class="fuchsia">F</div> + + + <div class="purple">U</div> + + <div class="orange-blue">B</div> + + <div class="fuchsia">F</div> + + + <div id="third-top">T</div> + + <div id="third-horiz-left-right">H</div> + + <div id="third-bottom">B</div> + + + <!-- + + The top first 2 are: + + ......... + . . + . . <-purple + . . + ....................... + . . . . + orange-> . . yel . . <-blue + . . low . . + ....................... + . . + . . <-fuchsia + . . + ......... + + The bottom one is: + + ......... + . . + . . <-#BF7F7F + . . + ....................... + . . . . + #FFD23F-> . . yel . . <-#7F7FBF + . . low . . + ....................... + . . + . . <-#FF7FBF + . . + ......... + + --> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-spread-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-spread-without-border-radius.html deleted file mode 100644 index f62399abce0..00000000000 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-spread-without-border-radius.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Reference File</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <style type="text/css"> - .container { - position: relative; - } - .ref { - background-color: green; - height: 160px; - left: 5px; - position: absolute; - top: 5px; - width: 160px; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="ref"></div> - </div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-without-border-radius-001-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-without-border-radius-001-ref.html new file mode 100644 index 00000000000..7dfef37a704 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-without-border-radius-001-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reftest reference</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border-color: black; + border-style: solid; + display: inline-block; + vertical-align: top; + } + </style> + + <div id="first-subtest" style="border-width: 0px 10px 10px 0px; height: 70px; width: 70px; margin: 42px 0px 0px 30px;"></div><div id="second-subtest" style="border-width: 5px 25px 25px 5px; height: 80px; width: 80px; margin: 27px 0px 0px 25px;"></div><div id="third-subtest" style="border-width: 10px 10px 0px 0px; height: 70px; width: 70px; margin: 22px 0px 0px 25px;"></div><div id="fourth-subtest" style="border-width: 25px 25px 5px 5px; height: 80px; width: 80px; margin: 7px 0px 0px 25px;"></div><br> + + <div id="fifth-subtest" style="border-width: 0px 0px 10px 10px; height: 70px; width: 70px; margin: 49px 0px 0px 10px;"></div><div id="sixth-subtest" style="border-width: 5px 5px 25px 25px; height: 80px; width: 80px; margin: 34px 0px 0px 25px;"></div><div id="seventh-subtest" style="border-width: 10px 0px 0px 10px; height: 70px; width: 70px; margin: 29px 0px 0px 25px;"></div><div id="eighth-subtest" style="border-width: 25px 5px 5px 25px; height: 80px; width: 80px; margin: 14px 0px 0px 25px;"></div> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-without-border-radius.html b/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-without-border-radius.html deleted file mode 100644 index 2bca4c6961b..00000000000 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/reference/box-shadow-outset-without-border-radius.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Reference File</title> - <link rel="author" title="Zhang Xiaochong" href="mailto:joy.xczhang@gmail.com"> - <style type="text/css"> - .container { - position: relative; - } - .ref { - background-color: green; - height: 150px; - left: 10px; - position: absolute; - top: 10px; - width: 150px; - } - </style> -</head> -<body> - <p>The test passes if there is a filled green square and no red.</p> - <div class="container"> - <div class="ref"></div> - </div> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-nested-child.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-nested-child.html index 2d36e75c263..8a3b03c2e50 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-nested-child.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-nested-child.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-block"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-block"> <meta name="assert" content="Items, including self-collapsing ones, at the block-end of the container should have their margins trimmed"> <style> container { diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-with-self-collapsing-children.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-with-self-collapsing-children.html index d03c2fe1422..26d46628eff 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-with-self-collapsing-children.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end-with-self-collapsing-children.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-block"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-block"> <meta name="assert" content="Second item and all self-collapsing children at block-end should have margins trimmed"> <style> container { diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end.html index dcf8ba6fe2e..6cd0cce2634 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/block-container-block-end.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-block"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-block"> <meta name="assert" content="block-end margin of item should be trimmed"> <style> container { diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-column-auto-flow.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-column-auto-flow.html index c491301c8a6..f49f036a639 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-column-auto-flow.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-column-auto-flow.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-grid"> <meta name="assert" content="Trimmed block-end margins for grid items should be reflected in computed style"> </head> <style> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-item-spans-multiple-rows.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-item-spans-multiple-rows.html index 4ae597760b3..d44085ed8a4 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-item-spans-multiple-rows.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end-item-spans-multiple-rows.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-grid"> <meta name="assert" content="item that spans into last row should have block-end margin trimmed"> </head> <style> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end.html index a0143364aab..a7d5f44f377 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-block-end.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-grid"> <meta name="assert" content="Trimmed block-end margins for grid items should be reflected in computed style"> </head> <style> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start-item-negative-span.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start-item-negative-span.html index 4dc553e15b2..80b97e9cd0d 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start-item-negative-span.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start-item-negative-span.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-grid"> <meta name="assert" content="trimmed inline-start margins in grid should be reflected in computed style"> </head> <style> diff --git a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start.html b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start.html index 7d4157acfed..380090f3a9f 100644 --- a/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start.html +++ b/tests/wpt/web-platform-tests/css/css-box/margin-trim/computed-margin-values/grid-inline-start.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-box-4/#margin-trim-grid"> +<link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-grid"> <meta name="assert" content="trimmed inline-start margins in grid should be reflected in computed style"> </head> <style> diff --git a/tests/wpt/web-platform-tests/css/css-break/break-inside-avoid-multicol-001-print-ref.html b/tests/wpt/web-platform-tests/css/css-break/break-inside-avoid-multicol-001-print-ref.html new file mode 100644 index 00000000000..baf114d35c9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/break-inside-avoid-multicol-001-print-ref.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <meta charset="utf-8"> + <title>CSS Fragmentation Reference: Print a multi-column container containing break-inside:avoid elements</title> + <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> + + <style> + @page { + size: 5in 3in; + margin: 0.5in; + } + body { + margin: 0; + } + div { + width: 100%; + height: 1in; + background: green; + } + </style> + + <article> + <!-- page 1 --> + <div style="width: 100%"></div> + <div style="width:50%"></div> + + <!-- page 2 --> + <div style="width: 100%"></div> + <div style="width: 50%"></div> + </article> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-break/break-inside-avoid-multicol-001-print.html b/tests/wpt/web-platform-tests/css/css-break/break-inside-avoid-multicol-001-print.html new file mode 100644 index 00000000000..a97ac9f5cda --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/break-inside-avoid-multicol-001-print.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + <meta charset="utf-8"> + <title>CSS Fragmentation Test: Print a multi-column container containing break-inside:avoid elements</title> + <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org/"> + <link rel="help" href="https://drafts.csswg.org/css-break-3/#break-within"> + <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1831829"> + <link rel="match" href="break-inside-avoid-multicol-001-print-ref.html"> + + <style> + @page { + size: 5in 3in; + margin: 0.5in; + } + body { + margin: 0; + } + article { + column-count: 2; + column-gap: 0; + } + article > div { + width: 100%; + height: 3in; + background: green; + break-inside: avoid; + } + </style> + + <article> + <!-- page 1 --> + <div></div> + + <!-- page 2 --> + <div></div> + </article> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html index 306b4b3da12..c2f7f91b68a 100644 --- a/tests/wpt/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/color-scheme-no-interpolation.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-color-adjust/#color-scheme-prop"> +<link rel=help href="https://drafts.csswg.org/css-color-adjust/#color-scheme-prop"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html index bcd2bdf223a..3e1fcc22b97 100644 --- a/tests/wpt/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-color-adjust/animation/forced-color-adjust-no-interpolation.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-color-adjust/#forced-color-adjust-prop"> +<link rel=help href="https://drafts.csswg.org/css-color-adjust/#forced-color-adjust-prop"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-1.html b/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-1.html index fdb3955e96e..7d6e0387700 100644 --- a/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-1.html +++ b/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-1.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0 to 100</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#ok-lab"> +<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab"> <link rel="match" href="lab-l-over-100-ref.html"> <meta name="assert" content="lab() with lightness greater than 100"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-2.html b/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-2.html index f62f9e0559b..6674c41ae96 100644 --- a/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-2.html +++ b/tests/wpt/web-platform-tests/css/css-color/lab-l-over-100-2.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>CSS Color 4: Verify lightness in Lab is always clamped to a value between 0% to 100%</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#ok-lab"> +<link rel="help" href="https://drafts.csswg.org/css-color/#ok-lab"> <link rel="match" href="lab-l-over-100-ref.html"> <meta name="assert" content="lab() with lightness greater than 100%"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-1.html b/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-1.html index 9711956242d..6e0c62330c3 100644 --- a/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-1.html +++ b/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-1.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>CSS Color 4: Verify lightness in LCH is always clamped to a value between 0 to 100</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#cie-lab"> +<link rel="help" href="https://drafts.csswg.org/css-color/#cie-lab"> <link rel="match" href="lch-l-over-100-ref.html"> <meta name="assert" content="lch() with lightness greater than 100"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-2.html b/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-2.html index a909a49f0c2..7752d0dc0eb 100644 --- a/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-2.html +++ b/tests/wpt/web-platform-tests/css/css-color/lch-l-over-100-2.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>CSS Color 4: Verify lightness in LCH is always clamped to a value between 0% to 100%</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-color/#cie-lab"> +<link rel="help" href="https://drafts.csswg.org/css-color/#cie-lab"> <link rel="match" href="lch-l-over-100-ref.html"> <meta name="assert" content="lch() with lightness graeter than 100%"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-color/oklab-009.html b/tests/wpt/web-platform-tests/css/css-color/oklab-009.html new file mode 100644 index 00000000000..49bd916f5d7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-color/oklab-009.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Color 4: OKLab and OKLCH</title> +<link rel="author" title="James Stuckey Weber" href="mailto:james@jamessw.com"> +<link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch"> +<link rel="help" href="https://drafts.csswg.org/css-color-4/#predefined-to-lab-oklab"> +<link rel="match" href="greensquare-ref.html"> +<meta name="assert" content="oklab() specifying a and b with percentages"> +<style> + .test { background-color: red; width: 12em; height: 12em; } + .test { background-color: oklab(51.975% -35.075% 26.92%); } /* green (sRGB #008000) converted to OKLab */ +</style> +<body> + <p>Test passes if you see a green square, and no red.</p> + <div class="test"></div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-color/oklch-011.html b/tests/wpt/web-platform-tests/css/css-color/oklch-011.html new file mode 100644 index 00000000000..6944867cd8d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-color/oklch-011.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Color 4: OKLab and OKLCH</title> +<link rel="author" title="James Stuckey Weber" href="mailto:james@jamessw.com"> +<link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch"> +<link rel="help" href="https://drafts.csswg.org/css-color-4/#predefined-to-lab-oklab"> +<link rel="match" href="greensquare-ref.html"> +<meta name="assert" content="oklch() specifying C with percentage"> +<style> + .test { background-color: red; width: 12em; height: 12em; } + .test { background-color: oklch(51.975% 44.215% 142.495); } /* green (sRGB #008000) converted to OKLCH */ +</style> +<body> + <p>Test passes if you see a green square, and no red.</p> + <div class="test"></div> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html index 659117a23b0..1df42804996 100644 --- a/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html +++ b/tests/wpt/web-platform-tests/css/css-color/parsing/color-valid-color-mix-function.html @@ -79,14 +79,6 @@ test_valid_value(`color`, `color-mix(in hsl decreasing hue, hsl(20deg 50% 50%), hsl(320deg 50% 50%))`, `color-mix(in hsl decreasing hue, rgb(191, 106, 64), rgb(191, 64, 149))`); test_valid_value(`color`, `color-mix(in hsl decreasing hue, hsl(320deg 50% 50%), hsl(20deg 50% 50%))`, `color-mix(in hsl decreasing hue, rgb(191, 64, 149), rgb(191, 106, 64))`); - - test_valid_value(`color`, `color-mix(in hsl specified hue, hsl(40deg 50% 50%), hsl(60deg 50% 50%))`, `color-mix(in hsl specified hue, rgb(191, 149, 64), rgb(191, 191, 64))`); - test_valid_value(`color`, `color-mix(in hsl specified hue, hsl(60deg 50% 50%), hsl(40deg 50% 50%))`, `color-mix(in hsl specified hue, rgb(191, 191, 64), rgb(191, 149, 64))`); - test_valid_value(`color`, `color-mix(in hsl specified hue, hsl(50deg 50% 50%), hsl(330deg 50% 50%))`, `color-mix(in hsl specified hue, rgb(191, 170, 64), rgb(191, 64, 128))`); - test_valid_value(`color`, `color-mix(in hsl specified hue, hsl(330deg 50% 50%), hsl(50deg 50% 50%))`, `color-mix(in hsl specified hue, rgb(191, 64, 128), rgb(191, 170, 64))`); - test_valid_value(`color`, `color-mix(in hsl specified hue, hsl(20deg 50% 50%), hsl(320deg 50% 50%))`, `color-mix(in hsl specified hue, rgb(191, 106, 64), rgb(191, 64, 149))`); - test_valid_value(`color`, `color-mix(in hsl specified hue, hsl(320deg 50% 50%), hsl(20deg 50% 50%))`, `color-mix(in hsl specified hue, rgb(191, 64, 149), rgb(191, 106, 64))`); - test_valid_value(`color`, `color-mix(in hsl, hsl(none none none), hsl(none none none))`, `color-mix(in hsl, rgb(0, 0, 0), rgb(0, 0, 0))`); test_valid_value(`color`, `color-mix(in hsl, hsl(none none none), hsl(30deg 40% 80%))`, `color-mix(in hsl, rgb(0, 0, 0), rgb(224, 204, 184))`); test_valid_value(`color`, `color-mix(in hsl, hsl(120deg 20% 40%), hsl(none none none))`, `color-mix(in hsl, rgb(82, 122, 82), rgb(0, 0, 0))`); @@ -103,11 +95,10 @@ test_valid_value(`color`, `color-mix(in hsl, lab(0 104.3 -50.9) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, lab(0 104.3 -50.9) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hsl, lch(100 116 334) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, lch(100 116 334) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hsl, lch(0 116 334) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, lch(0 116 334) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hsl, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); + test_valid_value(`color`, `color-mix(in hsl, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklab(1 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hsl, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hsl, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); + test_valid_value(`color`, `color-mix(in hsl, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklch(1 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hsl, oklab(1 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklab(1 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hsl, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hsl, oklch(1 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklch(1 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hsl, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hsl, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); @@ -166,13 +157,6 @@ test_valid_value(`color`, `color-mix(in hwb decreasing hue, hwb(20deg 30% 40%), hwb(320deg 30% 40%))`, `color-mix(in hwb decreasing hue, rgb(153, 102, 77), rgb(153, 77, 128))`); test_valid_value(`color`, `color-mix(in hwb decreasing hue, hwb(320deg 30% 40%), hwb(20deg 30% 40%))`, `color-mix(in hwb decreasing hue, rgb(153, 77, 128), rgb(153, 102, 77))`); - test_valid_value(`color`, `color-mix(in hwb specified hue, hwb(40deg 30% 40%), hwb(60deg 30% 40%))`, `color-mix(in hwb specified hue, rgb(153, 128, 77), rgb(153, 153, 77))`); - test_valid_value(`color`, `color-mix(in hwb specified hue, hwb(60deg 30% 40%), hwb(40deg 30% 40%))`, `color-mix(in hwb specified hue, rgb(153, 153, 77), rgb(153, 128, 77))`); - test_valid_value(`color`, `color-mix(in hwb specified hue, hwb(50deg 30% 40%), hwb(330deg 30% 40%))`, `color-mix(in hwb specified hue, rgb(153, 140, 77), rgb(153, 77, 115))`); - test_valid_value(`color`, `color-mix(in hwb specified hue, hwb(330deg 30% 40%), hwb(50deg 30% 40%))`, `color-mix(in hwb specified hue, rgb(153, 77, 115), rgb(153, 140, 77))`); - test_valid_value(`color`, `color-mix(in hwb specified hue, hwb(20deg 30% 40%), hwb(320deg 30% 40%))`, `color-mix(in hwb specified hue, rgb(153, 102, 77), rgb(153, 77, 128))`); - test_valid_value(`color`, `color-mix(in hwb specified hue, hwb(320deg 30% 40%), hwb(20deg 30% 40%))`, `color-mix(in hwb specified hue, rgb(153, 77, 128), rgb(153, 102, 77))`); - test_valid_value(`color`, `color-mix(in hwb, hwb(none none none), hwb(none none none))`, `color-mix(in hwb, rgb(255, 0, 0), rgb(255, 0, 0))`); test_valid_value(`color`, `color-mix(in hwb, hwb(none none none), hwb(30deg 30% 40%))`, `color-mix(in hwb, rgb(255, 0, 0), rgb(153, 115, 77))`); test_valid_value(`color`, `color-mix(in hwb, hwb(120deg 10% 20%), hwb(none none none))`, `color-mix(in hwb, rgb(26, 204, 26), rgb(255, 0, 0))`); @@ -188,15 +172,12 @@ test_valid_value(`color`, `color-mix(in hwb, lab(0 104.3 -50.9) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, lab(0 104.3 -50.9) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hwb, lch(100 116 334) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, lch(100 116 334) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hwb, lch(0 116 334) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, lch(0 116 334) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hwb, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); + test_valid_value(`color`, `color-mix(in hwb, oklab(100 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklab(1 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hwb, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hwb, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); + test_valid_value(`color`, `color-mix(in hwb, oklch(100 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklch(1 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hwb, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hwb, oklab(1 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklab(1 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hwb, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklab(0 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)`); test_valid_value(`color`, `color-mix(in hwb, oklch(1 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklch(1 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); - test_valid_value(`color`, `color-mix(in hwb, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`, `color-mix(in hwb, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)`); // lch() test_valid_value(`color`, `color-mix(in lch, lch(10 20 30deg), lch(50 60 70deg))`, `color-mix(in lch, lch(10 20 30), lch(50 60 70))`); diff --git a/tests/wpt/web-platform-tests/css/css-conditional/at-supports-047.html b/tests/wpt/web-platform-tests/css/css-conditional/at-supports-selector-placeholder.html index 8ad85858147..8ad85858147 100644 --- a/tests/wpt/web-platform-tests/css/css-conditional/at-supports-047.html +++ b/tests/wpt/web-platform-tests/css/css-conditional/at-supports-selector-placeholder.html diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/nested-size-style-container-invalidation.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/nested-size-style-container-invalidation.html new file mode 100644 index 00000000000..8d04bf589a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/nested-size-style-container-invalidation.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>Nested size/style @container-dependent elements respond to container size changes</title> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#size-container"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/cq-testcommon.js"></script> +<style> + #container { + container-type: size; + width: 1000px; + } + #container.narrow { + width: 600px; + } + #target { + color: red; + } + @container (width < 800px) { + @container style(--foo: bar) { + #target { color: green; } + } + } +</style> +<div id="container"> + <div style="--foo: bar"> + <div id="target">Green?</div> + </div> +</div> +<script> + setup(() => assert_implements_container_queries()); + + test(() => { + assert_equals(getComputedStyle(target).color, "rgb(255, 0, 0)"); + }, "Initially red"); + + test(() => { + container.className = "narrow"; + assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)"); + }, "Green after reducing width"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/style-container-invalidation-inheritance.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/style-container-invalidation-inheritance.html new file mode 100644 index 00000000000..b7aef69d3e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/style-container-invalidation-inheritance.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<title>CSS Container Query Test: named style container query change with inherited custom property</title> +<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-rule"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="support/cq-testcommon.js"></script> +<style> + #container { + container-name: container; + } + .match { + --match: true; + } + #inner { + color: red; + } + @container container style(--match: true) { + #inner { + color: green; + } + } +</style> +<div id="container"> + <div id="outer"> + <div id="inner"></div> + </div> +</div> +<script> + setup(() => assert_implements_container_queries()); + + test(() => { + assert_equals(getComputedStyle(inner).color, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(inner).getPropertyValue("--match"), ""); + assert_equals(getComputedStyle(outer).getPropertyValue("--match"), ""); + assert_equals(getComputedStyle(container).getPropertyValue("--match"), ""); + }, "Pre-conditions"); + + test(() => { + container.className = "match"; + assert_equals(getComputedStyle(inner).color, "rgb(0, 128, 0)"); + assert_equals(getComputedStyle(inner).getPropertyValue("--match"), "true"); + assert_equals(getComputedStyle(outer).getPropertyValue("--match"), "true"); + assert_equals(getComputedStyle(container).getPropertyValue("--match"), "true"); + }, "Changed --match inherits down descendants and affects container query"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html new file mode 100644 index 00000000000..d1a35af62f6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-flexbox-item.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-lr; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-lr; +} +.inner { + display: flex; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-x="21"> + <div>two<br>lines</div> + </div> + <div data-offset-x="56">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html new file mode 100644 index 00000000000..62fae7e5659 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-grid-item.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-lr; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-lr; +} +.inner { + display: grid; + grid-template: auto / auto; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-x="21"> + <div>two<br>lines</div> + </div> + <div data-offset-x="56">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-items.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-items.html new file mode 100644 index 00000000000..4b268373d77 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-items.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-lr; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-lr; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div data-offset-x="21">two<br>lines</div> + <div data-offset-x="51">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html new file mode 100644 index 00000000000..c19925cd810 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-lr-table-item.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-lr; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-lr; +} +.inner { + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > *')"> +<div id="target"> + <table class="inner" data-offset-x="21"> + <tr> + <td style="vertical-align: baseline;"> + <div>two<br>lines</div> + </td> + </tr> + </table> + <div data-offset-x="59">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html new file mode 100644 index 00000000000..4304ebe01c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-flexbox-item.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + font-size: 16px; + line-height: 16px; + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-rl; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-rl; +} +.inner { + display: flex; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-x="146"> + <div>two<br>lines</div> + </div> + <div data-offset-x="191">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html new file mode 100644 index 00000000000..3711a159426 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-grid-item.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-rl; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-rl; +} +.inner { + display: grid; + grid-template: auto / auto; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-x="146"> + <div>two<br>lines</div> + </div> + <div data-offset-x="191">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-items.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-items.html new file mode 100644 index 00000000000..14f165b8b5f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-items.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-rl; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-rl; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div data-offset-x="161">two<br>lines</div> + <div data-offset-x="201">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html new file mode 100644 index 00000000000..0bf1ab95fd7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-column-vert-rl-table-item.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: vertical-rl; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: vertical-rl; +} +.inner { + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > *')"> +<div id="target"> + <table class="inner" data-offset-x="140"> + <tr> + <td style="vertical-align: baseline;"> + <div>two<br>lines</div> + </td> + </tr> + </table> + <div data-offset-x="188">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html new file mode 100644 index 00000000000..14ec99809e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-flexbox-item.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<style> +#target { + display: flex; + flex-direction: column; + writing-mode: vertical-lr; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +.inner { + display: flex; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-y="11"> + <div>two<br>lines</div> + </div> + <div data-offset-y="21">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html new file mode 100644 index 00000000000..a17c42a0328 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-grid-item.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + writing-mode: vertical-lr; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +.inner { + display: grid; + grid-template: auto / auto; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-y="11"> + <div>two<br>lines</div> + </div> + <div data-offset-y="21">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html new file mode 100644 index 00000000000..f1194f99551 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-items.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + writing-mode: vertical-lr; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div data-offset-y="11">two<br>lines</div> + <div data-offset-y="11">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html new file mode 100644 index 00000000000..817896cd4b6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-lr-column-horz-table-item.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + writing-mode: vertical-lr; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +.inner { + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <table class="inner" data-offset-y="130"> + <tr> + <td style="vertical-align: baseline;"> + <div>two<br>lines</div> + </td> + </tr> + </table> + <div data-offset-y="24">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html new file mode 100644 index 00000000000..249ba95f033 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-flexbox-item.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + writing-mode: vertical-rl; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +.inner { + display: flex; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-y="11"> + <div>two<br>lines</div> + </div> + <div data-offset-y="21">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html new file mode 100644 index 00000000000..4efebabfb31 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-grid-item.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + writing-mode: vertical-rl; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +.inner { + display: grid; + grid-template: auto / auto; + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div class="inner" data-offset-y="11"> + <div>two<br>lines</div> + </div> + <div data-offset-y="21">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html new file mode 100644 index 00000000000..a29e2d8f6d7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-items.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + width: 200px; + writing-mode: vertical-rl; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <div data-offset-y="11">two<br>lines</div> + <div data-offset-y="11">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html new file mode 100644 index 00000000000..bc69ad2dc2e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/align-items-baseline-vert-rl-column-horz-table-item.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#cross-alignment"> +<link rel="author" href="mailto:sammy.gill@apple.com" title="Sammy Gill"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<style> +#target { + display: flex; + flex-direction: column; + writing-mode: vertical-rl; + align-items: baseline; + border: 3px solid black; + font-family: monospace; + font-size: 10px; + line-height: 10px; +} +#target > :nth-child(1) { + background: hotpink; + writing-mode: horizontal-tb; + padding-left: 30px; + margin-left: 10px; +} +#target > :nth-child(2) { + background: papayawhip; + writing-mode: horizontal-tb; +} +.inner { + border: 5px solid black; + padding: 5px; +} +</style> +<body onload="checkLayout('#target > div')"> +<div id="target"> + <table class="inner" data-offset-y="130"> + <tr> + <td style="vertical-align: baseline;"> + <div>two<br>lines</div> + </td> + </tr> + </table> + <div data-offset-y="24">hello</div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009-ref.html index b0d269a49ae..2ee9d0a0c8b 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009-ref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009-ref.html @@ -11,7 +11,7 @@ div { clear: left; float: left; - font: 64px/128px test; + font: 60px/120px test; color: orange; background: orange; } @@ -22,12 +22,12 @@ #test2 { color: blue; background: blue; - font-size: 96px; + font-size: 90px; } #test3 { color: magenta; background: magenta; - font-size: 48px; + font-size: 45px; } </style> <body> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009.html b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009.html index 765447b22f0..133f96f450c 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-009.html @@ -17,7 +17,7 @@ div { clear: left; float: left; - font: 64px/128px test; + font: 60px/120px test; color: orange; background: orange; } diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-010.html b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-010.html index 6ee3ab7d874..c3b2bc195ec 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-010.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-010.html @@ -17,7 +17,7 @@ div { clear: left; float: left; - font: 64px/128px test; + font: 60px/120px test; color: orange; background: orange; } diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-011.html b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-011.html index f4ac39c2574..3f6afd8a370 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-011.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-size-adjust-011.html @@ -17,7 +17,7 @@ div { clear: left; float: left; - font: 64px/128px test; + font: 60px/120px test; color: orange; background: orange; } diff --git a/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-backslant-variable.html b/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-backslant-variable.html index 4bbe2b157f5..36a4305da72 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-backslant-variable.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-backslant-variable.html @@ -3,7 +3,7 @@ <meta charset="utf-8" /> <title>CSS Test: Variable fonts with slant axis</title> <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#descdef-font-face-font-variation-settings" /> -<link rel="help" href="http://w3c.github.io/csswg-drafts/css-fonts-4/#valdef-font-style-oblique-angle-90deg-90deg" /> +<link rel="help" href="http://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle-90deg-90deg" /> <link rel="match" href="slnt-backslant-variable-ref.html"> <meta name="assert" content="For variable fonts, setting font-style to oblique or italic should apply forward and backward slant to variable axis."> diff --git a/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-variable.html b/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-variable.html index d81df09c19d..ae937037940 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-variable.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/variations/slnt-variable.html @@ -3,7 +3,7 @@ <meta charset="utf-8" /> <title>CSS Test: Variable fonts with slant axis</title> <link rel="help" href="https://www.w3.org/TR/css-fonts-4/#descdef-font-face-font-variation-settings" /> -<link rel="help" href="http://w3c.github.io/csswg-drafts/css-fonts-4/#valdef-font-style-oblique-angle-90deg-90deg" /> +<link rel="help" href="http://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle-90deg-90deg" /> <link rel="match" href="slnt-variable-ref.html"> <meta name="assert" content="For variable fonts, 'oblique' and 'italic' keywords should work equivalent to 14 degrees of slant"> diff --git a/tests/wpt/web-platform-tests/css/css-grid/animation/grid-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-grid/animation/grid-no-interpolation.html index 1293cdb9d5d..33806b85860 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/animation/grid-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-grid/animation/grid-no-interpolation.html @@ -2,10 +2,10 @@ <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#auto-tracks"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#grid-auto-flow-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#line-placement"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-grid/#propdef-grid-template-areas"> +<link rel=help href="https://drafts.csswg.org/css-grid/#auto-tracks"> +<link rel=help href="https://drafts.csswg.org/css-grid/#grid-auto-flow-property"> +<link rel=help href="https://drafts.csswg.org/css-grid/#line-placement"> +<link rel=help href="https://drafts.csswg.org/css-grid/#propdef-grid-template-areas"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/contribution-size-flex-tracks-001.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/contribution-size-flex-tracks-001.html new file mode 100644 index 00000000000..cc99f639686 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/contribution-size-flex-tracks-001.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Grid Test: Subgrid contribution size to flexible tracks</title> +<link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-size-contribution"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<style> +.grid { + background: red; + display: inline-grid; + grid-template: repeat(4, minmax(0, 1fr)) / repeat(10, minmax(0, 1fr)); +} +.subgrid { + width: 50px; + height: 50px; + background: green; + display: grid; + grid-row: 1 / -1; + grid-column: 1 / -1; + grid-template: subgrid / subgrid; +} +.item { + width: 10px; + height: 25px; +} +</style> +</head> +<body> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div class="grid"> + <div class="subgrid"> + <div class="item"></div> + </div> +</div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-001.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-001.html index e2fe1a366e5..f43c6f785d4 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-001.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-001.html @@ -8,7 +8,7 @@ <meta charset="utf-8"> <title>CSS Grid Test: Subgrid with no grid items accommodates border and padding</title> <link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"> -<link rel="help" href="https://drafts.csswg.org/css-grid-2"> +<link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-edge-placeholders"> <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <style> .wrapper { diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-002.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-002.html index a2c73b18843..aa905954b96 100644 --- a/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-002.html +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/subgrid-no-items-on-edges-002.html @@ -8,7 +8,7 @@ <meta charset="utf-8"> <title>CSS Grid Test: Subgrid with no grid items accommodates gutter size and padding</title> <link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com"> -<link rel="help" href="https://drafts.csswg.org/css-grid-2"> +<link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-edge-placeholders"> <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <style> .wrapper { diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/writing-directions-003-ref.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/writing-directions-003-ref.html new file mode 100644 index 00000000000..b8038a2b509 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/writing-directions-003-ref.html @@ -0,0 +1,60 @@ +<!DOCTYPE HTML> +<html><head> + <meta charset="utf-8"> + <title>Reference: out-of-flow subgridded items properly map repetitions</title> + <link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com"> + <link rel="help" href="https://drafts.csswg.org/css-grid-2"> + <style> + +.grid { + display: grid; + grid-template: repeat(5, 10px) repeat(5, 10px) / repeat(5, 10px) repeat(5, 10px); + background: grey; + border: 1px solid; + width: 100px; + height: 100px; +} + +.grid-item { + width: 10px; + height: 10px; + background: orange; + border: 1px solid; +} + +.rtl { direction:rtl; } + +.ltr { direction:ltr; } + + </style> +</head> +<body> + +<div class="grid rtl"> + <div class="grid-item" style="grid-column: 10; grid-row: 10;"></div> + <div class="grid-item" style="grid-column: 9; grid-row: 9;"></div> + <div class="grid-item" style="grid-column: 8; grid-row: 8;"></div> + <div class="grid-item" style="grid-column: 7; grid-row: 7;"></div> + <div class="grid-item" style="grid-column: 6; grid-row: 6;"></div> + <div class="grid-item" style="grid-column: 5; grid-row: 5;"></div> + <div class="grid-item" style="grid-column: 4; grid-row: 4;"></div> + <div class="grid-item" style="grid-column: 3; grid-row: 3;"></div> + <div class="grid-item" style="grid-column: 2; grid-row: 2;"></div> + <div class="grid-item" style="grid-column: 1; grid-row: 1;"></div> +</div> + +<div class="grid ltr"> + <div class="grid-item" style="grid-column: 10; grid-row: 10;"></div> + <div class="grid-item" style="grid-column: 9; grid-row: 9;"></div> + <div class="grid-item" style="grid-column: 8; grid-row: 8;"></div> + <div class="grid-item" style="grid-column: 7; grid-row: 7;"></div> + <div class="grid-item" style="grid-column: 6; grid-row: 6;"></div> + <div class="grid-item" style="grid-column: 5; grid-row: 5;"></div> + <div class="grid-item" style="grid-column: 4; grid-row: 4;"></div> + <div class="grid-item" style="grid-column: 3; grid-row: 3;"></div> + <div class="grid-item" style="grid-column: 2; grid-row: 2;"></div> + <div class="grid-item" style="grid-column: 1; grid-row: 1;"></div> +</div> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-grid/subgrid/writing-directions-003.html b/tests/wpt/web-platform-tests/css/css-grid/subgrid/writing-directions-003.html new file mode 100644 index 00000000000..1df5512d19e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/subgrid/writing-directions-003.html @@ -0,0 +1,74 @@ +<!DOCTYPE HTML> +<html><head> + <meta charset="utf-8"> + <title>CSS Grid Test: out-of-flow subgridded items properly map repetitions</title> + <link rel="author" title="Kurt Catti-Schmidt" href="mailto:kschmi@microsoft.com"> + <link rel="help" href="https://drafts.csswg.org/css-grid-2"> + <link rel="match" href="writing-directions-003-ref.html"> + <style> + +.grid { + display: grid; + grid-template: repeat(5, 10px) repeat(5, 10px) / repeat(5, 10px) repeat(5, 10px); + width: 100px; + height: 100px; + border: 1px solid; + background: grey; +} + +.subgrid { + position: relative; + display: grid; + grid-template: subgrid / subgrid; + grid-column: span 10; + grid-row: span 10; +} + +.grid-item { + width: 10px; + height: 10px; + background: orange; + border: 1px solid; + position: absolute; +} + +.rtl { direction:rtl; } + +.ltr { direction:ltr; } + + </style> +</head> +<body> + +<div class="grid"> + <div class="subgrid rtl"> + <div class="grid-item" style="grid-column: 10; grid-row: 10;"></div> + <div class="grid-item" style="grid-column: 9; grid-row: 9;"></div> + <div class="grid-item" style="grid-column: 8; grid-row: 8;"></div> + <div class="grid-item" style="grid-column: 7; grid-row: 7;"></div> + <div class="grid-item" style="grid-column: 6; grid-row: 6;"></div> + <div class="grid-item" style="grid-column: 5; grid-row: 5;"></div> + <div class="grid-item" style="grid-column: 4; grid-row: 4;"></div> + <div class="grid-item" style="grid-column: 3; grid-row: 3;"></div> + <div class="grid-item" style="grid-column: 2; grid-row: 2;"></div> + <div class="grid-item" style="grid-column: 1; grid-row: 1;"></div> + </div> +</div> + +<div class="grid rtl"> + <div class="subgrid ltr"> + <div class="grid-item" style="grid-column: 10; grid-row: 10;"></div> + <div class="grid-item" style="grid-column: 9; grid-row: 9;"></div> + <div class="grid-item" style="grid-column: 8; grid-row: 8;"></div> + <div class="grid-item" style="grid-column: 7; grid-row: 7;"></div> + <div class="grid-item" style="grid-column: 6; grid-row: 6;"></div> + <div class="grid-item" style="grid-column: 5; grid-row: 5;"></div> + <div class="grid-item" style="grid-column: 4; grid-row: 4;"></div> + <div class="grid-item" style="grid-column: 3; grid-row: 3;"></div> + <div class="grid-item" style="grid-column: 2; grid-row: 2;"></div> + <div class="grid-item" style="grid-column: 1; grid-row: 1;"></div> + </div> +</div> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-images/animation/image-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-images/animation/image-no-interpolation.html index 1f9faf7fbb5..1f7f68ade26 100644 --- a/tests/wpt/web-platform-tests/css/css-images/animation/image-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-images/animation/image-no-interpolation.html @@ -2,8 +2,8 @@ <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-images/#the-image-rendering"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-images/#the-image-orientation"> +<link rel=help href="https://drafts.csswg.org/css-images/#the-image-rendering"> +<link rel=help href="https://drafts.csswg.org/css-images/#the-image-orientation"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-3.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-3.html new file mode 100644 index 00000000000..78eec0f2c12 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-3.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>Image set negative resolution rendering</title> +<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-set-notation"> +<link rel="match" href="/css/reference/blank.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/red.png") calc(-1 * 1x)); + width: 100px; + height: 100px; + } +</style> +<div id="test"></div> 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 2f56fcf74b4..2dad36e8817 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 @@ -159,6 +159,14 @@ function test_non_positive_resolutions_parsing() { 'background-image', 'image-set(url("example.png") 0dpcm)' ); + test_valid_value_variants( + 'background-image', + 'image-set(url("example.png") calc(-1 * 1x))' + ); + test_valid_value_variants( + 'background-image', + 'image-set(url("example.png") calc(1x + -1x))' + ); test_invalid_value_variants( 'background-image', diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-zero-resolution-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-zero-resolution-rendering-2.html new file mode 100644 index 00000000000..ae1c765049a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-zero-resolution-rendering-2.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-set-notation"> +<link rel="match" href="/css/reference/blank.html"> +<meta name="assert" content="image-set rendering with zero resolution"> +<style> +#test { + background-image: url("/images/red.png"); + background-image: image-set(url("/images/red.png") calc(0dppx * -1)); + width: 100px; + height: 100px; +} +</style> +<div id="test"></div> + diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-zero-resolution-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-zero-resolution-rendering.html new file mode 100644 index 00000000000..0da39b7581e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-zero-resolution-rendering.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-set-notation"> +<link rel="match" href="/css/reference/blank.html"> +<meta name="assert" content="image-set rendering with zero resolution"> +<style> +#test { + background-image: url("/images/red.png"); + background-image: image-set(url("/images/red.png") 0x); + width: 100px; + height: 100px; +} +</style> +<div id="test"></div> + diff --git a/tests/wpt/web-platform-tests/css/css-inline/animation/alignment-baseline-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-inline/animation/alignment-baseline-no-interpolation.html index 8cbe0c98d81..8cacf54ff99 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/animation/alignment-baseline-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-inline/animation/alignment-baseline-no-interpolation.html @@ -2,7 +2,7 @@ <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-inline/#alignment-baseline-property"> +<link rel=help href="https://drafts.csswg.org/css-inline/#alignment-baseline-property"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-inline/animation/dominant-baseline-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-inline/animation/dominant-baseline-no-interpolation.html index 7f6be5aac2b..19266dc168d 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/animation/dominant-baseline-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-inline/animation/dominant-baseline-no-interpolation.html @@ -2,7 +2,7 @@ <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-inline/#dominant-baseline-property"> +<link rel=help href="https://drafts.csswg.org/css-inline/#dominant-baseline-property"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-inline/initial-letter-no-interoplation.html b/tests/wpt/web-platform-tests/css/css-inline/animation/initial-letter-no-interpolation.html index 1efc4123ca2..2d57ce2aa44 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/initial-letter-no-interoplation.html +++ b/tests/wpt/web-platform-tests/css/css-inline/animation/initial-letter-no-interpolation.html @@ -2,7 +2,7 @@ <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-inline/#sizing-drop-initials"> +<link rel=help href="https://drafts.csswg.org/css-inline/#sizing-drop-initials"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-computed.html b/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-computed.html index e46306259a7..eae4aad9fb9 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-computed.html +++ b/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-computed.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>Tests parsing of the initial-letter property</title> <link rel="author" title="Google LLC" href="https://www.google.com/"> -<link rel="help" href="https://https://w3c.github.io/csswg-drafts/css-inline-3/#sizing-drop-initials"> +<link rel="help" href="https://drafts.csswg.org/css-inline-3/#sizing-drop-initials"> <meta name="assert" content="initial-letter supports the full grammar 'normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]?'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-invalid.html b/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-invalid.html index 574a347bda8..645372c0a95 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-invalid.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>Tests parsing of the initial-letter property</title> <link rel="author" title="Google LLC" href="https://www.google.com/"> -<link rel="help" href="https://https://w3c.github.io/csswg-drafts/css-inline-3/#sizing-drop-initials"> +<link rel="help" href="https://drafts.csswg.org/css-inline-3/#sizing-drop-initials"> <meta name="assert" content="initial-letter supports the full grammar 'normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]?'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-valid.html b/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-valid.html index 3c1e32811d8..b02c564504f 100644 --- a/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-valid.html +++ b/tests/wpt/web-platform-tests/css/css-inline/initial-letter/initial-letter-valid.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>Tests parsing of the initial-letter property</title> <link rel="author" title="Google LLC" href="https://www.google.com/"> -<link rel="help" href="https://https://w3c.github.io/csswg-drafts/css-inline-3/#sizing-drop-initials"> +<link rel="help" href="https://drafts.csswg.org/css-inline-3/#sizing-drop-initials"> <meta name="assert" content="initial-letter supports the full grammar 'normal | <number [1,∞]> <integer [1,∞]> | <number [1,∞]> && [ drop | raise ]?'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length1.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length1.html index d6d04858b5a..f647c1af590 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length1.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length1.html @@ -7,7 +7,7 @@ width: 100px; height: 100px; background-color: green; - animation: clippath2 10s, clippath1 0.001s; + animation: clippath2 10s step-end, clippath1 0.001s; } @keyframes clippath1 { diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length2.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length2.html index 0d86120ef35..bc3460111f7 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length2.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length2.html @@ -7,7 +7,7 @@ width: 100px; height: 100px; background-color: green; - animation: clippath2 10s, clippath1 2s 1s; + animation: clippath2 100s step-end, clippath1 20s 30s; } @keyframes clippath1 { diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length3.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length3.html index 3c8141ad2de..5a66568132a 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length3.html +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/animations/two-clip-path-animation-diff-length3.html @@ -7,7 +7,7 @@ width: 100px; height: 100px; background-color: green; - animation: clippath2 10000s, clippath1 2s 0.001s; + animation: clippath2 10000s step-end, clippath1 20s 0.001s; } /* Use un-interpolatable keyframes to force discrete transition */ diff --git a/tests/wpt/web-platform-tests/css/css-multicol/parsing/column-rule-valid.html b/tests/wpt/web-platform-tests/css/css-multicol/parsing/column-rule-valid.html index 4743988f7d5..30da6380fcb 100644 --- a/tests/wpt/web-platform-tests/css/css-multicol/parsing/column-rule-valid.html +++ b/tests/wpt/web-platform-tests/css/css-multicol/parsing/column-rule-valid.html @@ -16,6 +16,7 @@ test_valid_value("column-rule", "dotted"); test_valid_value("column-rule", "red"); test_valid_value("column-rule", "currentcolor hidden medium", "hidden"); +test_valid_value("column-rule", "currentcolor none medium", "medium"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-overflow/inheritance.html b/tests/wpt/web-platform-tests/css/css-overflow/inheritance.html index 976406be413..ffc6b2f8819 100644 --- a/tests/wpt/web-platform-tests/css/css-overflow/inheritance.html +++ b/tests/wpt/web-platform-tests/css/css-overflow/inheritance.html @@ -23,6 +23,7 @@ assert_not_inherited('overflow-inline', 'visible', 'scroll'); assert_not_inherited('overflow-x', 'visible', 'scroll'); assert_not_inherited('overflow-y', 'visible', 'scroll'); assert_not_inherited('text-overflow', 'clip', 'ellipsis'); +assert_not_inherited('scrollbar-gutter', 'auto', 'stable'); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-overflow/parsing/scrollbar-gutter-invalid.html b/tests/wpt/web-platform-tests/css/css-overflow/parsing/scrollbar-gutter-invalid.html index 4f669225ee4..e59790c32eb 100644 --- a/tests/wpt/web-platform-tests/css/css-overflow/parsing/scrollbar-gutter-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-overflow/parsing/scrollbar-gutter-invalid.html @@ -34,4 +34,10 @@ test_invalid_value("scrollbar-gutter", "always force"); test_invalid_value("scrollbar-gutter", "always both force"); + test_invalid_value("scrollbar-gutter", "auto stable"); + test_invalid_value("scrollbar-gutter", "auto both-edges"); + test_invalid_value("scrollbar-gutter", "both-edges"); + test_invalid_value("scrollbar-gutter", "both-edges auto"); + test_invalid_value("scrollbar-gutter", "stable auto"); + </script> diff --git a/tests/wpt/web-platform-tests/css/css-position/overlay/green-ref.html b/tests/wpt/web-platform-tests/css/css-position/overlay/green-ref.html new file mode 100644 index 00000000000..bef7405e96f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/overlay/green-ref.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<title>CSS Test Reference</title> +<body style="background-color:green"></body> diff --git a/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-popover-backdrop-crash.html b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-popover-backdrop-crash.html new file mode 100644 index 00000000000..f59fc5db4ae --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-popover-backdrop-crash.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Position Test: Chrome crash for ::backdrop transitioning overlay for popover</title> +<link rel="help" href="https://crbug.com/1446479"> +<script src="/common/reftest-wait.js"></script> +<style> + #popover { + transition: overlay 60s step-end; + display: block; + } + #popover::backdrop { + background: rgba(0, 0, 0, 0.2); + } +</style> +<p>PASS if no crash.</p> +<div id="popover" popover></div> +<script> + requestAnimationFrame(() => { + popover.showPopover(); + requestAnimationFrame(() => { + popover.hidePopover(); + takeScreenshot(); + }); + }); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-finished.html b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-finished.html new file mode 100644 index 00000000000..bf0aefac3f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-finished.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Positioned Layout Module Test: 'overlay' rendering on top after transition finished</title> +<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/popover.html"> +<link rel="match" href="green-ref.html"> +<script src="/common/reftest-wait.js"></script> +<style> + #transition-in, #red { + /* Force display:block both popover open or closed to not rely on + @starting-style or display transitions. */ + display: block; + border: none; + width: 100vw; + height: 100vh; + } + #red { + position: fixed; + background-color: red; + } + #transition-in { + transition: overlay 0.1s step-end; + background-color: green; + } +</style> +<div id="transition-in" popover></div> +<div id="red"></div> +<script> + let transition_in = document.querySelector("#transition-in"); + transition_in.addEventListener("transitionend", () => takeScreenshot()); + // Force style update to have before-change style for overlay transition. + transition_in.offsetTop; + transition_in.showPopover(); + if (getComputedStyle(transition_in).overlay != "none") { + // Transition didn't start, force a fail condition. + transition_in.style.backgroundColor = "pink"; + takeScreenshot(); + } +</script> diff --git a/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-in-rendering.html b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-in-rendering.html new file mode 100644 index 00000000000..c794ec23a2d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-in-rendering.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<title>CSS Positioned Layout Module Test: 'overlay' transitioning in not rendered in top layer</title> +<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/popover.html"> +<link rel="match" href="green-ref.html"> +<style> + #transition-in, #green { + /* Force display:block both popover open or closed to not rely on + @starting-style or display transitions. */ + display: block; + border: none; + width: 100vw; + height: 100vh; + } + #green { + background-color: green; + } + #transition-in { + transition: overlay 60s step-end; + background-color: red; + } +</style> +<div id="green" popover="manual"></div> +<div id="transition-in" popover="manual"></div> +<script> + document.querySelector("#green").showPopover(); + document.querySelector("#transition-in").showPopover(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-out-rendering.html b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-out-rendering.html new file mode 100644 index 00000000000..9c658c574cd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition-out-rendering.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>CSS Positioned Layout Module Test: 'overlay' transitioning out still rendered in top layer</title> +<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/popover.html"> +<link rel="match" href="green-ref.html"> +<style> + #green, #red { + /* Force display:block both popover open or closed to not rely on + @starting-style or display transitions. */ + display: block; + border: none; + width: 100vw; + height: 100vh; + } + #red { + background-color: red; + } + #green { + background-color: green; + } + #green.transition-enabled { + transition: overlay 60s step-end; + } +</style> +<div id="red" popover="manual"></div> +<div id="green" popover="manual"></div> +<script> + red.showPopover(); + green.showPopover(); + document.body.offsetTop; + green.className = "transition-enabled"; + green.hidePopover(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition.html b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition.html new file mode 100644 index 00000000000..2d641c54667 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/overlay/overlay-transition.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<title>CSS Positioned Layout Module Test: 'overlay' is transitioned in and out of 'auto'</title> +<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/popover.html"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + #transition-in, #transition-out { + /* Force display:block both popover open or closed to not rely on + @starting-style or display transitions. */ + display: block; + } + .enable-transitions :is(#transition-in, #transition-out) { + transition: overlay 60s step-end; + } +</style> +<div id="container"> + <div id="transition-in" popover></div> + <div id="transition-out" popover></div> +</div> +<script> + let transition_in = document.querySelector("#transition-in"); + let transition_out = document.querySelector("#transition-out"); + + test(() => { + transition_out.showPopover(); + assert_equals(getComputedStyle(transition_in).overlay, "none"); + assert_equals(getComputedStyle(transition_out).overlay, "auto"); + }, "Open the popover to be closed and verify computed overlay for both popovers"); + + container.className = "enable-transitions"; + + test(() => { + assert_true(transition_out.matches(':popover-open')); + assert_false(transition_in.matches(':popover-open')); + transition_in.showPopover(); + assert_true(transition_in.matches(':popover-open')); + assert_false(transition_out.matches(':popover-open')); + assert_equals(getComputedStyle(transition_in).overlay, "none", + 'Transition in should be delayed'); + assert_equals(getComputedStyle(transition_out).overlay, "auto", + 'Transition out should be delayed'); + }, "Transition overlays"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/at-property.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/at-property.html index b91b143e368..95d30af15a2 100644 --- a/tests/wpt/web-platform-tests/css/css-properties-values-api/at-property.html +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/at-property.html @@ -43,15 +43,29 @@ function test_descriptor(descriptor, specified_value, expected_value) { test_descriptor('syntax', '"<color>"', '<color>'); test_descriptor('syntax', '"<color> | none"', '<color> | none'); test_descriptor('syntax', '"<color># | <image> | none"', '<color># | <image> | none'); +test_descriptor('syntax', '"foo | <length>#"', 'foo | <length>#'); test_descriptor('syntax', '"foo | bar | baz"', 'foo | bar | baz'); -test_descriptor('syntax', '"*"', '*'); test_descriptor('syntax', '"notasyntax"', 'notasyntax'); +// syntax: universal +for (const syntax of ["*", " * ", "* ", "\t*\t"]) { + test_descriptor('syntax', `"${syntax}"`, syntax); +} + test_descriptor('syntax', 'red', ''); test_descriptor('syntax', 'rgb(255, 0, 0)', ''); test_descriptor('syntax', '<color>', ''); test_descriptor('syntax', 'foo | bar', ''); +// syntax: pipe between components +test_descriptor('syntax', 'foo bar', ''); +test_descriptor('syntax', 'Foo <length>', ''); +test_descriptor('syntax', 'foo, bar', ''); +test_descriptor('syntax', '<length> <percentage>', ''); + +// syntax: leaading bar +test_descriptor('syntax', '|<length>', ''); + // initial-value test_descriptor('initial-value', '10px'); test_descriptor('initial-value', 'rgb(1, 2, 3)'); diff --git a/tests/wpt/web-platform-tests/css/selectors/file-control-button-float.html b/tests/wpt/web-platform-tests/css/css-pseudo/file-selector-button-float.html index a9299ce3c43..a9299ce3c43 100644 --- a/tests/wpt/web-platform-tests/css/selectors/file-control-button-float.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/file-selector-button-float.html diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-computed-style.html b/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-computed-style.html index c50ee33ae91..c706edc02fc 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-computed-style.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-computed-style.html @@ -4,8 +4,8 @@ <head> <meta charset="UTF-8" /> <link rel="author" title="Karl Dubost" href="https://github.com/karlcow" /> - <link rel="help" href="https://w3c.github.io/csswg-drafts/css-pseudo/#marker-pseudo" /> - <link rel="help" href="https://w3c.github.io/csswg-drafts/css-variables/#defining-variables" /> + <link rel="help" href="https://drafts.csswg.org/css-pseudo/#marker-pseudo" /> + <link rel="help" href="https://drafts.csswg.org/css-variables/#defining-variables" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <title>::marker with variables</title> diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-ref.html b/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-ref.html index d966437560d..d2ea847faf6 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-ref.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable-ref.html @@ -5,11 +5,11 @@ <link rel="author" title="Karl Dubost" href="https://github.com/karlcow" /> <link rel="help" - href="https://w3c.github.io/csswg-drafts/css-pseudo/#marker-pseudo" + href="https://drafts.csswg.org/css-pseudo/#marker-pseudo" /> <link rel="help" - href="https://w3c.github.io/csswg-drafts/css-variables/#defining-variables" + href="https://drafts.csswg.org/css-variables/#defining-variables" /> <title>::marker with variables</title> <style> diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable.html b/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable.html index 3d0a7c8596e..eb349c98dfb 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/marker-variable.html @@ -3,8 +3,8 @@ <head> <meta charset="UTF-8" /> <link rel="author" title="Karl Dubost" href="https://github.com/karlcow" /> - <link rel="help" href="https://w3c.github.io/csswg-drafts/css-pseudo/#marker-pseudo" /> - <link rel="help" href="https://w3c.github.io/csswg-drafts/css-variables/#defining-variables" /> + <link rel="help" href="https://drafts.csswg.org/css-pseudo/#marker-pseudo" /> + <link rel="help" href="https://drafts.csswg.org/css-variables/#defining-variables" /> <link rel="match" href="marker-variable-ref.html"> <title>::marker with variables</title> <style> diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-color-parsing.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-color-parsing.html new file mode 100644 index 00000000000..17b649d54c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-color-parsing.html @@ -0,0 +1,26 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Scrollbars: parsing scrollbar-color declarations</title> +<link rel="help" href="https://drafts.csswg.org/css-scrollbars/"/> +<meta name="assert" content="Parsing scrollbar-color declarations"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<script> + test_valid_value('scrollbar-color', 'initial'); + test_valid_value('scrollbar-color', 'inherit'); + test_valid_value('scrollbar-color', 'unset'); + test_valid_value('scrollbar-color', 'revert'); + test_valid_value('scrollbar-color', 'auto'); + test_valid_value("scrollbar-color", "red green"); + test_valid_value("scrollbar-color", "#FF0000 #00FF00", "rgb(255, 0, 0) rgb(0, 255, 0)"); + test_valid_value("scrollbar-color", "currentcolor currentcolor"); + + test_invalid_value("scrollbar-color", ""); + test_invalid_value("scrollbar-color", "auto auto"); + test_invalid_value("scrollbar-color", "auto currentcolor"); + test_invalid_value("scrollbar-color", "red"); + test_invalid_value("scrollbar-color", "#FF0000"); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/animation/height-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-sizing/animation/height-no-interpolation.html index 902fe2e22f8..5738ae03011 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/animation/height-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/animation/height-no-interpolation.html @@ -2,7 +2,7 @@ <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-sizing/#preferred-size-properties"> +<link rel=help href="https://drafts.csswg.org/css-sizing/#preferred-size-properties"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/interpolation-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-033.html b/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-033.html index 68192a83790..f98a48a0a97 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-033.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/contain-intrinsic-size/contain-intrinsic-size-033.html @@ -1,9 +1,9 @@ <!DOCTYPE html> <meta charset="utf-8"> <title>CIS + content-visibility:hidden and contain:size</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-sizing-4/#explicit-intrinsic-inner-size"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-contain-2/#size-containment"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-contain-2/#using-cv-hidden"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#explicit-intrinsic-inner-size"> +<link rel="help" href="https://drafts.csswg.org/css-contain-2/#size-containment"> +<link rel="help" href="https://drafts.csswg.org/css-contain-2/#using-cv-hidden"> <meta name="assert" content="Tests that CIS + content-visibility:hidden should be same to CIS + contain:size" /> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-abspos.html b/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-abspos.html index d8ce91f9f62..8ed6771483d 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-abspos.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-abspos.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-sizing-4/#valdef-width-fit-content"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#valdef-width-fit-content"> <link rel="match" href="fit-content-block-size-fixedpos-ref.html"> <style> body { diff --git a/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-fixedpos.html b/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-fixedpos.html index 1f08c6ab9f2..052435ba937 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-fixedpos.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/fit-content-block-size-fixedpos.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-sizing-4/#valdef-width-fit-content"> +<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#valdef-width-fit-content"> <link rel="match" href="fit-content-block-size-fixedpos-ref.html"> <style> #container { diff --git a/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0-ref.html index 296cc593319..7a8319d6546 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0-ref.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0-ref.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css2/#propdef-min-height"> +<link rel="help" href="https://drafts.csswg.org/css2/#propdef-min-height"> <meta name="assert" content="Image percentage min-height cannot be resolved and used value should be 0"> </head> <body> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0.html b/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0.html index 3b5dd2aedd0..ef3da031002 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/grid-item-image-percentage-min-height-computes-as-0.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css2/#propdef-min-height"> +<link rel="help" href="https://drafts.csswg.org/css2/#propdef-min-height"> <link rel="match" href="grid-item-image-percentage-min-height-computes-as-0-ref.html"> <meta name="assert" content="Image percentage min-height cannot be resolved and used value should be 0"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none-ref.html index 6a290b23a80..34e2ed01e52 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none-ref.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none-ref.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css2/#propdef-max-height"> +<link rel="help" href="https://drafts.csswg.org/css2/#propdef-max-height"> <meta name="assert" content="Image percentage max-height cannot be resolved and used value should be none"> </head> <body> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none.html b/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none.html index afac4641477..06b70f18e3d 100644 --- a/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none.html +++ b/tests/wpt/web-platform-tests/css/css-sizing/nested-flexbox-image-percentage-max-height-computes-as-none.html @@ -2,7 +2,7 @@ <html> <head> <link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css2/#propdef-max-height"> +<link rel="help" href="https://drafts.csswg.org/css2/#propdef-max-height"> <link rel="match" href="nested-flexbox-image-percentage-max-height-computes-as-none-ref.html"> <meta name="assert" content="Image percentage max-height cannot be resolved and used value should be none"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-syntax/non-ascii-codepoints.html b/tests/wpt/web-platform-tests/css/css-syntax/non-ascii-codepoints.html new file mode 100644 index 00000000000..c416955d4e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-syntax/non-ascii-codepoints.html @@ -0,0 +1,81 @@ +<!doctype html> +<title>Non-ASCII codepoints</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<meta name="author" title="Tab Atkins-Bittner"> +<link rel=help href="https://drafts.csswg.org/css-syntax/#non-ascii-ident-code-point"> + +<script> +function validIdentChar(cp) { + // Reset to a known-good ident + document.head.style.animationName = "foo"; + // Then change to a name containing the char + document.head.style.animationName = "f"+String.fromCodePoint(cp)+"oo"; + // And see if it actually changed. + return document.head.style.animationName != "foo"; +} + +function testValid(cp) { + test(()=>{ + assert_true(validIdentChar(cp)); + }, `Codepoint U+${cp.toString(16)} is a valid 'non-ASCII ident codepoint'.`) +} + +function testInvalid(cp) { + // Just skip if the codepoint is outside the possible range. + if(cp > 0x1ffff) return; + test(()=>{ + assert_false(validIdentChar(cp)); + }, `Codepoint U+${cp.toString(16)} is not a 'non-ASCII ident codepoint'.`) +} + +function testValidRanges(ranges) { + // Takes an array of codepoints or codepoints ranges, + // and tests whether the start, end, and middle of + // each range is valid, and confirms that the + // start/end of the regions between them are invalid. + + for(const range of ranges) { + if(typeof range == "number") { + testValid(range); + continue; + } + testValid(range[0]); + if(range[1] - range[0] > 1) { + testValid(Math.floor((range[0]+range[1])/2)); + } + testValid(range[1]); + } + testInvalid(0x80); + var lastTested = 0x80; + for(const range of ranges) { + if(typeof range == "number") { + if(range-1 != lastTested) testInvalid(range-1); + testInvalid(range+1); + lastTested = range+1; + continue; + } + if(range[0]-1 != lastTested) testInvalid(range[0]-1); + testInvalid(range[1]+1); + lastTested = range[1]+1; + } + +} + +testValidRanges([ + 0xb7, + [0xc0, 0xd6], + [0xd8, 0xf6], + [0xf8, 0x37d], + [0x37f, 0x1fff], + [0x200c, 0x200d], + [0x203f, 0x2040] + [0x2070, 0x218f], + [0x2c00, 0x2fef], + [0x3001, 0xd7ff], + [0xf900, 0xfdcf], + [0xfdf0, 0xfffd], + [0x10000, 0x1ffff], +]); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-text/animations/hyphen-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-text/animations/hyphen-no-interpolation.html index e1e89d17723..95a3ff5ee56 100644 --- a/tests/wpt/web-platform-tests/css/css-text/animations/hyphen-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-text/animations/hyphen-no-interpolation.html @@ -1,9 +1,9 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-character"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-limit-chars"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-text/#hyphens-property"> +<link rel=help href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-character"> +<link rel=help href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-chars"> +<link rel=help href="https://drafts.csswg.org/css-text/#hyphens-property"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-text/animations/line-break-no-interpolation.html b/tests/wpt/web-platform-tests/css/css-text/animations/line-break-no-interpolation.html index 937b2483662..b6fc5f932ec 100644 --- a/tests/wpt/web-platform-tests/css/css-text/animations/line-break-no-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-text/animations/line-break-no-interpolation.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <link rel=author href="mailto:jarhar@chromium.org"> <link rel=help href="https://github.com/w3c/csswg-drafts/issues/4441"> -<link rel=help href="https://w3c.github.io/csswg-drafts/css-text/#line-break-property"> +<link rel=help href="https://drafts.csswg.org/css-text/#line-break-property"> <link rel=help href="https://drafts.csswg.org/css-transitions-2/#transition-property-property"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-text/inheritance.html b/tests/wpt/web-platform-tests/css/css-text/inheritance.html index c94f7c5ee28..83d1d4971ea 100644 --- a/tests/wpt/web-platform-tests/css/css-text/inheritance.html +++ b/tests/wpt/web-platform-tests/css/css-text/inheritance.html @@ -29,6 +29,7 @@ assert_inherited('text-justify', 'auto', 'inter-character'); assert_inherited('text-transform', 'none', 'uppercase'); assert_inherited('text-wrap', 'wrap', 'nowrap'); assert_inherited('white-space', 'normal', 'pre-wrap'); +assert_inherited('white-space-collapse', 'collapse', 'preserve'); assert_inherited('word-break', 'normal', 'break-all'); assert_inherited('word-spacing', '0px', '10px'); assert_inherited('word-wrap', 'normal', 'break-word'); diff --git a/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-computed.html b/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-computed.html index cf18f25ba74..bc265c8e81e 100644 --- a/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-computed.html +++ b/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-computed.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>CSS Text: hyphenate-limit-chars with computed values</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-limit-chars"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-chars"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/computed-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-invalid.html b/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-invalid.html index 5a797fa8181..db68f403c11 100644 --- a/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-invalid.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>CSS Text: parsing hyphenate-limit-chars with invalid values</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-limit-chars"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-chars"> <meta name="assert" content="hyphenate-character supports only the grammar 'none | manual | auto'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-valid.html b/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-valid.html index 699ddd4ab07..2f10e33f1de 100644 --- a/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-valid.html +++ b/tests/wpt/web-platform-tests/css/css-text/parsing/hyphenate-limit-chars-valid.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>CSS Text: parsing hyphenate-limit-chars with valid values</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-hyphenate-limit-chars"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-hyphenate-limit-chars"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap.html b/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap.html index 0600b8249e5..de6d9f5145d 100644 --- a/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap.html +++ b/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand-text-wrap.html @@ -1,6 +1,6 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-white-space"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-text-wrap"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-white-space"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-text-wrap"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand.html b/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand.html index 518f81fdbf2..a7788f74ae3 100644 --- a/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand.html +++ b/tests/wpt/web-platform-tests/css/css-text/parsing/white-space-shorthand.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>CSS Text Module Test: parsing white-space as a shorthand</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#propdef-white-space"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#propdef-white-space"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-text/text-indent/text-indent-min-max-content-001.html b/tests/wpt/web-platform-tests/css/css-text/text-indent/text-indent-min-max-content-001.html index 99592df5c5b..93ddac50d6b 100644 --- a/tests/wpt/web-platform-tests/css/css-text/text-indent/text-indent-min-max-content-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/text-indent/text-indent-min-max-content-001.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-3/#text-indent-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#text-indent-property"> <link rel="match" href="reference/text-indent-min-max-content-001-ref.html"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-006.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-006.html index c13a28e95fc..056aa8a21bc 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-006.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-006.html @@ -22,7 +22,7 @@ div { span { color: green; } .test { color: green; - width: 4ch; + width: 4.1ch; /* ".1" to cover floating point errors. */ white-space: break-spaces; word-break: break-all; diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-011.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-011.html index 8c40a31a356..0355d6d6b51 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-011.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-011.html @@ -21,7 +21,7 @@ div { .fail span { color: green; } .test { color: green; - width: 4ch; + width: 4.1ch; /* ".1" to cover floating point errors. */ white-space: break-spaces; } </style> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-001-ref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-001-ref.html new file mode 100644 index 00000000000..82b10ac6a4a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-001-ref.html @@ -0,0 +1,22 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text reference</title> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.ref { + white-space: normal; + text-align: justify; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div class=ref>one two three four five six seven eight nine ten</div> + +<div class=ref>one two three four five six seven eight nine ten</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-002-ref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-002-ref.html new file mode 100644 index 00000000000..cd228e234cd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-002-ref.html @@ -0,0 +1,22 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text reference</title> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.ref { + white-space: normal; + text-align: justify; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div class=ref>one two three four five six seven eight nine ten</div> + +<div class=ref>one two three four five six seven eight nine ten</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-003-ref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-003-ref.html new file mode 100644 index 00000000000..d72988230e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-003-ref.html @@ -0,0 +1,22 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text reference</title> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.ref { + white-space: normal; + text-align: justify; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div class=ref>one two three<br> four five six seven eight nine ten</div> + +<div class=ref>one two three<br> four five six seven eight nine ten</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-004-ref.html b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-004-ref.html new file mode 100644 index 00000000000..be487e6f3c6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/reference/white-space-pre-wrap-justify-004-ref.html @@ -0,0 +1,23 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text reference</title> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.ref { + white-space: normal; + text-align: justify; + text-align-last: right; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div class=ref>,one, two, three<br>four, five, six, !seven, eight, nine</div> + +<div class=ref>,one, two, three<br>four, five, six, !seven, eight, nine</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/support/trailing-space-and-text-alignment.css b/tests/wpt/web-platform-tests/css/css-text/white-space/support/trailing-space-and-text-alignment.css new file mode 100644 index 00000000000..3bb9b369fc7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/support/trailing-space-and-text-alignment.css @@ -0,0 +1,24 @@ +textarea { + /* Reset user-agent style */ + margin: initial; + padding: initial; + border: initial; + border-radius: initial; + outline: initial; + resize: initial; + overflow-wrap: initial; + + height: 100px; + font: 40px/1 Ahem; + border: 1px solid black; + overflow-y: hidden; + overflow-x: auto; + + /* testing */ + width: 3ch; +} +.left { text-align: left; } +.center { text-align: center; } +.right { text-align: right; } +.start { text-align: start; } +.end { text-align: end; } diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-001.html index 3360681d0fc..4e1829f4999 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-001.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#text-wrap"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#text-wrap"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-002.html b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-002.html index 7366c6ac0f1..cae9d54de0e 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-002.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-002.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#valdef-text-wrap-balance"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#valdef-text-wrap-balance"> <link rel="mismatch" href="reference/text-wrap-balance-002-ref.html"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-align-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-align-001.html index b4659613c85..b27823b72a4 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-align-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-align-001.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#valdef-text-wrap-balance"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#valdef-text-wrap-balance"> <link rel="match" href="reference/text-wrap-balance-align-001-ref.html"> <style> .container { diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-dynamic-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-dynamic-001.html index 8c7d27d1a34..76b4cbbb433 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-dynamic-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-dynamic-001.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#valdef-text-wrap-balance"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#valdef-text-wrap-balance"> <link rel="match" href="reference/text-wrap-balance-dynamic-001-ref.html"> <style> #container { diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-line-clamp-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-line-clamp-001.html index 292e655464b..f104a5261bc 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-line-clamp-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-line-clamp-001.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#valdef-text-wrap-balance"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#valdef-text-wrap-balance"> <link rel="match" href="reference/text-wrap-balance-line-clamp-001-ref.html"> <style> .container { diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-text-indent-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-text-indent-001.html index e06d91e599e..0fe4447acfb 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-text-indent-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/text-wrap-balance-text-indent-001.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#valdef-text-wrap-balance"> +<link rel="help" href="https://drafts.csswg.org/css-text-4/#valdef-text-wrap-balance"> <link rel="match" href="reference/text-wrap-balance-text-indent-001-ref.html"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-001.html index 011518bdd84..2165e7fe4a8 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-001.html @@ -9,32 +9,12 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-normal"> <link rel="match" href="reference/trailing-space-and-text-alignment-001-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: normal' hang and shouldn't cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: normal; +textarea { + white-space: normal; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html index a015c74766a..30e37908a22 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-002.html @@ -9,32 +9,12 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre"> <link rel="match" href="reference/trailing-space-and-text-alignment-002-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: pre' shouldn't hang and may cause overflow and activate the scrollbars."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: pre; - } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } +textarea { + white-space: pre; +} </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-003.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-003.html index 9d0c971830f..9995e240580 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-003.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-003.html @@ -9,32 +9,12 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap"> <link rel="match" href="reference/trailing-space-and-text-alignment-001-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: pre-wrap' hang and shouldn't cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: pre-wrap; +textarea { + white-space: pre-wrap; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html index 2328afa7492..3d7aad05418 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-004.html @@ -9,32 +9,12 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> <link rel="match" href="reference/trailing-space-and-text-alignment-002-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: break-spaces' shouldn't hang and may cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: break-spaces; +textarea { + white-space: break-spaces; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-005.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-005.html index 059a2af436d..76348aaf216 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-005.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-005.html @@ -9,32 +9,12 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-line"> <link rel="match" href="reference/trailing-space-and-text-alignment-001-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: pre-line' hang and shouldn't cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: pre-line; +textarea { + white-space: pre-line; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-001.html index 5351fdc5f74..6e70740cdde 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-001.html @@ -9,33 +9,13 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-normal"> <link rel="match" href="reference/trailing-space-and-text-alignment-rtl-001-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: normal' hang and shouldn't cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: normal; - direction: rtl; +textarea { + white-space: normal; + direction: rtl; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html index 8fdf694390d..0422506b516 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-002.html @@ -9,33 +9,13 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre"> <link rel="match" href="reference/trailing-space-and-text-alignment-rtl-002-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: pre' shouldn't hang and may cause overflow and activate the scrollbars."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: pre; - direction: rtl; - } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } +textarea { + white-space: pre; + direction: rtl; +} </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-003.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-003.html index 00186110d7d..70fc786924a 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-003.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-003.html @@ -9,33 +9,13 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-wrap"> <link rel="match" href="reference/trailing-space-and-text-alignment-rtl-001-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: pre-wrap' hang and shouldn't cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: pre-wrap; - direction: rtl; +textarea { + white-space: pre-wrap; + direction: rtl; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html index 628c7fa70f7..7705d6dfb14 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-004.html @@ -9,33 +9,13 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-break-spaces"> <link rel="match" href="reference/trailing-space-and-text-alignment-rtl-005-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: break-spaces' shouldn't hang and may cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: break-spaces; - direction: rtl; +textarea { + white-space: break-spaces; + direction: rtl; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-005.html b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-005.html index bb695067146..31afbe4b3a8 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-005.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/trailing-space-and-text-alignment-rtl-005.html @@ -9,33 +9,13 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-white-space-pre-line"> <link rel="match" href="reference/trailing-space-and-text-alignment-rtl-001-ref.html"> <meta name="assert" content="preserved trailing spaces under 'white-space: pre-line' hang and shouldn't cause overflow and activate the horizontal scrollbar."> -<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="support/trailing-space-and-text-alignment.css"> <style> - textarea { - /* Reset user-agent style */ - margin: initial; - padding: initial; - border: initial; - outline: initial; - resize: initial; - overflow-wrap: initial; - - height: 100px; - font: 40px/1 Ahem; - border: 1px solid black; - overflow-y: hidden; - overflow-x: auto; - - /* testing */ - width: 3ch; - white-space: pre-line; - direction: rtl; +textarea { + white-space: pre-line; + direction: rtl; } -.left { text-align: left; } -.center { text-align: center; } -.right { text-align: right; } -.start { text-align: start; } -.end { text-align: end; } </style> <textarea class="left">XXX X</textarea> <textarea class="center">XXX X</textarea> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-017.html b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-017.html index 9c2bc31947e..978dfb8ba4a 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-017.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-017.html @@ -12,7 +12,7 @@ <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-3958"> + <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-4400"> <meta content="When 'white-space' is 'pre-wrap', preserved white spaces at the beginning and at the end of the line affect the intrinsic max-content size." name="assert"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-018.html b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-018.html index cc9117f88b5..707e19adc0e 100644 --- a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-018.html +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-intrinsic-size-018.html @@ -12,7 +12,7 @@ <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> - <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-3958"> + <meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-4400"> <meta content="When 'white-space' is 'pre', preserved white spaces at the beginning and at the end of the line affect the intrinsic max-content size." name="assert"> <style> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-001.html b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-001.html new file mode 100644 index 00000000000..2ceb8d72936 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-001.html @@ -0,0 +1,29 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text test: justification with white-space:pre-wrap</title> +<link rel="author" title="Jonathan Kew" href="jkew@mozilla.com"> +<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-align-property"> +<link rel="match" href="reference/white-space-pre-wrap-justify-001-ref.html"> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.test { + white-space: pre-wrap; + text-align: justify; +} +.ref { + white-space: normal; + text-align: justify; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div class=test>one two three four five six seven eight nine ten</div> + +<div class=ref>one two three four five six seven eight nine ten</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-002.html b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-002.html new file mode 100644 index 00000000000..785ebef2272 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-002.html @@ -0,0 +1,29 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text test: justification with white-space:pre-wrap</title> +<link rel="author" title="Jonathan Kew" href="jkew@mozilla.com"> +<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-align-property"> +<link rel="match" href="reference/white-space-pre-wrap-justify-002-ref.html"> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.test { + white-space: pre-wrap; + text-align: justify; +} +.ref { + white-space: normal; + text-align: justify; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div class=test>one two three four five six seven eight nine ten</div> + +<div class=ref>one two three four five six seven eight nine ten</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-003.html b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-003.html new file mode 100644 index 00000000000..a00f9c38186 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-003.html @@ -0,0 +1,30 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text test: justification with white-space:pre-wrap</title> +<link rel="author" title="Jonathan Kew" href="jkew@mozilla.com"> +<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-align-property"> +<link rel="match" href="reference/white-space-pre-wrap-justify-003-ref.html"> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.test { + white-space: pre-wrap; + text-align: justify; +} +.ref { + white-space: normal; + text-align: justify; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div class=test>one two three + four five six seven eight nine ten</div> + +<div class=ref>one two three<br> four five six seven eight nine ten</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-004.html b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-004.html new file mode 100644 index 00000000000..e1611a3143f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/white-space-pre-wrap-justify-004.html @@ -0,0 +1,31 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Text test: justification with white-space:pre-wrap</title> +<link rel="author" title="Jonathan Kew" href="jkew@mozilla.com"> +<link rel="help" href="https://www.w3.org/TR/css-text-3/#text-align-property"> +<link rel="match" href="reference/white-space-pre-wrap-justify-004-ref.html"> + +<style> +div { + border: 1px solid gray; + font: 22px monospace; + width: 22ch; + margin: 1em; +} +.test { + white-space: pre-wrap; + text-align: justify; +} +.ref { + white-space: normal; + text-align: justify; + text-align-last: right; +} +</style> + +<p>Test passes if the two blocks are rendered identically</p> + +<div dir=rtl class=test>one, two, three, +four, five, six, seven, eight, nine!</div> + +<div class=ref>,one, two, three<br>four, five, six, !seven, eight, nine</div> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-003.html b/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-003.html index 6bd015ae181..40b69fb35bf 100644 --- a/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-003.html +++ b/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-003.html @@ -11,7 +11,7 @@ that various combinations of rotate() with different units are equivalent to rotate(45deg)."> <link rel="match" href="transform-rotate-001-ref.html"> - <meta name="fuzzy" content="maxDifference=0-9;totalPixels=0-10"> + <meta name="fuzzy" content="maxDifference=0-9;totalPixels=0-11"> <link rel="mismatch" href="transform-rotate-001-notref.html"> <style> div { diff --git a/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-004.html b/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-004.html index a7943e64bd5..58f8103ab17 100644 --- a/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-004.html +++ b/tests/wpt/web-platform-tests/css/css-transforms/transform-rotate-004.html @@ -10,7 +10,7 @@ that various combinations of rotate() with different units are equivalent to rotate(45deg)."> <link rel="match" href="transform-rotate-001-ref.html"> - <meta name="fuzzy" content="maxDifference=0-13;totalPixels=0-4"> + <meta name="fuzzy" content="maxDifference=0-13;totalPixels=0-10"> <link rel="mismatch" href="transform-rotate-001-notref.html"> <style> div { diff --git a/tests/wpt/web-platform-tests/css/css-ui/appearance-cssom-001.html b/tests/wpt/web-platform-tests/css/css-ui/appearance-cssom-001.html index 36402da51cf..895ed243739 100644 --- a/tests/wpt/web-platform-tests/css/css-ui/appearance-cssom-001.html +++ b/tests/wpt/web-platform-tests/css/css-ui/appearance-cssom-001.html @@ -28,9 +28,6 @@ "radio", "searchfield", "textarea", - "slider-horizontal", - "push-button", - "square-button", ]; const invalid_values = [ "bogus-button", @@ -100,6 +97,7 @@ "progressbar-vertical", "progresschunk", "progresschunk-vertical", + "push-button", "radio-container", "radio-label", "radiomenuitem", @@ -130,6 +128,7 @@ "searchfield-results-decoration", "separator", "sheet", + "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", @@ -139,6 +138,7 @@ "spinner-textfield", "spinner-upbutton", "splitter", + "square-button", "statusbar", "statusbarpanel", "tab", diff --git a/tests/wpt/web-platform-tests/css/css-ui/appearance-push-button-001.html b/tests/wpt/web-platform-tests/css/css-ui/appearance-push-button-001.html deleted file mode 100644 index 3aecbb07980..00000000000 --- a/tests/wpt/web-platform-tests/css/css-ui/appearance-push-button-001.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>CSS Basic User Interface Test: appearance: push-button</title> -<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> -<meta name="assert" content="push-button is an alias to auto."> -<link rel="match" href="appearance-auto-ref.html"> -<style> - #container { width: 500px; } - #container > * { appearance: none; appearance: push-button; } -</style> -<div id="container"> - <a>a</a> - <button>button</button> - <input type="text" value="input-text"> - <input type="search" value="input-search"> - <textarea>textarea</textarea> - <input type="button" value="input-button"> - <input type="submit" value="input-submit"> - <input type="reset" value="input-reset"> - <input type="range"> - <input type="checkbox"> - <input type="radio"> - <input type="color"> - <select><option>select</option></select> - <select multiple><option>select-multiple</option></select> - <meter value=0.5></meter> - <progress value=0.5></progress> -</div> diff --git a/tests/wpt/web-platform-tests/css/css-ui/appearance-slider-horizontal-001.html b/tests/wpt/web-platform-tests/css/css-ui/appearance-slider-horizontal-001.html deleted file mode 100644 index 4d5b1a94fc9..00000000000 --- a/tests/wpt/web-platform-tests/css/css-ui/appearance-slider-horizontal-001.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>CSS Basic User Interface Test: appearance: slider-horizontal</title> -<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> -<meta name="assert" content="slider-horizontal is an alias to auto."> -<link rel="match" href="appearance-auto-ref.html"> -<style> - #container { width: 500px; } - #container > * { appearance: none; appearance: slider-horizontal; } -</style> -<div id="container"> - <a>a</a> - <button>button</button> - <input type="text" value="input-text"> - <input type="search" value="input-search"> - <textarea>textarea</textarea> - <input type="button" value="input-button"> - <input type="submit" value="input-submit"> - <input type="reset" value="input-reset"> - <input type="range"> - <input type="checkbox"> - <input type="radio"> - <input type="color"> - <select><option>select</option></select> - <select multiple><option>select-multiple</option></select> - <meter value=0.5></meter> - <progress value=0.5></progress> -</div> diff --git a/tests/wpt/web-platform-tests/css/css-ui/appearance-square-button-001.html b/tests/wpt/web-platform-tests/css/css-ui/appearance-square-button-001.html deleted file mode 100644 index 8f8c84355d2..00000000000 --- a/tests/wpt/web-platform-tests/css/css-ui/appearance-square-button-001.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>CSS Basic User Interface Test: appearance: square-button</title> -<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> -<meta name="assert" content="square-button is an alias to auto."> -<link rel="match" href="appearance-auto-ref.html"> -<style> - #container { width: 500px; } - #container > * { appearance: none; appearance: square-button; } -</style> -<div id="container"> - <a>a</a> - <button>button</button> - <input type="text" value="input-text"> - <input type="search" value="input-search"> - <textarea>textarea</textarea> - <input type="button" value="input-button"> - <input type="submit" value="input-submit"> - <input type="reset" value="input-reset"> - <input type="range"> - <input type="checkbox"> - <input type="radio"> - <input type="color"> - <select><option>select</option></select> - <select multiple><option>select-multiple</option></select> - <meter value=0.5></meter> - <progress value=0.5></progress> -</div> diff --git a/tests/wpt/web-platform-tests/css/css-ui/user-select-inheritance.html b/tests/wpt/web-platform-tests/css/css-ui/user-select-inheritance.html index 38a57e02856..28bf2abc3b2 100644 --- a/tests/wpt/web-platform-tests/css/css-ui/user-select-inheritance.html +++ b/tests/wpt/web-platform-tests/css/css-ui/user-select-inheritance.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>Tests inheritance of CSS user-select property</title> <link rel="author" title="Google LLC" href="https://www.google.com/"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/css-ui/#content-selection"> +<link rel="help" href="https://drafts.csswg.org/css-ui/#content-selection"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <div id="container">abc<div id="target">xyz</div>def</div> diff --git a/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-push-button-001.html b/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-push-button-001.html deleted file mode 100644 index 6f44498d466..00000000000 --- a/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-push-button-001.html +++ /dev/null @@ -1,32 +0,0 @@ -<!-- DO NOT EDIT THIS FILE. -Edit the appearance-* file instead and then run: - ./tools/appearance-build-webkit-reftests.py ---> -<!DOCTYPE html> -<meta charset="utf-8"> -<title>CSS Basic User Interface Test: -webkit-appearance: push-button</title> -<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> -<meta name="assert" content="push-button is an alias to auto."> -<link rel="match" href="appearance-auto-ref.html"> -<style> - #container { width: 500px; } - #container > * { -webkit-appearance: none; -webkit-appearance: push-button; } -</style> -<div id="container"> - <a>a</a> - <button>button</button> - <input type="text" value="input-text"> - <input type="search" value="input-search"> - <textarea>textarea</textarea> - <input type="button" value="input-button"> - <input type="submit" value="input-submit"> - <input type="reset" value="input-reset"> - <input type="range"> - <input type="checkbox"> - <input type="radio"> - <input type="color"> - <select><option>select</option></select> - <select multiple><option>select-multiple</option></select> - <meter value=0.5></meter> - <progress value=0.5></progress> -</div> diff --git a/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-slider-horizontal-001.html b/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-slider-horizontal-001.html deleted file mode 100644 index a9375b5088c..00000000000 --- a/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-slider-horizontal-001.html +++ /dev/null @@ -1,32 +0,0 @@ -<!-- DO NOT EDIT THIS FILE. -Edit the appearance-* file instead and then run: - ./tools/appearance-build-webkit-reftests.py ---> -<!DOCTYPE html> -<meta charset="utf-8"> -<title>CSS Basic User Interface Test: -webkit-appearance: slider-horizontal</title> -<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> -<meta name="assert" content="slider-horizontal is an alias to auto."> -<link rel="match" href="appearance-auto-ref.html"> -<style> - #container { width: 500px; } - #container > * { -webkit-appearance: none; -webkit-appearance: slider-horizontal; } -</style> -<div id="container"> - <a>a</a> - <button>button</button> - <input type="text" value="input-text"> - <input type="search" value="input-search"> - <textarea>textarea</textarea> - <input type="button" value="input-button"> - <input type="submit" value="input-submit"> - <input type="reset" value="input-reset"> - <input type="range"> - <input type="checkbox"> - <input type="radio"> - <input type="color"> - <select><option>select</option></select> - <select multiple><option>select-multiple</option></select> - <meter value=0.5></meter> - <progress value=0.5></progress> -</div> diff --git a/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-square-button-001.html b/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-square-button-001.html deleted file mode 100644 index f486329943b..00000000000 --- a/tests/wpt/web-platform-tests/css/css-ui/webkit-appearance-square-button-001.html +++ /dev/null @@ -1,32 +0,0 @@ -<!-- DO NOT EDIT THIS FILE. -Edit the appearance-* file instead and then run: - ./tools/appearance-build-webkit-reftests.py ---> -<!DOCTYPE html> -<meta charset="utf-8"> -<title>CSS Basic User Interface Test: -webkit-appearance: square-button</title> -<link rel="help" href="https://drafts.csswg.org/css-ui-4/#appearance-switching"> -<meta name="assert" content="square-button is an alias to auto."> -<link rel="match" href="appearance-auto-ref.html"> -<style> - #container { width: 500px; } - #container > * { -webkit-appearance: none; -webkit-appearance: square-button; } -</style> -<div id="container"> - <a>a</a> - <button>button</button> - <input type="text" value="input-text"> - <input type="search" value="input-search"> - <textarea>textarea</textarea> - <input type="button" value="input-button"> - <input type="submit" value="input-submit"> - <input type="reset" value="input-reset"> - <input type="range"> - <input type="checkbox"> - <input type="radio"> - <input type="color"> - <select><option>select</option></select> - <select multiple><option>select-multiple</option></select> - <meter value=0.5></meter> - <progress value=0.5></progress> -</div> diff --git a/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-computed.html b/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-computed.html index dc8ecce621d..bc547d588e7 100644 --- a/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-computed.html +++ b/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-computed.html @@ -43,7 +43,6 @@ test_math_used('calc(atan2(-1,1))', '-45deg', {type:'angle', approx:0.1}); // Test nesting test_math_used('calc(cos(sin(acos(cos(pi)))))', '1', {type:'number', approx:0.1}); -test_math_used('calc(sin(atan(tan(pi/2))))', '1', {type:'number', approx:0.1}); // Test types for atan2 test_math_used('atan2(1px, -1px)', '135deg', {type:'angle', approx:0.1}); diff --git a/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-serialize.html b/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-serialize.html index c867f34d475..8462fb2e5a5 100644 --- a/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-serialize.html +++ b/tests/wpt/web-platform-tests/css/css-values/acos-asin-atan-atan2-serialize.html @@ -44,8 +44,6 @@ var test_map = { "atan(0.577350269)" :"calc(30deg)", "atan(0)" :"calc(0deg)", "atan(infinity)" :"calc(90deg)", - "atan(tan(90deg))" :"calc(90deg)", - "atan(tan(-90deg))" :"calc(-90deg)", "atan2(37.320508075, 10)" :"calc(75deg)", "atan2(1s, 1000ms)" :"calc(45deg)", "atan2(infinity, infinity)" :"calc(45deg)", @@ -61,4 +59,4 @@ for (var exp in test_map) { test_serialization(exp, test_map[exp]); test_serialization(`calc(${exp})`, test_map[exp]); } -</script>
\ No newline at end of file +</script> diff --git a/tests/wpt/web-platform-tests/css/css-values/round-mod-rem-computed.html b/tests/wpt/web-platform-tests/css/css-values/round-mod-rem-computed.html index 4c365eb2a14..2210f6e1fb5 100644 --- a/tests/wpt/web-platform-tests/css/css-values/round-mod-rem-computed.html +++ b/tests/wpt/web-platform-tests/css/css-values/round-mod-rem-computed.html @@ -126,9 +126,9 @@ test_math_used('mod(100px,1rem)', '4px'); test_math_used('mod(10s,6000ms)', '4s', {type:'time'}); test_math_used('mod(10000ms,6s)', '4s', {type:'time'}); test_math_used('mod(18px,100% / 15)', '3px'); -test_math_used('mod(-18px,100% / 15)', '2px'); +test_math_used('mod(-18px,100% / 10)', '4.5px'); test_math_used('mod(18%,5%)', '3%'); -test_math_used('mod(-18%,5%)', '2%'); +test_math_used('mod(-19%,5%)', '1%'); test_math_used('mod(18vw,5vw)', '3vw'); test_math_used('mod(-18vw,5vw)', '2vw'); @@ -144,7 +144,7 @@ test_math_used('rem(18vw,5vw)', '3vw'); test_math_used('rem(-18vw,5vw)', '-3vw'); test_math_used('calc(round(1px + 0%, 1px + 0%))', '1px'); -test_math_used('calc(mod(1px + 0%, 1px + 0%))', '0px'); -test_math_used('calc(rem(1px + 0%, 1px + 0%))', '0px'); +test_math_used('calc(mod(3px + 0%, 2px + 0%))', '1px'); +test_math_used('calc(rem(3px + 0%, 2px + 0%))', '1px'); </script> diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/old-content-captures-clip-path.html b/tests/wpt/web-platform-tests/css/css-view-transitions/old-content-captures-clip-path.html index a2faa7f1575..467b19d928d 100644 --- a/tests/wpt/web-platform-tests/css/css-view-transitions/old-content-captures-clip-path.html +++ b/tests/wpt/web-platform-tests/css/css-view-transitions/old-content-captures-clip-path.html @@ -4,6 +4,7 @@ <link rel="help" href="https://github.com/WICG/view-transitions"> <link rel="author" href="mailto:vmpstr@chromium.org"> <link rel="match" href="old-content-captures-clip-path-ref.html"> +<meta name="fuzzy" content="old-content-captures-clip-path-ref.html:0-1;0-500"> <script src="/common/reftest-wait.js"></script> <style> .box { diff --git a/tests/wpt/web-platform-tests/css/cssom/xml-stylesheet-pi-in-doctype.xhtml b/tests/wpt/web-platform-tests/css/cssom/xml-stylesheet-pi-in-doctype.xhtml index d25ca176561..59911eb52c2 100644 --- a/tests/wpt/web-platform-tests/css/cssom/xml-stylesheet-pi-in-doctype.xhtml +++ b/tests/wpt/web-platform-tests/css/cssom/xml-stylesheet-pi-in-doctype.xhtml @@ -2,7 +2,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>xml-stylesheet processing instruction in doctype internal subset</title> - <link rel="help" href="https://w3c.github.io/csswg-drafts/cssom/#prolog"/> + <link rel="help" href="https://drafts.csswg.org/cssom/#prolog"/> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> </head> diff --git a/tests/wpt/web-platform-tests/css/mediaqueries/dynamic-range.html b/tests/wpt/web-platform-tests/css/mediaqueries/dynamic-range.html index babe1b9f0d4..75b3015b8e7 100644 --- a/tests/wpt/web-platform-tests/css/mediaqueries/dynamic-range.html +++ b/tests/wpt/web-platform-tests/css/mediaqueries/dynamic-range.html @@ -10,16 +10,27 @@ query_should_be_known("(dynamic-range: high)"); query_should_be_known("(video-dynamic-range: standard)"); query_should_be_known("(video-dynamic-range: high)"); -query_should_be_unknown("(dynamic-range)"); +query_should_be_known("(dynamic-range)"); +query_should_be_known("(video-dynamic-range)"); + query_should_be_unknown("(dynamic-range: 0)"); query_should_be_unknown("(dynamic-range: 10px)"); query_should_be_unknown("(dynamic-range: invalid)"); -query_should_be_unknown("(video-dynamic-range)"); query_should_be_unknown("(video-dynamic-range: 0)"); query_should_be_unknown("(video-dynamic-range: 10px)"); query_should_be_unknown("(video-dynamic-range: invalid)"); test(() => { + let match_boolean = window.matchMedia("(dynamic-range)"); + assert_false(match_boolean.matches); +}, "Check that dynamic-range evaluates to false in the boolean context"); + +test(() => { + let match_boolean = window.matchMedia("(video-dynamic-range)"); + assert_false(match_boolean.matches); +}, "Check that video-dynamic-range evaluates to false in the boolean context"); + +test(() => { let match_standard = window.matchMedia("(dynamic-range: standard)"); assert_true(match_standard.matches); }, "Check that dynamic-range always matches 'standard'"); diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html index 3ec10a7918f..7a5d9c94f05 100644 --- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html +++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-parsing-valid.html @@ -22,7 +22,7 @@ test_valid_value("offset", "left bottom ray(0rad closest-corner) 10px auto 30deg test_valid_value("offset", "left top"); test_valid_value("offset", "none 30deg reverse", "none reverse 30deg"); test_valid_value("offset", "none 50px reverse 30deg"); -test_valid_value("offset", "none calc(10px + 20%) auto", "none calc(20% + 10px)"); +test_valid_value("offset", "none calc(20% + 10px) auto", "none calc(20% + 10px)"); test_valid_value("offset", "none reverse"); test_valid_value("offset", "path(\"M 0 0 H 1\") -200% auto", "path(\"M 0 0 H 1\") -200%"); test_valid_value("offset", "path(\"M 0 0 H 1\") -200%"); diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-001-ref.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-001-ref.html new file mode 100644 index 00000000000..6013cb47d3f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-001-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + padding: 1em; + margin: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + background-color: pink; +} +</style> +<div style="background: green;"><span></span></div> +<div></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-001.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-001.html new file mode 100644 index 00000000000..bf45e98cf2d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-001.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<link rel="match" href="has-style-sharing-001-ref.html"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + padding: 1em; + margin: 1em; +} + +:has(> span) { + background: green; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + background-color: pink; +} +</style> +<div><span></span></div> +<div></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-002-ref.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-002-ref.html new file mode 100644 index 00000000000..c916ab074f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-002-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + padding: 1em; + margin: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + background-color: pink; +} +</style> +<div></div> +<div style="background: green;"><span></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-002.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-002.html new file mode 100644 index 00000000000..630a136186a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-002.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<link rel="match" href="has-style-sharing-002-ref.html"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + padding: 1em; + margin: 1em; +} + +:has(> span) { + background: green; +} + +span { + display: inline-block; + width: 1em; + height: 1em; + background-color: pink; +} +</style> +<div></div> +<div><span></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-003-ref.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-003-ref.html new file mode 100644 index 00000000000..36aae7a103e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-003-ref.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +.has-b { + background: green; +} + +.b { + background: purple; +} +</style> + +<div><span class="has-b"></span><span class="a"></span></div> +<div><span class="b"></span><span></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-003.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-003.html new file mode 100644 index 00000000000..480a23e3682 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-003.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<link rel="match" href="has-style-sharing-003-ref.html"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +:has(> .a) .b { + background: green; +} + +.b { + background: purple; +} +</style> + +<div><span class="b"></span><span class="a"></span></div> +<div><span class="b"></span><span></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-004-ref.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-004-ref.html new file mode 100644 index 00000000000..f710924e314 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-004-ref.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +.has-b { + background: green; +} + +.b { + background: purple; +} +</style> + +<div><span class="b"></span><span></span></div> +<div><span class="has-b"></span><span class="a"></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-004.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-004.html new file mode 100644 index 00000000000..c0879f70ec7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-004.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<link rel="match" href="has-style-sharing-004-ref.html"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +:has(> .a) .b { + background: green; +} + +.b { + background: purple; +} +</style> + +<div><span class="b"></span><span></span></div> +<div><span class="b"></span><span class="a"></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-005-ref.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-005-ref.html new file mode 100644 index 00000000000..eb95d473735 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-005-ref.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +.has-c { + background: green; +} + +.c { + background: purple; +} +</style> +<div><span class="b"><span class="has-c"></span></span><span class="a"></span></div> +<div><span class="b"><span class="c"></span></span><span></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-005.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-005.html new file mode 100644 index 00000000000..d6b05fc33d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-005.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<link rel="match" href="has-style-sharing-005-ref.html"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +:has(> .a) .b .c { + background: green; +} + +.c { + background: purple; +} +</style> +<div><span class="b"><span class="c"></span></span><span class="a"></span></div> +<div><span class="b"><span class="c"></span></span><span></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-006-ref.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-006-ref.html new file mode 100644 index 00000000000..4c03f2150ad --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-006-ref.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +.has-c { + background: green; +} + +.c { + background: purple; +} +</style> +<div><span class="b"><span class="c"></span></span><span></span></div> +<div><span class="b"><span class="has-c"></span></span><span class="a"></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-006.html b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-006.html new file mode 100644 index 00000000000..e0d824f359f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/has-style-sharing-006.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<link rel="author" title="David Shin" href="mailto:dshin@mozilla.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#relational"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1793012"> +<link rel="match" href="has-style-sharing-006-ref.html"> +<meta name="assert" content="Ensure that style sharing optimizations do not interfere with :has() selector matching."> +<style> +div { + background: blue; + margin: 1em; + padding: 1em; +} + +span { + display: inline-block; + width: 1em; + height: 1em; +} + +:has(> .a) .b .c { + background: green; +} + +.c { + background: purple; +} +</style> +<div><span class="b"><span class="c"></span></span><span></span></div> +<div><span class="b"><span class="c"></span></span><span class="a"></span></div> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/defined-in-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/defined-in-has.html new file mode 100644 index 00000000000..d691c4a53fd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/defined-in-has.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<title>:has() invalidation with :defined pseudo-class</title> +<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> +<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/semantics-other.html#selector-defined"> +<style> + #subject { + background-color: red; + width: 100px; + height: 100px; + } + #subject:has(:defined) { + background-color: green; + } +</style> +<body> + Test :defined pseudo-class invalidation with :has() + <div id="subject"> + <my-element></my-element> + </div> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + const GREEN = "rgb(0, 128, 0)"; + const RED = "rgb(255, 0, 0)"; + + function assert_matches_defined(defined) { + assert_equals(getComputedStyle(subject).backgroundColor, defined ? GREEN : RED); + } + + test(() => { + assert_matches_defined(false); + customElements.define("my-element", class MyElement extends HTMLElement { }); + assert_matches_defined(true); + }, "Test :has() invalidation with :defined pseudo-class"); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/has-with-nth-child.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/has-with-nth-child.html new file mode 100644 index 00000000000..e8d7d062304 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/has-with-nth-child.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Selectors Test: :has(:nth-child()) invalidation for sibling change</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="help" href="https://drafts.csswg.org/selectors/#relational"> +<style> + #test-container > div { background-color: green; } + #target1:has(.item:nth-child(3)) { background-color: red; } + #target2:has(.item:nth-last-child(3)) { background-color: red; } + #target3:has(.item:nth-child(3) > .child) { background-color: red; } + #target4:has(.item:nth-last-child(3) > .child) { background-color: red; } +</style> +<div id="test-container"> + <div id="target1"> + <div class="item" id="item1">FAIL if you see this text</div> + <div class="item"></div> + <div class="item">This text should have a green background</div> + </div> + <div id="target2"> + <div class="item">This text should have a green background</div> + <div class="item"></div> + <div class="item" id="item2">FAIL if you see this text</div> + </div> + <div id="target3"> + <div class="item" id="item3">FAIL if you see this text</div> + <div class="item"></div> + <div class="item"> + <span class="child">This text should have a green background<span> + </div> + </div> + <div id="target4"> + <div class="item"> + <span class="child">This text should have a green background<span> + </div> + <div class="item"></div> + <div class="item" id="item4">FAIL if you see this text</div> + </div> +</div> +<script> + test(() => { + assert_equals(getComputedStyle(target1).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target2).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target3).backgroundColor, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(target4).backgroundColor, "rgb(255, 0, 0)"); + }, "Initially red"); + + test(() => { + item1.remove(); + assert_equals(getComputedStyle(target1).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-child() no longer matching after removal"); + + test(() => { + item2.remove(); + assert_equals(getComputedStyle(target2).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-last-child() no longer matching after removal"); + + test(() => { + item3.remove(); + assert_equals(getComputedStyle(target3).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-child() in non-subject no longer matching after removal"); + + test(() => { + item4.remove(); + assert_equals(getComputedStyle(target4).backgroundColor, "rgb(0, 128, 0)"); + }, ":nth-last-child() in non-subject no longer matching after removal"); +</script> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html index 62b18c1e0ef..07ab6083e09 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/media-loading-pseudo-classes-in-has.html @@ -3,7 +3,7 @@ <title>:has() invalidation with :buffering & :stalled pseudo-classes</title> <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> <link rel="help" href="https://drafts.csswg.org/selectors/#relational"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors/#media-loading-state"> +<link rel="help" href="https://drafts.csswg.org/selectors/#media-loading-state"> <style> #subject:has(video:buffering) { diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/media-pseudo-classes-in-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/media-pseudo-classes-in-has.html index f0df71534ae..881ba8f30ee 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/media-pseudo-classes-in-has.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/media-pseudo-classes-in-has.html @@ -2,7 +2,7 @@ <title>:has() invalidation with :playing, :paused, :seeking and :muted pseudo-classes</title> <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> <link rel="help" href="https://drafts.csswg.org/selectors/#relational"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors/#video-state"> +<link rel="help" href="https://drafts.csswg.org/selectors/#video-state"> <style> #subject { background-color: black; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor-ref.html index 4dc7247e41e..6e6680d8c3f 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of S) with ancestor in S</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <div> <div> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor.html index 7266cd5a251..a7f246328c8 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-containing-ancestor.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of S) with ancestor in S</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-containing-ancestor-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> div:nth-child(odd of .a .b) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom-ref.html index 6ddc204b83a..07617c53ad1 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of attribute) with a large DOM</title> <link rel="author" title="Bramus" href="https://www.bram.us/"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <table border="1"> <thead> <tr> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom.html index 76bc4542dae..07d87d2d4b4 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-largedom.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of attribute) with a large DOM</title> <link rel="author" title="Bramus" href="https://www.bram.us/"> <link rel="match" href="nth-child-of-attr-largedom-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> tr:nth-child(even of :not([hidden])){ background: lightgrey; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-ref.html index 41205174eb0..5207cc987d1 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of attribute)</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <p>Ignored</p> <p>Ignored</p> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr.html index d929d6a50db..d4e82ff78c0 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-attr.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of attribute)</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-of-attr-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of [attr="yes"]) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-prefix.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-prefix.html index ac7757db3eb..2ea57c099f8 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-prefix.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-prefix.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of class prefix)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of [class^=t]) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-ref.html index 7a8247c469e..d4e2dfb71d9 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of class)</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <p>Ignored</p> <p>Ignored</p> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class.html index dc1e8cec82e..1171f25c0a4 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-class.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of class)</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of .c) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has-ref.html index ab3931d6ef4..39f0501b826 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of :has(...))</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <p>Ignored</p> <p>Ignored</p> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has.html index 1a548315cc0..8473828973d 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-has.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of :has(...))</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-of-has-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of :has(.c)) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-id-prefix.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-id-prefix.html index fadb8f38514..b07b1cfc411 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-id-prefix.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-id-prefix.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of ID prefix)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of [id^=t]) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-ids.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-ids.html index 033205283c4..8e94aa3e22c 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-ids.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-ids.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of IDs)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of #t1, #t2, #t3, #t4, #t5) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor-ref.html index a4e4b7fd9fc..bc7ecb9ff7c 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of class) as ancestor</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <p>Not <span style="color: green">ignored</span></p> <p>Selectively <span>ignored<span></p> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor.html index 7311c3e3011..2ae80061b05 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-ancestor.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of class) as ancestor</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-of-in-ancestor-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(odd of .c) span { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-is.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-is.html index 31276e6ef9e..f004195c83e 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-is.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-is.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :is(:nth-child(... of class))</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:is(:nth-child(even of .c)) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root-ref.html index f28d358cdc5..060c07decac 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root-ref.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>CSS Selectors Invalidation: :nth-child(... of class) within shadow root</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <div>No green</div> <div>No green</div> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root.html index 1e949a3bd0e..4195a14a3ed 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-in-shadow-root.html @@ -2,7 +2,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of class) within shadow root</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-of-in-shadow-root-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <script src="/resources/declarative-shadow-dom-polyfill.js"></script> <div id="host"> <template shadowrootmode="open"> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-is.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-is.html index e230a30d177..4473845a7a0 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-is.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-is.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of :is)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of :is(.c)) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling-ref.html index 0388fc7c5ab..ed7fefc59fe 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of sibling)</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <p>Ignored</p> <p>Ignored</p> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling.html index 5beaad6a581..68e46518ec2 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-of-sibling.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of sibling)</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-of-sibling-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-child(even of .a + .b) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes-ref.html index 8b7d32906d9..7e3f7f0c98a 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of class) when ancestor changes</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div id="toggler"> <p>Ignored</p> <p>Not ignored</p> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes.html index 4d2b4fbce07..c4a97ee7e80 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-ancestor-changes.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of class) when ancestor changes</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-when-ancestor-changes-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> .ancestor :nth-child(even of .c) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes-ref.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes-ref.html index 9a397529900..f30a853cae7 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes-ref.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes-ref.html @@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>CSS Selectors Invalidation: :nth-child(... of class) when sibling changes</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <div> <p>Ignored</p> <p>Odd; used to be green, should not be since no sibling</p> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes.html index a0025be95a2..43374df9174 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-child-when-sibling-changes.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-child(... of class) when sibling changes</title> <link rel="author" title="Steinar H. Gunderson" href="sesse@chromium.org"> <link rel="match" href="nth-child-when-sibling-changes-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> .sibling + :nth-child(odd of .c) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-class-prefix.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-class-prefix.html index f9fc196c213..da12246926d 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-class-prefix.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-class-prefix.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-last-child(... of class prefix)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-last-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-last-child(even of [class^=t]) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-id-prefix.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-id-prefix.html index 1a9e6a9aa31..747236aca0b 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-id-prefix.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-id-prefix.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-last-child(... of ID prefix)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-last-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-last-child(even of [id^=t]) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-ids.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-ids.html index cd682ed5fb5..def336119a5 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-ids.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-ids.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-last-child(... of IDs)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-last-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-last-child(even of #t1, #t2, #t3, #t4, #t5) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-in-is.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-in-is.html index 90c8860c87f..370883ecf1c 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-in-is.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-in-is.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :is(:nth-last-child(... of class))</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-last-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:is(:nth-last-child(even of .c)) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-is.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-is.html index ac1ec316c74..0db7347698d 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-is.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/nth-last-child-of-is.html @@ -3,7 +3,7 @@ <title>CSS Selectors Invalidation: :nth-last-child(... of :is)</title> <link rel="author" title="Zach Hoffman" href="mailto:zach@zrhoffman.net"> <link rel="match" href="nth-last-child-of-class-ref.html"> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <style> p:nth-last-child(even of :is(.c)) { color: green; diff --git a/tests/wpt/web-platform-tests/css/selectors/media/media-loading-state.html b/tests/wpt/web-platform-tests/css/selectors/media/media-loading-state.html index b48cfc13fb7..6bead20a98a 100644 --- a/tests/wpt/web-platform-tests/css/selectors/media/media-loading-state.html +++ b/tests/wpt/web-platform-tests/css/selectors/media/media-loading-state.html @@ -3,7 +3,7 @@ <title>Media Loading State: the :buffering and :stalled pseudo-classes</title> <link rel="help" - href="https://w3c.github.io/csswg-drafts/selectors/#media-loading-state" + href="https://drafts.csswg.org/selectors/#media-loading-state" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/selectors/media/media-playback-state.html b/tests/wpt/web-platform-tests/css/selectors/media/media-playback-state.html index 628daa25214..c034dbbdc08 100644 --- a/tests/wpt/web-platform-tests/css/selectors/media/media-playback-state.html +++ b/tests/wpt/web-platform-tests/css/selectors/media/media-playback-state.html @@ -4,7 +4,7 @@ </title> <link rel="help" - href="https://w3c.github.io/csswg-drafts/selectors/#video-state" + href="https://drafts.csswg.org/selectors/#video-state" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/selectors/media/sound-state.html b/tests/wpt/web-platform-tests/css/selectors/media/sound-state.html index d9eb86a5ebe..527bb30b97c 100644 --- a/tests/wpt/web-platform-tests/css/selectors/media/sound-state.html +++ b/tests/wpt/web-platform-tests/css/selectors/media/sound-state.html @@ -2,7 +2,7 @@ <title>Sound State: the :muted and :volume-locked pseudo-classes</title> <link rel="help" - href="https://w3c.github.io/csswg-drafts/selectors/#sound-state" + href="https://drafts.csswg.org/selectors/#sound-state" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-and-nth-last-child.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-and-nth-last-child.html index 455063f9160..1379b4c706d 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-and-nth-last-child.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-and-nth-last-child.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child and :nth-last-child with selector list argument chained together</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-and-nth-last-child-ref.html"> <style> target1 { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-classname.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-classname.html index 8ec3f43f7f4..1cfb01056c9 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-classname.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-classname.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with .className selector list argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-of-classname-ref.html"> <style> p:nth-child(even of .webkit, .fast) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector-many-children.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector-many-children.html index 72f58cd93a0..ab958c9d884 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector-many-children.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector-many-children.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with complex selector list argument and more than 32 elements</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-of-complex-selector-many-children-ref.html"> <style> /* At least 4 pair of <p> above, can be overlapping. The other selectors of the list are useless. */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector.html index b751d83de22..f06680a57f7 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-complex-selector.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with complex selector list argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-of-complex-selector-ref.html"> <style> /* At least 4 pair of <p> above, can be overlapping. The other selectors of the list are useless. */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-compound-selector.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-compound-selector.html index 5efefe6eadf..50bdba0b83e 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-compound-selector.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-compound-selector.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with compound selector argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-of-compound-selector-ref.html"> <style> /* 3n of paragraph with the class foobar but for which foobar is not the only class. */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting.html index 851260623d6..78c5cde1cc6 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-nesting.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child nesting</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel=author href="mailto:zach@zrhoffman.net" title="Zach Hoffman"> <link rel="match" href="nth-child-of-nesting-ref.html"> <style> diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-no-space-after-of.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-no-space-after-of.html index 613593ce668..997b07c27dc 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-no-space-after-of.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-no-space-after-of.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <title>:nth-child with no space between "of" and the selector list</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel=author href="mailto:zach@zrhoffman.net" title="Zach Hoffman"> <link rel="match" href="nth-child-of-no-space-after-of-ref.html"> <style> diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-pseudo-ref.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-pseudo-ref.html new file mode 100644 index 00000000000..7e816b5f188 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-pseudo-ref.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Test Reference</title> +<div class="a">a</div> +<div class="b">xb</div> +<div class="a">a</div> +<div class="b">b</div> +<div class="a">a</div> +<div class="b">xb</div> diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-pseudo.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-pseudo.html new file mode 100644 index 00000000000..7113af90104 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-pseudo.html @@ -0,0 +1,19 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSS Test: :nth-child(of) with pseudo-elements</title> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1834717"> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> +<link rel="author" title="Mozilla" href="https://mozilla.org"> +<link rel="match" href="nth-child-of-pseudo-ref.html"> +<style> +div:nth-child(odd of .b)::before { + content: "x"; +} +</style> +<div class="a">a</div> +<div class="b">b</div> +<div class="a">a</div> +<div class="b">b</div> +<div class="a">a</div> +<div class="b">b</div> diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-tagname.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-tagname.html index 107e834296f..cc92ad6df99 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-of-tagname.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-of-tagname.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with tagname selector list argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-of-tagname-ref.html"> <style> :nth-child(odd of webkit, fast) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-1.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-1.html index d0b084a719d..64d9eb27c0e 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-1.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-1.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-specificity-1-ref.html"> <style> /* The following 3 rules should all have the same specificity when matching <target>. They should be be applied in order. */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-2.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-2.html index a467e5e056a..10467e7408f 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-2.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-2.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-specificity-2-ref.html"> <style> /* (1, 1, 0) */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-3.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-3.html index f9c23b27ca1..8649f4fc4a0 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-3.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-3.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-specificity-3-ref.html"> <style> /* (1, 2, 1) */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-4.html b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-4.html index 6286b01f7ea..de856c28249 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-4.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-child-specificity-4.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-child-specificity-4-ref.html"> <style> /* (1, 2, 1) */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-classname.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-classname.html index 770fda381f0..80770b08a60 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-classname.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-classname.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with .className selector list argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-of-classname-ref.html"> <style> p:nth-last-child(even of .webkit, .fast) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-complex-selector.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-complex-selector.html index 0f1262c746f..ae8fc6ebfad 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-complex-selector.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-complex-selector.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with complex selector list argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-of-complex-selector-ref.html"> <style> p:nth-last-child(4n of html:root>body>p+p:not(empty), :not(*), p:not(p), span, .notthere) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-compound-selector.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-compound-selector.html index a7aa40f50a2..df1d58347b7 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-compound-selector.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-compound-selector.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with compound selector argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-of-compound-selector-ref.html"> <style> p:nth-last-child(3n+1 of p.foobar:not([class=foobar])) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-nesting.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-nesting.html index 0dd18f2c4b9..e1ce3ce2038 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-nesting.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-nesting.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child nesting</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel=author href="mailto:zach@zrhoffman.net" title="Zach Hoffman"> <link rel="match" href="nth-child-of-nesting-ref.html"> <style> diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-no-space-after-of.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-no-space-after-of.html index d79d5733a5c..5ce99119b91 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-no-space-after-of.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-no-space-after-of.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <title>:nth-last-child with no space between "of" and the selector list</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel=author href="mailto:zach@zrhoffman.net" title="Zach Hoffman"> <link rel="match" href="nth-child-of-no-space-after-of-ref.html"> <style> diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-1.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-1.html index de3e2632561..17ea008b2d8 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-1.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-1.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child correct style-sharing</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-of-style-sharing-1-ref.html"> <style> :nth-last-child(3n+1 of .target) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-2.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-2.html index 19fc9af414e..2c586956b4a 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-2.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-style-sharing-2.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child correct style-sharing</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-of-style-sharing-2-ref.html"> <style> :nth-last-child(3n+1 of .target) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-tagname.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-tagname.html index ddfd6528cc5..385d12948c0 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-tagname.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-of-tagname.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with tagname selector list argument</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-of-tagname-ref.html"> <style> :nth-last-child(odd of webkit, fast) { diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-1.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-1.html index cc4f542fff3..18e00f1ca57 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-1.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-1.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-specificity-1-ref.html"> <style> /* The following 3 rules should all have the same specificity when matching <target>. They should be be applied in order. */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-2.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-2.html index 3ddb43b62bd..3c3c8739f37 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-2.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-2.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-specificity-2-ref.html"> <style> /* (1, 1, 0) */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-3.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-3.html index 673b4350443..93a7007a48b 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-3.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-3.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-specificity-3-ref.html"> <style> /* (1, 2, 1) */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-4.html b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-4.html index b690ea2b017..f556b994b06 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-4.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-last-child-specificity-4.html @@ -2,7 +2,7 @@ <html> <head> <title>:nth-last-child with selector list specificity</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors-4/#child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> <link rel="match" href="nth-last-child-specificity-4-ref.html"> <style> /* (1, 2, 1) */ diff --git a/tests/wpt/web-platform-tests/css/selectors/nth-of-type-namespace.html b/tests/wpt/web-platform-tests/css/selectors/nth-of-type-namespace.html index aa67afd00a4..f5d81a5df3a 100644 --- a/tests/wpt/web-platform-tests/css/selectors/nth-of-type-namespace.html +++ b/tests/wpt/web-platform-tests/css/selectors/nth-of-type-namespace.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <title>CSS Selectors Test: :*-of-type with namespace</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/selectors/#typed-child-index"> +<link rel="help" href="https://drafts.csswg.org/selectors/#typed-child-index"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <style> diff --git a/tests/wpt/web-platform-tests/docs/Dockerfile b/tests/wpt/web-platform-tests/docs/Dockerfile index bf5b7088a58..75755268666 100644 --- a/tests/wpt/web-platform-tests/docs/Dockerfile +++ b/tests/wpt/web-platform-tests/docs/Dockerfile @@ -4,10 +4,8 @@ FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive \ DEBCONF_NONINTERACTIVE_SEEN=true -# Documentation is generated using Python 3.9 due to spinx-js not -# supporting 3.10: https://github.com/mozilla/sphinx-js/issues/186 RUN apt-get -qqy update \ - && apt-get -qqy install git npm python3.9 python3.9-venv + && apt-get -qqy install git npm python3 python3-venv WORKDIR /app/ @@ -20,6 +18,6 @@ ENV PATH=/app/node_modules/.bin:$PATH # setting the environment variables needed for this to always be active. The # `./wpt build-docs` then uses this venv with --skip-venv-setup. ENV VIRTUAL_ENV=/app/venv -RUN python3.9 -m venv $VIRTUAL_ENV +RUN python3 -m venv $VIRTUAL_ENV ENV PATH=$VIRTUAL_ENV/bin:$PATH RUN pip install -r requirements.txt diff --git a/tests/wpt/web-platform-tests/docs/admin/index.md b/tests/wpt/web-platform-tests/docs/admin/index.md index dd7dfe2e72a..f42d3075b6b 100644 --- a/tests/wpt/web-platform-tests/docs/admin/index.md +++ b/tests/wpt/web-platform-tests/docs/admin/index.md @@ -79,12 +79,10 @@ explicitly-managed secret. - smcgruer@google.com - boaz@bocoup.com - mike@bocoup.com - - simon@bocoup.com - [GitHub](https://github.com/): @wpt-pr-bot account - smcgruer@google.com - boaz@bocoup.com - mike@bocoup.com - - simon@bocoup.com ## Emergency playbook diff --git a/tests/wpt/web-platform-tests/docs/running-tests/chrome.md b/tests/wpt/web-platform-tests/docs/running-tests/chrome.md index 45293af65ef..aca93ea2e59 100644 --- a/tests/wpt/web-platform-tests/docs/running-tests/chrome.md +++ b/tests/wpt/web-platform-tests/docs/running-tests/chrome.md @@ -27,7 +27,7 @@ If you want to enable a specific [runtime enabled feature][1], use ./wpt run --binary-arg=--enable-blink-features=AsyncClipboard chrome clipboard-apis/ ``` -[A detailed explanation is available](running-tests/chrome-chromium-installation-detection.html) +[A detailed explanation is available](chrome-chromium-installation-detection.html) for more information on how wpt detects and installs the components for Chrome and Chromium. [1]: https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/RuntimeEnabledFeatures.md diff --git a/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md b/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md index 3865038ef68..f40f8e5ece9 100644 --- a/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md +++ b/tests/wpt/web-platform-tests/docs/running-tests/from-local-system.md @@ -4,8 +4,8 @@ The tests are designed to be run from your local computer. ## System Setup -Running the tests requires `python`, `pip` and `virtualenv`, as well as updating -the system `hosts` file. +Running the tests requires `python` and `pip` as well as updating the +system `hosts` file. WPT requires Python 3.7 or higher. @@ -14,12 +14,12 @@ The required setup is different depending on your operating system. ### Linux Setup If not already present, use the system package manager to install `python`, -`pip` and `virtualenv`. +and `pip`. -On Debian or Ubuntu: +On Ubuntu: ```bash -sudo apt-get install python python-pip virtualenv +sudo apt-get install python3 python3-pip python3-venv ``` It is important to have a package that provides a `python` binary. On Fedora, @@ -28,13 +28,12 @@ Ubuntu Focal and later, the package is called `python-is-python3`. ### macOS Setup -The system-provided Python can be used, while `pip` and `virtualenv` can be +The system-provided Python can be used, while `pip` can be installed for the user only: ```bash python -m ensurepip --user export PATH="$PATH:$( python3 -m site --user-base )/bin" -pip install --user virtualenv ``` To make the `PATH` change persistent, add it to your `~/.bash_profile` file or @@ -50,12 +49,6 @@ installer includes `pip` by default. Add `C:\Python39` and `C:\Python39\Scripts` to your `%Path%` [environment variable](http://www.computerhope.com/issues/ch000549.htm). -Finally, install `virtualenv`: - -```bash -pip install virtualenv -``` - The standard Windows shell requires that all `wpt` commands are prefixed by the Python binary i.e. assuming `python` is on your path the server is started using: diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/testdriver.md b/tests/wpt/web-platform-tests/docs/writing-tests/testdriver.md index 24159e82cc8..e482452aef3 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/testdriver.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/testdriver.md @@ -99,6 +99,17 @@ the global scope. .. js:autofunction:: test_driver.set_spc_transaction_mode ``` +### Federated Credential Management ### +```eval_rst +.. js:autofunction:: test_driver.cancel_fedcm_dialog +.. js:autofunction:: test_driver.select_fedcm_account +.. js:autofunction:: test_driver.get_fedcm_account_list +.. js:autofunction:: test_driver.get_fedcm_dialog_title +.. js:autofunction:: test_driver.get_fedcm_dialog_type +.. js:autofunction:: test_driver.set_fedcm_delay_enabled +.. js:autofunction:: test_driver.reset_fedcm_cooldown +``` + ### Using test_driver in other browsing contexts ### Testdriver can be used in browsing contexts (i.e. windows or frames) diff --git a/tests/wpt/web-platform-tests/editing/other/exec-command-with-text-editor.tentative.html b/tests/wpt/web-platform-tests/editing/other/exec-command-with-text-editor.tentative.html index f2c1fce5222..207e74aef2d 100644 --- a/tests/wpt/web-platform-tests/editing/other/exec-command-with-text-editor.tentative.html +++ b/tests/wpt/web-platform-tests/editing/other/exec-command-with-text-editor.tentative.html @@ -1,6 +1,9 @@ <!doctype html> <meta charset=utf-8> <title>Test that execCommand with <input> or <textarea></title> +<meta name="variant" content="?type=text"> +<meta name="variant" content="?type=textarea"> +<meta name="variant" content="?type=password"> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <div id="container"></div> @@ -8,6 +11,7 @@ "use strict"; setup({explicit_done: true}); +const testingType = new URLSearchParams(document.location.search).get("type"); /** * This test checks whether document.execCommand() does something expected or @@ -17,21 +21,28 @@ setup({explicit_done: true}); */ function runTests() { let container = document.getElementById("container"); - container.innerHTML = "Here <b>is</b> Text: <input id=\"target\">"; - runTest(document.getElementById("target"), "In <input>"); - container.innerHTML = "Here <b>is</b> Text: <textarea id=\"target\"></textarea>"; - runTest(document.getElementById("target"), "In <textarea>"); - container.setAttribute("contenteditable", "true"); - container.innerHTML = "Here <b>is</b> Text: <input id=\"target\">"; - runTest(document.getElementById("target"), "In <input> in contenteditable"); - container.innerHTML = "Here <b>is</b> Text: <textarea id=\"target\"></textarea>"; - runTest(document.getElementById("target"), "In <textarea> in contenteditable"); - + switch (testingType) { + case "text": + case "password": + container.innerHTML = `Here <b>is</b> Text: <input id="target" type="${testingType}">`; + runTest(document.getElementById("target"), `In <input type="${testingType}">`); + container.setAttribute("contenteditable", "true"); + container.innerHTML = `Here <b>is</b> Text: <input id="target" type="${testingType}">`; + runTest(document.getElementById("target"), `In <input type="${testingType}"> in contenteditable`); + break; + case "textarea": + container.innerHTML = "Here <b>is</b> Text: <textarea id=\"target\"></textarea>"; + runTest(document.getElementById("target"), "In <textarea>"); + container.setAttribute("contenteditable", "true"); + container.innerHTML = "Here <b>is</b> Text: <textarea id=\"target\"></textarea>"; + runTest(document.getElementById("target"), "In <textarea> in contenteditable"); + break; + } done(); } function runTest(aTarget, aDescription) { - const kIsTextArea = aTarget.tagName === "TEXTAREA"; + const kIsTextArea = testingType == "textarea"; const kTests = [ /** * command: command name of execCommand(). diff --git a/tests/wpt/web-platform-tests/fenced-frame/config-cross-origin-apis.https.html b/tests/wpt/web-platform-tests/fenced-frame/config-cross-origin-apis.https.html new file mode 100644 index 00000000000..2d6b97e1aa0 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/config-cross-origin-apis.https.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<title>Test default permission policy features gating (*)</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> + +<body> +<script> +promise_test(async(t) => { + const key = token(); + + const fencedframe = attachFencedFrame( + await generateURNFromFledge( + "resources/config-cross-origin-apis-inner.https.html", + [key])); + + // The fenced frame will send its attribution reporting result and then + // attempt to redirect to a remote origin page. + const resp = await nextValueFromServer(key); + assert_equals(resp, "0", + "The call to getNestedConfigs() should not have returned anything."); +}, 'A fenced frame that navigates itself to a cross origin page loses ' + + 'window.fence API access.'); + +promise_test(async(t) => { + const key = token(); + + const fencedframe = attachFencedFrame( + await generateURNFromFledge( + "resources/config-embed-cross-origin-iframe.https.html", + [key])); + + const resp = await nextValueFromServer(key); + assert_equals(resp, "0", + "The call to getNestedConfigs() should not have returned anything."); +}, 'A cross-origin iframe inside a fenced frame does not get ' + + 'window.fence API access.'); + +</script> +</body> +</html> 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 f5084cf3861..00044a4c856 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 @@ -22,6 +22,32 @@ promise_test(async(t) => { generator_api="sharedstorage"); }, 'Cross-origin fenced frame loads when feature policies are *'); +promise_test(async(t) => { + // We do this test the "old fashioned way" because a redirect in a fenced + // frame remote context will cause it to lose its ability to communicate with + // the main page (which results in a timeout). + const page1_key = token(); + const redirect_key = token(); + + const fencedframe = attachFencedFrame( + await generateURNFromFledge( + "resources/default-enabled-features-navigate.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. + const page1_resp = await nextValueFromServer(page1_key); + assert_equals(page1_resp, "true", + "Attribution reporting should be enabled on the original page."); + + // The fenced frame will send its attribution reporting result and then + // attempt to redirect to a remote origin page. + const redirect_resp = await nextValueFromServer(redirect_key); + assert_equals(redirect_resp, "true", + "Attribution reporting should be enabled on the redirected page."); +}, 'A fenced frame that navigates itself to a cross origin page that allows feature policies ' + + 'can still access the feature policies'); + </script> </body> </html> 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 0360963a0b8..c212a6f44c3 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 @@ -11,10 +11,10 @@ <body> <script> promise_test(async(t) => { - await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN); - await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN, + await runDefaultEnabledFeaturesTest(t, false, get_host_info().ORIGIN); + await runDefaultEnabledFeaturesTest(t, false, get_host_info().ORIGIN, generator_api="sharedstorage"); -}, 'Same-origin fenced frame loads when feature policies are self'); +}, 'Same-origin fenced frame does not when feature policies are self'); promise_test(async(t) => { await runDefaultEnabledFeaturesTest(t, false, get_host_info().REMOTE_ORIGIN); @@ -39,35 +39,6 @@ promise_test(async(t) => { }, []); }, '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 - // frame remote context will cause it to lose its ability to communicate with - // the main page (which results in a timeout). - const page1_key = token(); - const redirect_key = token(); - - 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. - const page1_resp = await nextValueFromServer(page1_key); - assert_equals(page1_resp, "true", - "Attribution reporting should be enabled on the original page."); - - // There is no API to observe whether the document in the fenced frame loaded - // or not. Instead, set up a timeout. If the document loads, "FAIL" will be - // sent to the server. Otherwise "blocked" will be sent after 2 seconds. - const fencedframe_blocked = new Promise(r => t.step_timeout(r, 1000)); - assert_equals("blocked", await Promise.any([ - nextValueFromServer(redirect_key).then(() => "loaded"), - fencedframe_blocked.then(() => "blocked") - ]), "The fenced frame redirect should not be successful."); -}, 'A fenced frame redirected to a page that does not allow feature policies ' + - 'does not navigate'); - </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/fenced-frame/get-nested-configs.https.html b/tests/wpt/web-platform-tests/fenced-frame/get-nested-configs.https.html index ed9f953e74a..da77f94a763 100644 --- a/tests/wpt/web-platform-tests/fenced-frame/get-nested-configs.https.html +++ b/tests/wpt/web-platform-tests/fenced-frame/get-nested-configs.https.html @@ -15,10 +15,9 @@ promise_test(async (t) => { attachFencedFrame(urn); const response = await nextValueFromServer(key); - const [length, first_url] = response.split(","); + const [length] = response.split(","); assert_equals(length, '20', 'There should be 20 nested configurations.'); - assert_equals(first_url, 'opaque', 'The first config should be opaque.'); }, 'getNestedConfigs() created by FLEDGE should return configurations'); for (const resolve_to_config of [true, false]) { diff --git a/tests/wpt/web-platform-tests/fenced-frame/report-event-inactive-document.https.html b/tests/wpt/web-platform-tests/fenced-frame/report-event-inactive-document.https.html new file mode 100644 index 00000000000..d6b91c93793 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/report-event-inactive-document.https.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<title>Test window.fence.reportEvent</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> + +<body> +<script> +promise_test(async(t) => { + const key = token(); + const urn = await generateURNFromFledge("resources/embeddee.html", [key]); + const iframe = document.createElement("iframe"); + iframe.src = urn; + document.body.appendChild(iframe); + + // Wait for the page in the iframe to load and tell us that it's loaded. + await nextValueFromServer(key); + + // Get access to the iframe's window's fence object before removing. + let inner_fence = iframe.contentWindow.fence; + + // window.fence calls should succeed before the iframe is removed. + inner_fence.setReportEventDataForAutomaticBeacons({ + eventType: "reserved.top_navigation", + eventData: 'This is the event data!', + destination: ['buyer'] + }); + + // Remove the iframe to make the iframe's document an inactive document. + iframe.remove(); + + // window.fence calls should fail once the iframe is removed and the document + // becomes inactive. + try { + inner_fence.setReportEventDataForAutomaticBeacons({ + eventType: "reserved.top_navigation", + eventData: 'This is the event data!', + destination: ['buyer'] + }); + assert_unreached("The call should not have succeeded."); + } catch (error) { + assert_equals(error.name, "SecurityError"); + } +}, 'attempts to call set report event in an inactive document should fail'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html new file mode 100644 index 00000000000..79e9affe996 --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html @@ -0,0 +1,37 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<title>Fenced frame attribution reporting self navigation test</title> + +<body> +<script> +// This helper function will navigate a fenced frame to a remote origin page. +// It will then check to make sure that window.fence APIs are not allowed after +// the navigation. +const [key] = parseKeylist(); + +if (location.origin == get_host_info().ORIGIN) { + const configs = window.fence.getNestedConfigs(); + const next_url = getRemoteOriginURL(generateURL( + "config-cross-origin-apis-inner.https.html", [key])); + location.href = next_url; +} else { + const event = { + eventType: "reserved.top_navigation", + eventData: "data!", + destination: ["buyer"], + } + + // These should gracefully fail without badmessaging the renderer. + window.fence.setReportEventDataForAutomaticBeacons(event); + window.fence.reportEvent(event); + + const configs = window.fence.getNestedConfigs(); + + // Report how many configs were obtained. Cross-origin pages should not + // obtain any nested configs. + writeValueToServer(key, configs.length); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html.headers index 1b63235b7cd..1b63235b7cd 100644 --- a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html.headers +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-apis-inner.https.html.headers diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-iframe.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-iframe.https.html new file mode 100644 index 00000000000..b6e390a583d --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-iframe.https.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<title>Fenced frame attribution reporting self navigation test</title> + +<body> +<script> +// This helper function will navigate a child iframe to a remote origin page. +// It will then check to make sure that window.fence APIs are not allowed after +// the navigation. This code is meant to run in a fenced frame. +const [key] = parseKeylist(); + +const event = { + eventType: "reserved.top_navigation", + eventData: "data!", + destination: ["buyer"], +} + +// These should gracefully fail without badmessaging the renderer. +window.fence.setReportEventDataForAutomaticBeacons(event); +window.fence.reportEvent(event); + +const configs = window.fence.getNestedConfigs(); + +// Report how many configs were obtained. Cross-origin pages should not +// obtain any nested configs. +writeValueToServer(key, configs.length); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-iframe.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-iframe.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/config-cross-origin-iframe.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html new file mode 100644 index 00000000000..f21afee011a --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<title>Fenced frame attribution reporting self navigation test</title> + +<body> +<script> +// This helper function will navigate a child iframe to a remote origin page. +// It will then check to make sure that window.fence APIs are not allowed after +// the navigation. This code is meant to run in a fenced frame. +const [key] = parseKeylist(); + +const configs = window.fence.getNestedConfigs(); +const next_url = getRemoteOriginURL(generateURL( + "config-cross-origin-iframe.https.html", [key])); +attachIFrame(next_url); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/config-embed-cross-origin-iframe.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-navigate.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-navigate.https.html new file mode 100644 index 00000000000..6bfb033400e --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-navigate.https.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<script src="utils.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<title>Fenced frame attribution reporting self navigation test</title> + +<body> +<script> +// This helper function will navigate a fenced frame to a remote origin page. +// That redirect should succeed to load and the permissions from the previous page should be in +// place. +const [key1, key2] = parseKeylist(); + +const result_val = document.featurePolicy.allowsFeature('attribution-reporting'); +if (location.origin == get_host_info().ORIGIN) { + writeValueToServer(key1, result_val); + + const next_url = getRemoteOriginURL(generateURL( + "default-enabled-features-navigate.https.html", [key1, key2])); + location.href = next_url; +} else { + writeValueToServer(key2, result_val); +} + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-navigate.https.html.headers b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-navigate.https.html.headers new file mode 100644 index 00000000000..1b63235b7cd --- /dev/null +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-navigate.https.html.headers @@ -0,0 +1 @@ +Supports-Loading-Mode: fenced-frame diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html deleted file mode 100644 index 000b1eb6dd7..00000000000 --- a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-redirect.https.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE html> -<script src="utils.js"></script> -<script src="/common/get-host-info.sub.js"></script> -<title>Fenced frame attribution reporting redirect test</title> - -<body> -<script> -// This helper function will redirect a fenced frame to a remote origin page -// while embedded in a frame that does not allow attribution reporting on -// remote origins. That redirect should fail to load because of the attribution -// reporting restriction. -const [key1, key2] = parseKeylist(); - -if (location.origin == get_host_info().ORIGIN) { - const result_val = - document.featurePolicy.allowsFeature('attribution-reporting') & - document.featurePolicy.allowsFeature('shared-storage'); - - writeValueToServer(key1, - document.featurePolicy.allowsFeature('attribution-reporting')); - - const next_url = getRemoteOriginURL(generateURL( - "attribution-reporting-redirect.https.html", [key1, key2])); - location.href = next_url; -} else { - // The redirect should have been unsuccessful, so we should not reach this - // point. - writeValueToServer(key2, "FAIL"); -} - -</script> -</body> diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/get-nested-configs-inner.html b/tests/wpt/web-platform-tests/fenced-frame/resources/get-nested-configs-inner.html index a83ba93aa6d..122debfe27f 100644 --- a/tests/wpt/web-platform-tests/fenced-frame/resources/get-nested-configs-inner.html +++ b/tests/wpt/web-platform-tests/fenced-frame/resources/get-nested-configs-inner.html @@ -4,7 +4,7 @@ <script> const [key] = parseKeylist(); const configs = window.fence.getNestedConfigs(); -const data_to_send = [configs.length, configs.length > 0 ? configs[0].url : "N/a"]; +const data_to_send = [configs.length]; writeValueToServer(key, data_to_send.join(",")); </script> </html> diff --git a/tests/wpt/web-platform-tests/fetch/api/basic/integrity.sub.any.js b/tests/wpt/web-platform-tests/fetch/api/basic/integrity.sub.any.js index 56dbd4909f6..e3cfd1b2f6e 100644 --- a/tests/wpt/web-platform-tests/fetch/api/basic/integrity.sub.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/basic/integrity.sub.any.js @@ -28,6 +28,9 @@ function integrity(desc, url, integrity, initRequestMode, shouldPass) { const topSha256 = "sha256-KHIDZcXnR2oBHk9DrAA+5fFiR6JjudYjqoXtMR1zvzk="; const topSha384 = "sha384-MgZYnnAzPM/MjhqfOIMfQK5qcFvGZsGLzx4Phd7/A8fHTqqLqXqKo8cNzY3xEPTL"; const topSha512 = "sha512-D6yns0qxG0E7+TwkevZ4Jt5t7Iy3ugmAajG/dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg=="; +const topSha512wrongpadding = "sha512-D6yns0qxG0E7+TwkevZ4Jt5t7Iy3ugmAajG/dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg"; +const topSha512base64url = "sha512-D6yns0qxG0E7-TwkevZ4Jt5t7Iy3ugmAajG_dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg=="; +const topSha512base64url_nopadding = "sha512-D6yns0qxG0E7-TwkevZ4Jt5t7Iy3ugmAajG_dlf6Pado1JqTyneKXICDiqFIkLMRExgtvg8PlxbKTkYfRejSOg"; const invalidSha256 = "sha256-dKUcPOn/AlUjWIwcHeHNqYXPlvyGiq+2dWOdFcE+24I="; const invalidSha512 = "sha512-oUceBRNxPxnY60g/VtPCj2syT4wo4EZh2CgYdWy9veW8+OsReTXoh7dizMGZafvx9+QhMS39L/gIkxnPIn41Zg=="; @@ -38,13 +41,20 @@ const corsUrl = const corsUrl2 = `https://{{host}}:{{ports[https][0]}}${path}` integrity("Empty string integrity", url, "", /* initRequestMode */ undefined, - /* shouldPass */ true); + /* shouldPass */ true); integrity("SHA-256 integrity", url, topSha256, /* initRequestMode */ undefined, /* shouldPass */ true); integrity("SHA-384 integrity", url, topSha384, /* initRequestMode */ undefined, /* shouldPass */ true); integrity("SHA-512 integrity", url, topSha512, /* initRequestMode */ undefined, /* shouldPass */ true); +integrity("SHA-512 integrity with missing padding", url, topSha512wrongpadding, + /* initRequestMode */ undefined, /* shouldPass */ true); +integrity("SHA-512 integrity base64url encoded", url, topSha512base64url, + /* initRequestMode */ undefined, /* shouldPass */ true); +integrity("SHA-512 integrity base64url encoded with missing padding", url, + topSha512base64url_nopadding, /* initRequestMode */ undefined, + /* shouldPass */ true); integrity("Invalid integrity", url, invalidSha256, /* initRequestMode */ undefined, /* shouldPass */ false); integrity("Multiple integrities: valid stronger than invalid", url, diff --git a/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-star.any.js b/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-star.any.js index e8cbc80b808..f9fb20469cf 100644 --- a/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-star.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-star.any.js @@ -80,3 +80,7 @@ preflightTest(true, true, "PATCH", "*", "PATCH", []) preflightTest(false, true, "PATCH", "*", "patch", []) preflightTest(false, true, "patch", "*", "PATCH", []) preflightTest(true, true, "patch", "*", "patch", []) + +// "Authorization" header can't be wildcarded. +preflightTest(false, false, "*", "*", "POST", ["Authorization", "123"]) +preflightTest(true, false, "*", "*, Authorization", "POST", ["Authorization", "123"]) diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-cancel-stream.any.js b/tests/wpt/web-platform-tests/fetch/api/response/response-cancel-stream.any.js index baa46de4039..91140d1afd1 100644 --- a/tests/wpt/web-platform-tests/fetch/api/response/response-cancel-stream.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/response/response-cancel-stream.any.js @@ -55,3 +55,10 @@ promise_test(function() { return readAll(reader).then(() => reader.cancel()); }); }, "Cancelling a closed Response stream"); + +promise_test(async () => { + const response = await fetch(RESOURCES_DIR + "top.txt"); + const { body } = response; + await body.cancel(); + assert_equals(body, response.body, ".body should not change after cancellation"); +}, "Accessing .body after canceling it"); diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js index 53bcdccf7c6..cb73f52e15b 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js @@ -75,8 +75,8 @@ async function assertNotRestoredFromBFCache( } collectReason(result); - assert_equals(notRestoredReasonsSet.length, - expectedNotRestoredReasonsSet.length); + assert_equals(notRestoredReasonsSet.size, + expectedNotRestoredReasonsSet.size); for (let reason of expectedNotRestoredReasonsSet) { assert_true(notRestoredReasonsSet.has(reason)); diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/dangling-markup-window-name.tentative.html b/tests/wpt/web-platform-tests/html/browsers/windows/dangling-markup-window-name.tentative.html new file mode 100644 index 00000000000..1bc8bb9f7ff --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/windows/dangling-markup-window-name.tentative.html @@ -0,0 +1,97 @@ +<!doctype html> +<html> +<head> + <title>Dangling Markup in target</title> + <meta name="timeout" content="long"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/common/utils.js"></script> +</head> +<body> + <script> + function anchorClick(target, id) { + const hyperlink = document.body.appendChild(document.createElement('a')); + if (target) { + hyperlink.target = target; + } + hyperlink.href = `resources/window-name.sub.html?report=${id}|close`; + hyperlink.click(); + } + + async function pollResultAndCheck(t, id, expected) { + const stashURL = new URL('resources/window-name-stash.py', location); + stashURL.searchParams.set('id', id); + + let res = 'NONE'; + while (res == 'NONE') { + await new Promise(resolve => { t.step_timeout(resolve, 100); }); + + const response = await fetch(stashURL); + res = await response.text(); + } + if (res !== expected) { + assert_unreached('Stash result does not equal expected result.') + } + } + + promise_test(async t => { + const id = token(); + const value = '\n<' + id; + + window.open(`resources/window-name.sub.html?report=${id}|close`, value); + await pollResultAndCheck(t, id, value); + }, 'Dangling Markup in target is not reset when set by window.open'); + + promise_test(async t => { + const id = token(); + const value = '\n<' + id; + + anchorClick(value, id) + await pollResultAndCheck(t, id, ''); + }, 'Dangling Markup with "\\n" in target is reset when set by <a> tag'); + + promise_test(async t => { + const id = token(); + const value = '\r<' + id; + + anchorClick(value, id) + await pollResultAndCheck(t, id, ''); + }, 'Dangling Markup with "\\r" in target is reset when set by <a> tag'); + + promise_test(async t => { + const id = token(); + const value = '\t<' + id; + + anchorClick(value, id) + await pollResultAndCheck(t, id, ''); + }, 'Dangling Markup with "\\t" in target is reset when set by <a> tag'); + + promise_test(async t => { + const id = token(); + const value = '\n<' + id; + + const form = document.body.appendChild(document.createElement('form')); + form.target = value; + form.method = 'GET'; + form.action = 'resources/window-name.sub.html'; + const input = form.appendChild(document.createElement('input')); + input.type = 'hidden'; + input.name = 'report'; + input.value = `${id}|close`; + form.submit(); + + await pollResultAndCheck(t, id, ''); + }, 'Dangling Markup in target is reset when set by <form> tag'); + + promise_test(async t => { + const id = token(); + const value = '\n<' + id; + const base = document.head.appendChild(document.createElement('base')); + base.target = value; + + anchorClick(null, id) + await pollResultAndCheck(t, id, ''); + }, 'Dangling Markup in target is reset when set by <base> tag'); + </script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html b/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html index 55fb8ebbbc5..5bb8ebda8f8 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/resources/window-name.sub.html @@ -2,7 +2,7 @@ <title>popup helper</title> <script> -const search = window.location.search.replace("?", ""); + const search = decodeURIComponent(window.location.search.replace("?", "")); const steps = search.split("|"); async function proceedTest() { diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.clear.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.clear.html index 40685597c95..cb805b692e2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.clear.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.copy.html index ac022f95e08..d4e75b7bacf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.copy.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html index 29cf9bcc530..6fded39e44f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-atop.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html index dc748df1537..7277286d8bf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-in.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html index ebf33f3eba1..5860c3d5cb2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-out.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html index 6727e324c63..76bad843929 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.destination-over.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html index abb1fe0ea74..8d706df67e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.lighter.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html index 76ee7db0534..cf3e449123b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-atop.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html index 77cbb5e0a63..dabcced9dd3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-in.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html index 353dcd44381..2fcf7087963 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-out.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html index 06516cb7519..b9dca65744e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.source-over.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.xor.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.xor.html index 3bc6eb5d790..c252e17a7ed 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.canvas.xor.html @@ -19,18 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -var canvas2 = document.createElement('canvas'); -canvas2.width = canvas.width; -canvas2.height = canvas.height; -var ctx2 = canvas2.getContext('2d'); -ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - + var canvas2 = document.createElement('canvas'); + canvas2.width = canvas.width; + canvas2.height = canvas.height; + var ctx2 = canvas2.getContext('2d'); + ctx2.drawImage(document.getElementById('yellow75.png'), 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.clear.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.clear.html index 1757870e996..65cfd951e81 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.clear.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.copy.html index ace0618cca4..b38397a2c7d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.copy.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html index 45301941d7c..79fb3af54c2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-atop.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html index 2ace910253b..63e8d3acfde 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-in.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html index 4b3acf9b86f..839246427f7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-out.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html index 0b1f9b52711..fc7f1ab7286 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.destination-over.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.lighter.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.lighter.html index 4d2525d7513..b3acab02315 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.lighter.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html index db722a8983a..49c3eb0bb56 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-atop.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-in.html index 43479240529..afe92ba4bf7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-in.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-out.html index 358dad372ec..43b352fb466 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-out.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-over.html index 542f889e7f3..4973f8e6e60 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.source-over.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.xor.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.xor.html index edbf6b0be2a..5239d6fd105 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.clip.xor.html @@ -19,17 +19,15 @@ var t = async_test("fill() does not affect pixels outside the clip region."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.clear.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.clear.html index b9ab69b8385..a44f8e35b02 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.clear.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.copy.html index f32e03bbaef..d3c972b6d22 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.copy.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html index 2da0d198d05..7c6f93448bb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-atop.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-in.html index 63871b2d8e7..a2bf972bb90 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-in.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-out.html index 3d96b191ecb..d0d08fa09ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-out.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-over.html index 8e3dafb6357..7ac98904f3b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.destination-over.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.lighter.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.lighter.html index 6271a77594e..1df4c683dfa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.lighter.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-atop.html index eb7d75449dd..86833df6b2b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-atop.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-in.html index 0f2fdad979f..0b6ca4b52e3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-in.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-out.html index fd920855d40..31dfe471e53 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-out.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-over.html index ce5b6c631b8..e396faa5d7c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.source-over.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.xor.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.xor.html index 68ce901d2af..d43742c272f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.image.xor.html @@ -19,13 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); -_assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.drawImage(document.getElementById('yellow75.png'), 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.clear.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.clear.html index e270df33aba..a9469895445 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.clear.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.copy.html index 74d9ad5cc2e..14bee744524 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.copy.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html index 5e8f60474ea..d82fb44cceb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-atop.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html index 246bdee5450..6a491f57c74 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-in.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html index 7227cf41d82..bcc7f24e7a5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-out.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html index 48671cee5be..6e634e6ae52 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.destination-over.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.lighter.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.lighter.html index f869b6d1a90..fddbe924207 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.lighter.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,255,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,255,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html index 14041236d2d..4bb0e3d8b55 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-atop.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-in.html index 8f1cfcd16fd..f8fee40a931 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-in.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-out.html index 55522d54c24..2c9d0861820 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-out.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-over.html index 6194526396d..335987b12b2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.source-over.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.xor.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.xor.html index 431b8a33464..d9da43070e1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.solid.xor.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.clear.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.clear.html index 606d925f10a..de417eea34a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.clear.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.copy.html index 58673a12f83..2048975ec3d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.copy.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,191, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,191, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html index 4d22016feac..1da1f1a4ee0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-atop.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,128,128,191, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,128,191, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html index e946c721514..b0f8abe0efe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-in.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,96, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html index 6e248251933..badbfc4ad7a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-out.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,32, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,32, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html index 4c9c9fbc5fc..e8e0051b2cb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.destination-over.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,146,109,223, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,146,109,223, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html index 4b3d1484479..6e4c42ab9a3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.lighter.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,128,191,255, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,191,255, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html index 4b0987764a1..d3d3fbda126 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-atop.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html index 236f01b49ea..27c66cb6737 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-in.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html index d597ff9e06e..31bb6a24033 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-out.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html index e2f8a7f6f8a..ee20f52b46d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.source-over.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,36,219,223, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,36,219,223, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.xor.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.xor.html index 83027e55204..d1818750dfc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.transparent.xor.html @@ -19,14 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html index cd443ae6aa6..9dfd650b98d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.copy.html @@ -19,15 +19,13 @@ var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html index 9182124ecf2..685a1395049 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-atop.html @@ -19,15 +19,13 @@ var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html index 7906c159d44..9ca8021151f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.destination-in.html @@ -19,15 +19,13 @@ var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html index d46b7d44765..9f1a5f9d51f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-in.html @@ -19,15 +19,13 @@ var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html index 08a026496d5..7653677fd5a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.fill.source-out.html @@ -19,15 +19,13 @@ var t = async_test("fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html index e909612a5f5..61dd0381eeb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.copy.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); -_assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html index d257e2f2af1..440c832c710 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-atop.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); -_assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html index c3e3bc0c47d..03e2e807ede 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.destination-in.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); -_assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html index fbcb3c23dfa..de2e5fad63c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-in.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); -_assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html index 03979e6ffed..5cb9b072b90 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.image.source-out.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); -_assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(document.getElementById('yellow.png'), 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html index 4bdf1d21761..cac66ade5ac 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.copy.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var canvas2 = document.createElement('canvas'); -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var canvas2 = document.createElement('canvas'); + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html index 093b6829536..c7cecc2e3db 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-atop.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var canvas2 = document.createElement('canvas'); -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var canvas2 = document.createElement('canvas'); + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html index dc613bd0619..e090d7d4b4a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.destination-in.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var canvas2 = document.createElement('canvas'); -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var canvas2 = document.createElement('canvas'); + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html index 6616b4ebe4c..0436b408170 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-in.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var canvas2 = document.createElement('canvas'); -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var canvas2 = document.createElement('canvas'); + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html index fe2d70f258b..efbc8ab2f0a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.nocontext.source-out.html @@ -19,14 +19,12 @@ var t = async_test("drawImage() of a canvas with no context draws pixels as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var canvas2 = document.createElement('canvas'); -ctx.drawImage(canvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var canvas2 = document.createElement('canvas'); + ctx.drawImage(canvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html index 4d6a91de918..aaee92022a7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.copy.html @@ -19,14 +19,12 @@ var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html index bf03da0791d..aded018f8ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-atop.html @@ -19,14 +19,12 @@ var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html index f5a5fe3f9df..e520e1ffa36 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.destination-in.html @@ -19,14 +19,12 @@ var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html index 385334d4c66..bee654877bb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-in.html @@ -19,14 +19,12 @@ var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html index ae0be111a98..947893091e9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.uncovered.pattern.source-out.html @@ -19,14 +19,12 @@ var t = async_test("Pattern fill() draws pixels not covered by the source object as (0,0,0,0), and does not leave the pixels unchanged."); _addTest(function(canvas, ctx) { - -ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = ctx.createPattern(document.getElementById('yellow.png'), 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.center.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.center.html index 71a7cae30a1..6f54844b29a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.center.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.center.html @@ -26,22 +26,21 @@ var t = async_test("textAlign center is the center of the em squares (not the bounding box)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'center'; - ctx.fillText('DD', 50, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'center'; + ctx.fillText('DD', 50, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.ltr.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.ltr.html index 5bd7aa10b02..39751e139ca 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.ltr.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.ltr.html @@ -26,22 +26,21 @@ var t = async_test("textAlign end with ltr is the right edge"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'end'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.rtl.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.rtl.html index d37a29c558d..86645a91742 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.rtl.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.end.rtl.html @@ -26,22 +26,21 @@ var t = async_test("textAlign end with rtl is the left edge"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'end'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.left.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.left.html index 5a4bdb6abb9..cd01f2588af 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.left.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.left.html @@ -26,22 +26,21 @@ var t = async_test("textAlign left is the left of the first em square (not the bounding box)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'left'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'left'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.right.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.right.html index 29e009e7224..64207b06e6e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.right.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.right.html @@ -26,22 +26,21 @@ var t = async_test("textAlign right is the right of the last em square (not the bounding box)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'right'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.ltr.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.ltr.html index d74a4b89e41..abf8086e8c1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.ltr.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.ltr.html @@ -26,22 +26,21 @@ var t = async_test("textAlign start with ltr is the left edge"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'start'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.rtl.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.rtl.html index 8dd671cf204..8c5b819854c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.rtl.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.align.start.rtl.html @@ -26,22 +26,21 @@ var t = async_test("textAlign start with rtl is the right edge"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'start'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.basic-manual.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.basic-manual.html index 3652a2191d6..d3f5df9d018 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.basic-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.basic-manual.html @@ -19,13 +19,12 @@ var t = async_test("fillText draws filled text"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.strokeStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('PASS', 5, 35); - + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('PASS', 5, 35); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html index d33df3c78cd..9705d288306 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.NaN.html @@ -19,13 +19,12 @@ var t = async_test("fillText handles maxWidth correctly"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, NaN); -_assertGreen(ctx, 100, 50); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, NaN); + _assertGreen(ctx, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.bound.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.bound.html index 50c67293492..88dc1099238 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.bound.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.bound.html @@ -26,19 +26,18 @@ var t = async_test("fillText handles maxWidth based on line size, not bounding box size"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('DD', 0, 37.5, 100); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('DD', 0, 37.5, 100); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.fontface.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.fontface.html index 1e133a6736c..ed241deeb22 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.fontface.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.fontface.html @@ -26,19 +26,18 @@ var t = async_test("fillText works on @font-face fonts"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#f00'; - ctx.fillText('EEEE', -50, 37.5, 40); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillText('EEEE', -50, 37.5, 40); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large-manual.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large-manual.html index 761679ecf8f..96bb2e7de15 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.large-manual.html @@ -19,12 +19,11 @@ var t = async_test("fillText handles maxWidth correctly"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('PASS', 5, 35, 200); - + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('PASS', 5, 35, 200); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.negative.html index b9febd11508..ad50d576083 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.negative.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.negative.html @@ -19,13 +19,12 @@ var t = async_test("fillText handles maxWidth correctly"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, -1); -_assertGreen(ctx, 100, 50); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, -1); + _assertGreen(ctx, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.small.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.small.html index 0d7b8ff2fb5..75866af4062 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.small.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.small.html @@ -19,13 +19,12 @@ var t = async_test("fillText handles maxWidth correctly"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', -100, 35, 90); -_assertGreen(ctx, 100, 50); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', -100, 35, 90); + _assertGreen(ctx, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.zero.html index 64a3fdc5a7e..a175a578790 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.zero.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.maxWidth.zero.html @@ -19,13 +19,12 @@ var t = async_test("fillText handles maxWidth correctly"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, 0); -_assertGreen(ctx, 100, 50); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, 0); + _assertGreen(ctx, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.rtl-manual.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.rtl-manual.html index 07eeeb497a2..6917d7ed6c8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.rtl-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.rtl-manual.html @@ -19,13 +19,12 @@ var t = async_test("fillText respects Right-To-Left Override characters"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.strokeStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35); - + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.unaffected.html index cb1e7dbae02..94ed31d1993 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.unaffected.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fill.unaffected.html @@ -19,23 +19,22 @@ var t = async_test("fillText does not start a new path or subpath"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); -ctx.moveTo(0, 0); -ctx.lineTo(100, 0); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('FAIL', 5, 35); + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('FAIL', 5, 35); -ctx.lineTo(100, 50); -ctx.lineTo(0, 50); -ctx.fillStyle = '#0f0'; -ctx.fill(); - -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 5,45, 0,255,0,255); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.html index 9adcf3560d5..cb7d6984d1f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.html @@ -26,19 +26,18 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '67px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '67px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.notinpage.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.notinpage.html index 6ccb0c020af..6c347399b2a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.notinpage.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.notinpage.html @@ -25,19 +25,18 @@ var t = async_test("@font-face fonts should work even if they are not used in the page"); _addTest(function(canvas, ctx) { -ctx.font = '67px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '67px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.repeat.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.repeat.html index 457c48c3d1b..d6d33a07681 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.repeat.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.fontface.repeat.html @@ -25,20 +25,19 @@ var t = async_test("Draw with the font immediately, then wait a bit until and draw again. (This crashes some version of WebKit.)"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.font = '67px CanvasTest'; -ctx.fillStyle = '#0f0'; -ctx.fillText('AA', 0, 50); -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.kern.consistent-manual.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.kern.consistent-manual.html index f27c2a7c244..1840ef01b1e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.kern.consistent-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.kern.consistent-manual.html @@ -19,17 +19,16 @@ var t = async_test("Stroked and filled text should have exactly the same kerning so it overlaps"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.strokeStyle = '#0f0'; -ctx.lineWidth = 3; -ctx.font = '20px Arial, sans-serif'; -ctx.fillText('VAVAVAVAVAVAVA', -50, 25); -ctx.fillText('ToToToToToToTo', -50, 45); -ctx.strokeText('VAVAVAVAVAVAVA', -50, 25); -ctx.strokeText('ToToToToToToTo', -50, 45); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 3; + ctx.font = '20px Arial, sans-serif'; + ctx.fillText('VAVAVAVAVAVAVA', -50, 25); + ctx.fillText('ToToToToToToTo', -50, 45); + ctx.strokeText('VAVAVAVAVAVAVA', -50, 25); + ctx.strokeText('ToToToToToToTo', -50, 45); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.basic.html index 26f8114e20e..2c5d4710134 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.basic.html @@ -26,17 +26,16 @@ var t = async_test("U+0020 is rendered the correct size (1em wide)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E EE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.collapse.nonspace.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.collapse.nonspace.html index e105ec358e0..00877c6a0b7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.collapse.nonspace.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.space.collapse.nonspace.html @@ -26,17 +26,16 @@ var t = async_test("Non-space characters are not converted to U+0020 and collapsed"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E\x0b EE', -150, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E\x0b EE', -150, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.basic-manual.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.basic-manual.html index 4481a0d25a9..1db0f0694e8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.basic-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.basic-manual.html @@ -19,14 +19,13 @@ var t = async_test("strokeText draws stroked text"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#0f0'; -ctx.fillStyle = '#f00'; -ctx.lineWidth = 1; -ctx.font = '35px Arial, sans-serif'; -ctx.strokeText('PASS', 5, 35); - + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.fillStyle = '#f00'; + ctx.lineWidth = 1; + ctx.font = '35px Arial, sans-serif'; + ctx.strokeText('PASS', 5, 35); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.unaffected.html index 728765c1fe7..76a36476eeb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.unaffected.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.draw.stroke.unaffected.html @@ -19,24 +19,23 @@ var t = async_test("strokeText does not start a new path or subpath"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); -ctx.moveTo(0, 0); -ctx.lineTo(100, 0); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); -ctx.font = '35px Arial, sans-serif'; -ctx.strokeStyle = '#f00'; -ctx.strokeText('FAIL', 5, 35); + ctx.font = '35px Arial, sans-serif'; + ctx.strokeStyle = '#f00'; + ctx.strokeText('FAIL', 5, 35); -ctx.lineTo(100, 50); -ctx.lineTo(0, 50); -ctx.fillStyle = '#0f0'; -ctx.fill(); - -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 5,45, 0,255,0,255); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.html index f6c3826317b..6de9c6eb504 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.html @@ -19,15 +19,14 @@ var t = async_test("Testing basic functionalities of fontKerning for canvas"); _addTest(function(canvas, ctx) { -_assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); -ctx.fontKerning = "normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -width_normal = ctx.measureText("TAWATAVA").width; -ctx.fontKerning = "none"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -width_none = ctx.measureText("TAWATAVA").width; -_assert(width_normal < width_none, "width_normal < width_none"); - + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + width_normal = ctx.measureText("TAWATAVA").width; + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + width_none = ctx.measureText("TAWATAVA").width; + _assert(width_normal < width_none, "width_normal < width_none"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.with.uppercase.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.with.uppercase.html index db62fbe81a7..fd91a09d732 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.with.uppercase.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontKerning.with.uppercase.html @@ -19,37 +19,36 @@ var t = async_test("Testing basic functionalities of fontKerning for canvas"); _addTest(function(canvas, ctx) { -_assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); -ctx.fontKerning = "Normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "noRmal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "NoRMal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "NORMAL"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); - -ctx.fontKerning = "None"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "none"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "nOne"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "nonE"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "Auto"; -ctx.fontKerning = "NONE"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); - + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "Normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "noRmal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "NoRMal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "NORMAL"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + + ctx.fontKerning = "None"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "nOne"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "nonE"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "Auto"; + ctx.fontKerning = "NONE"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontVariant.settings.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontVariant.settings.html index 6fdd1454b21..cf0a32305d0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontVariant.settings.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.fontVariant.settings.html @@ -19,56 +19,55 @@ var t = async_test("Testing basic functionalities of fontKerning for canvas"); _addTest(function(canvas, ctx) { -// Setting fontVariantCaps with lower cases -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + // Setting fontVariantCaps with lower cases + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "normal"; -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + ctx.fontVariantCaps = "normal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "small-caps"; -_assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); + ctx.fontVariantCaps = "small-caps"; + _assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); -ctx.fontVariantCaps = "all-small-caps"; -_assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); + ctx.fontVariantCaps = "all-small-caps"; + _assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); -ctx.fontVariantCaps = "petite-caps"; -_assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); + ctx.fontVariantCaps = "petite-caps"; + _assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); -ctx.fontVariantCaps = "all-petite-caps"; -_assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); + ctx.fontVariantCaps = "all-petite-caps"; + _assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); -ctx.fontVariantCaps = "unicase"; -_assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); + ctx.fontVariantCaps = "unicase"; + _assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); -ctx.fontVariantCaps = "titling-caps"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + ctx.fontVariantCaps = "titling-caps"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); -// Setting fontVariantCaps with lower cases and upper cases word. -ctx.fontVariantCaps = "nORmal"; -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + // Setting fontVariantCaps with lower cases and upper cases word. + ctx.fontVariantCaps = "nORmal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "smaLL-caps"; -_assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); + ctx.fontVariantCaps = "smaLL-caps"; + _assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); -ctx.fontVariantCaps = "all-small-CAPS"; -_assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); + ctx.fontVariantCaps = "all-small-CAPS"; + _assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); -ctx.fontVariantCaps = "pEtitE-caps"; -_assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); + ctx.fontVariantCaps = "pEtitE-caps"; + _assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); -ctx.fontVariantCaps = "All-Petite-Caps"; -_assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); + ctx.fontVariantCaps = "All-Petite-Caps"; + _assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); -ctx.fontVariantCaps = "uNIcase"; -_assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); + ctx.fontVariantCaps = "uNIcase"; + _assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); -ctx.fontVariantCaps = "titling-CAPS"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); - -// Setting fontVariantCaps with non-existing font variant. -ctx.fontVariantCaps = "abcd"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + ctx.fontVariantCaps = "titling-CAPS"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + // Setting fontVariantCaps with non-existing font variant. + ctx.fontVariantCaps = "abcd"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.invalid.spacing.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.invalid.spacing.html index 9bf2440900c..a0b8340b2cd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.invalid.spacing.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.invalid.spacing.html @@ -19,24 +19,23 @@ var t = async_test("Testing letter spacing and word spacing with invalid units"); _addTest(function(canvas, ctx) { -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -function test_word_spacing(value) { - ctx.wordSpacing = value; - ctx.letterSpacing = value; - _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -} -test_word_spacing('0s'); -test_word_spacing('1min'); -test_word_spacing('1deg'); -test_word_spacing('1pp'); -test_word_spacing('initial'); -test_word_spacing('inherit'); -test_word_spacing('normal'); -test_word_spacing('none'); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing('0s'); + test_word_spacing('1min'); + test_word_spacing('1deg'); + test_word_spacing('1pp'); + test_word_spacing('initial'); + test_word_spacing('inherit'); + test_word_spacing('normal'); + test_word_spacing('none'); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.change.font.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.change.font.html index 3b88ab6ee17..d7543e5d9a8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.change.font.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.change.font.html @@ -19,27 +19,26 @@ var t = async_test("Set letter spacing and word spacing to font dependent value and verify it works after font change."); _addTest(function(canvas, ctx) { -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -// Get the width for 'Hello World' at default size, 10px. -var width_normal = ctx.measureText('Hello World').width; - -ctx.letterSpacing = '1em'; -_assertSame(ctx.letterSpacing, '1em', "ctx.letterSpacing", "'1em'"); -// 1em = 10px. Add 10px after each letter in "Hello World", -// makes it 110px longer. -var width_with_spacing = ctx.measureText('Hello World').width; -assert_approx_equals(width_with_spacing, width_normal + 110, 0.1, "letterSpacing incorrect before font change"); - -// Changing font to 20px. Without resetting the spacing, 1em letterSpacing -// is now 20px, so it's suppose to be 220px longer without any letterSpacing set. -ctx.font = '20px serif'; -width_with_spacing = ctx.measureText('Hello World').width; -// Now calculate the reference spacing for "Hello World" with no spacing. -ctx.letterSpacing = '0em'; -width_normal = ctx.measureText('Hello World').width; -assert_approx_equals(width_with_spacing, width_normal + 220, 0.1, "letterSpacing incorrect after font change"); - + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World' at default size, 10px. + var width_normal = ctx.measureText('Hello World').width; + + ctx.letterSpacing = '1em'; + _assertSame(ctx.letterSpacing, '1em', "ctx.letterSpacing", "'1em'"); + // 1em = 10px. Add 10px after each letter in "Hello World", + // makes it 110px longer. + var width_with_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_spacing, width_normal + 110, 0.1, "letterSpacing incorrect before font change"); + + // Changing font to 20px. Without resetting the spacing, 1em letterSpacing + // is now 20px, so it's suppose to be 220px longer without any letterSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World').width; + // Now calculate the reference spacing for "Hello World" with no spacing. + ctx.letterSpacing = '0em'; + width_normal = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_spacing, width_normal + 220, 0.1, "letterSpacing incorrect after font change"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.measure.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.measure.html index ba8656ec1a3..9b0ce16eafd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.measure.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.letterSpacing.measure.html @@ -19,35 +19,34 @@ var t = async_test("Testing letter spacing and word spacing"); _addTest(function(canvas, ctx) { -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -var width_normal = ctx.measureText('Hello World').width; - -function test_letter_spacing(value, difference_spacing, epsilon) { - ctx.letterSpacing = value; - _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - width_with_letter_spacing = ctx.measureText('Hello World').width; - assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); -} - -// The first value is the letter Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 11 letters -// in 'hello world', so the length difference is always letterSpacing * 11. -// and the third value is the acceptable differencee for the length change, -// note that unit such as 1cm/1mm doesn't map to an exact pixel value. -test_cases = [['3px', 33, 0.1], - ['5px', 55, 0.1], - ['-2px', -22, 0.1], - ['1em', 110, 0.1], - ['1in', 1056, 0.1], - ['-0.1cm', -41.65, 0.2], - ['-0.6mm', -24,95, 0.2]] - -for (const test_case of test_cases) { - test_letter_spacing(test_case[0], test_case[1], test_case[2]); -} - + var width_normal = ctx.measureText('Hello World').width; + + function test_letter_spacing(value, difference_spacing, epsilon) { + ctx.letterSpacing = value; + _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + width_with_letter_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); + } + + // The first value is the letter Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 11 letters + // in 'hello world', so the length difference is always letterSpacing * 11. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 33, 0.1], + ['5px', 55, 0.1], + ['-2px', -22, 0.1], + ['1em', 110, 0.1], + ['1in', 1056, 0.1], + ['-0.1cm', -41.65, 0.2], + ['-0.6mm', -24,95, 0.2]] + + for (const test_case of test_cases) { + test_letter_spacing(test_case[0], test_case[1], test_case[2]); + } }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html index f197d22afa4..5ba20208e5e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.nonfinite.spacing.html @@ -19,19 +19,18 @@ var t = async_test("Testing letter spacing and word spacing with nonfinite inputs"); _addTest(function(canvas, ctx) { -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -function test_word_spacing(value) { - ctx.wordSpacing = value; - ctx.letterSpacing = value; - _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -} -test_word_spacing(NaN); -test_word_spacing(Infinity); -test_word_spacing(-Infinity); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing(NaN); + test_word_spacing(Infinity); + test_word_spacing(-Infinity); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html index b5a411e1db0..82a0fe3cf41 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.spacing.html @@ -19,27 +19,26 @@ var t = async_test("Testing letter spacing and word spacing"); _addTest(function(canvas, ctx) { -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -ctx.letterSpacing = '3px'; -_assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -ctx.wordSpacing = '5px'; -_assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); -_assertSame(ctx.wordSpacing, '5px', "ctx.wordSpacing", "'5px'"); - -ctx.letterSpacing = '-1px'; -ctx.wordSpacing = '-1px'; -_assertSame(ctx.letterSpacing, '-1px', "ctx.letterSpacing", "'-1px'"); -_assertSame(ctx.wordSpacing, '-1px', "ctx.wordSpacing", "'-1px'"); - -ctx.letterSpacing = '1PX'; -ctx.wordSpacing = '1EM'; -_assertSame(ctx.letterSpacing, '1px', "ctx.letterSpacing", "'1px'"); -_assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); - + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.letterSpacing = '3px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.wordSpacing = '5px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '5px', "ctx.wordSpacing", "'5px'"); + + ctx.letterSpacing = '-1px'; + ctx.wordSpacing = '-1px'; + _assertSame(ctx.letterSpacing, '-1px', "ctx.letterSpacing", "'-1px'"); + _assertSame(ctx.wordSpacing, '-1px', "ctx.wordSpacing", "'-1px'"); + + ctx.letterSpacing = '1PX'; + ctx.wordSpacing = '1EM'; + _assertSame(ctx.letterSpacing, '1px', "ctx.letterSpacing", "'1px'"); + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html index f6634ee1a0d..03b35dfaa9d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.textRendering.settings.html @@ -19,38 +19,37 @@ var t = async_test("Testing basic functionalities of textRendering in Canvas"); _addTest(function(canvas, ctx) { -// Setting textRendering with lower cases -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with lower cases + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "auto"; -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "optimizespeed"; -_assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + ctx.textRendering = "optimizespeed"; + _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); -ctx.textRendering = "optimizelegibility"; -_assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + ctx.textRendering = "optimizelegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); -ctx.textRendering = "geometricprecision"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + ctx.textRendering = "geometricprecision"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); -// Setting textRendering with lower cases and upper cases word. -ctx.textRendering = "aUto"; -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with lower cases and upper cases word. + ctx.textRendering = "aUto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "OPtimizeSpeed"; -_assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + ctx.textRendering = "OPtimizeSpeed"; + _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); -ctx.textRendering = "OPtimizELEgibility"; -_assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + ctx.textRendering = "OPtimizELEgibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); -ctx.textRendering = "GeometricPrecision"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); - -// Setting textRendering with non-existing font variant. -ctx.textRendering = "abcd"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + ctx.textRendering = "GeometricPrecision"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + // Setting textRendering with non-existing font variant. + ctx.textRendering = "abcd"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.change.font.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.change.font.html index d29bc8ec203..8bad1a0447c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.change.font.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.change.font.html @@ -19,27 +19,26 @@ var t = async_test("Set word spacing and word spacing to font dependent value and verify it works after font change."); _addTest(function(canvas, ctx) { -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -// Get the width for 'Hello World, again' at default size, 10px. -var width_normal = ctx.measureText('Hello World, again').width; - -ctx.wordSpacing = '1em'; -_assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); -// 1em = 10px. Add 10px after each word in "Hello World, again", -// makes it 20px longer. -var width_with_spacing = ctx.measureText('Hello World, again').width; -_assertSame(width_with_spacing, width_normal + 20, "width_with_spacing", "width_normal + 20"); - -// Changing font to 20px. Without resetting the spacing, 1em wordSpacing -// is now 20px, so it's suppose to be 40px longer without any wordSpacing set. -ctx.font = '20px serif'; -width_with_spacing = ctx.measureText('Hello World, again').width; -// Now calculate the reference spacing for "Hello World, again" with no spacing. -ctx.wordSpacing = '0em'; -width_normal = ctx.measureText('Hello World, again').width; -_assertSame(width_with_spacing, width_normal + 40, "width_with_spacing", "width_normal + 40"); - + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World, again' at default size, 10px. + var width_normal = ctx.measureText('Hello World, again').width; + + ctx.wordSpacing = '1em'; + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); + // 1em = 10px. Add 10px after each word in "Hello World, again", + // makes it 20px longer. + var width_with_spacing = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 20, "width_with_spacing", "width_normal + 20"); + + // Changing font to 20px. Without resetting the spacing, 1em wordSpacing + // is now 20px, so it's suppose to be 40px longer without any wordSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World, again').width; + // Now calculate the reference spacing for "Hello World, again" with no spacing. + ctx.wordSpacing = '0em'; + width_normal = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 40, "width_with_spacing", "width_normal + 40"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.measure.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.measure.html index 4898c23ee78..d4f10032eb5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.measure.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.drawing.style.wordSpacing.measure.html @@ -19,35 +19,34 @@ var t = async_test("Testing if word spacing is working properly"); _addTest(function(canvas, ctx) { -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -var width_normal = ctx.measureText('Hello World, again').width; - -function test_word_spacing(value, difference_spacing, epsilon) { - ctx.wordSpacing = value; _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); - _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); - width_with_word_spacing = ctx.measureText('Hello World, again').width; - assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); -} - -// The first value is the word Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 2 words -// in 'Hello World, again', so the length difference is always wordSpacing * 2. -// and the third value is the acceptable differencee for the length change, -// note that unit such as 1cm/1mm doesn't map to an exact pixel value. -test_cases = [['3px', 6, 0.1], - ['5px', 10, 0.1], - ['-2px', -4, 0.1], - ['1em', 20, 0.1], - ['1in', 192, 0.1], - ['-0.1cm', -7.57, 0.2], - ['-0.6mm', -4.54, 0.2]] - -for (const test_case of test_cases) { - test_word_spacing(test_case[0], test_case[1], test_case[2]); -} - + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + var width_normal = ctx.measureText('Hello World, again').width; + + function test_word_spacing(value, difference_spacing, epsilon) { + ctx.wordSpacing = value; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); + width_with_word_spacing = ctx.measureText('Hello World, again').width; + assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); + } + + // The first value is the word Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 2 words + // in 'Hello World, again', so the length difference is always wordSpacing * 2. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 6, 0.1], + ['5px', 10, 0.1], + ['-2px', -4, 0.1], + ['1em', 20, 0.1], + ['1in', 192, 0.1], + ['-0.1cm', -7.57, 0.2], + ['-0.6mm', -4.54, 0.2]] + + for (const test_case of test_cases) { + test_word_spacing(test_case[0], test_case[1], test_case[2]); + } }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html index 44cff25d1af..23174930321 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.actualBoundingBox.html @@ -26,39 +26,38 @@ var t = async_test("Testing actualBoundingBox"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - ctx.baseline = 'alphabetic' - // Different platforms may render text slightly different. - // Values that are nominally expected to be zero might actually vary by a pixel or so - // if the UA accounts for antialiasing at glyph edges, so we allow a slight deviation. - _assert(Math.abs(ctx.measureText('A').actualBoundingBoxLeft) <= 1, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft) <= 1"); - _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50"); - _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35"); - _assert(Math.abs(ctx.measureText('A').actualBoundingBoxDescent) <= 1, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent) <= 1"); + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + ctx.baseline = 'alphabetic' + // Different platforms may render text slightly different. + // Values that are nominally expected to be zero might actually vary by a pixel or so + // if the UA accounts for antialiasing at glyph edges, so we allow a slight deviation. + _assert(Math.abs(ctx.measureText('A').actualBoundingBoxLeft) <= 1, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft) <= 1"); + _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50"); + _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35"); + _assert(Math.abs(ctx.measureText('A').actualBoundingBoxDescent) <= 1, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent) <= 1"); - _assert(ctx.measureText('D').actualBoundingBoxLeft >= 48, "ctx.measureText('D').actualBoundingBoxLeft >= 48"); - _assert(ctx.measureText('D').actualBoundingBoxLeft <= 52, "ctx.measureText('D').actualBoundingBoxLeft <= 52"); - _assert(ctx.measureText('D').actualBoundingBoxRight >= 75, "ctx.measureText('D').actualBoundingBoxRight >= 75"); - _assert(ctx.measureText('D').actualBoundingBoxRight <= 80, "ctx.measureText('D').actualBoundingBoxRight <= 80"); - _assert(ctx.measureText('D').actualBoundingBoxAscent >= 35, "ctx.measureText('D').actualBoundingBoxAscent >= 35"); - _assert(ctx.measureText('D').actualBoundingBoxAscent <= 40, "ctx.measureText('D').actualBoundingBoxAscent <= 40"); - _assert(ctx.measureText('D').actualBoundingBoxDescent >= 12, "ctx.measureText('D').actualBoundingBoxDescent >= 12"); - _assert(ctx.measureText('D').actualBoundingBoxDescent <= 15, "ctx.measureText('D').actualBoundingBoxDescent <= 15"); - - _assert(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) <= 1, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) <= 1"); - _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); - _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); - _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); - }), 500); -}); + _assert(ctx.measureText('D').actualBoundingBoxLeft >= 48, "ctx.measureText('D').actualBoundingBoxLeft >= 48"); + _assert(ctx.measureText('D').actualBoundingBoxLeft <= 52, "ctx.measureText('D').actualBoundingBoxLeft <= 52"); + _assert(ctx.measureText('D').actualBoundingBoxRight >= 75, "ctx.measureText('D').actualBoundingBoxRight >= 75"); + _assert(ctx.measureText('D').actualBoundingBoxRight <= 80, "ctx.measureText('D').actualBoundingBoxRight <= 80"); + _assert(ctx.measureText('D').actualBoundingBoxAscent >= 35, "ctx.measureText('D').actualBoundingBoxAscent >= 35"); + _assert(ctx.measureText('D').actualBoundingBoxAscent <= 40, "ctx.measureText('D').actualBoundingBoxAscent <= 40"); + _assert(ctx.measureText('D').actualBoundingBoxDescent >= 12, "ctx.measureText('D').actualBoundingBoxDescent >= 12"); + _assert(ctx.measureText('D').actualBoundingBoxDescent <= 15, "ctx.measureText('D').actualBoundingBoxDescent <= 15"); + _assert(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) <= 1, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft) <= 1"); + _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); + _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); + _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.advances.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.advances.html index e7039c78793..84d0af46b84 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.advances.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.advances.html @@ -26,31 +26,30 @@ var t = async_test("Testing width advances"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - // Some platforms may return '-0'. - _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0"); - // Different platforms may render text slightly different. - _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36"); - _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58"); - _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70"); - _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80"); - - var tm = ctx.measureText('Hello'); - _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); - }), 500); -}); - + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + // Some platforms may return '-0'. + _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0"); + // Different platforms may render text slightly different. + _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36"); + _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58"); + _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70"); + _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80"); + + var tm = ctx.measureText('Hello'); + _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html index 812949e25f0..95fac522d94 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.baselines.html @@ -26,24 +26,23 @@ var t = async_test("Testing baselines"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); - - _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); - }), 500); -}); - + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); + _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); + _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); + + _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); + _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); + _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.direction.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.direction.html index 4387b6ca977..a00eb7eb9c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.direction.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.direction.html @@ -19,14 +19,13 @@ var t = async_test("Measurement should follow text direction"); _addTest(function(canvas, ctx) { -ctx.direction = "ltr"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); - -ctx.direction = "rtl"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + ctx.direction = "ltr"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + ctx.direction = "rtl"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.textAlign.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.textAlign.html index 65c030936b3..88f594c7c8f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.textAlign.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.boundingBox.textAlign.html @@ -19,14 +19,13 @@ var t = async_test("Measurement should be related to textAlignment"); _addTest(function(canvas, ctx) { -ctx.textAlign = "right"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); - -ctx.textAlign = "left" -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + ctx.textAlign = "right"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + ctx.textAlign = "left" + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.emHeights.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.emHeights.html index 7a4b7795430..d1085abd6e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.emHeights.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.emHeights.html @@ -26,24 +26,23 @@ var t = async_test("Testing emHeights"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(ctx.measureText('A').emHeightAscent, 37.5, "ctx.measureText('A').emHeightAscent", "37.5"); - _assertSame(ctx.measureText('A').emHeightDescent, 12.5, "ctx.measureText('A').emHeightDescent", "12.5"); - _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 50, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "50"); - - _assertSame(ctx.measureText('ABCD').emHeightAscent, 37.5, "ctx.measureText('ABCD').emHeightAscent", "37.5"); - _assertSame(ctx.measureText('ABCD').emHeightDescent, 12.5, "ctx.measureText('ABCD').emHeightDescent", "12.5"); - _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 50, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "50"); - }), 500); -}); - + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').emHeightAscent, 37.5, "ctx.measureText('A').emHeightAscent", "37.5"); + _assertSame(ctx.measureText('A').emHeightDescent, 12.5, "ctx.measureText('A').emHeightDescent", "12.5"); + _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 50, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "50"); + + _assertSame(ctx.measureText('ABCD').emHeightAscent, 37.5, "ctx.measureText('ABCD').emHeightAscent", "37.5"); + _assertSame(ctx.measureText('ABCD').emHeightDescent, 12.5, "ctx.measureText('ABCD').emHeightDescent", "12.5"); + _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 50, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "50"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html index 7af141ac8ef..80cbabac8f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.ahem.html @@ -26,22 +26,21 @@ var t = async_test("Testing fontBoundingBox for font ahem"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("Ahem", "/fonts/Ahem.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px Ahem'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 40, "ctx.measureText('A').fontBoundingBoxAscent", "40"); - _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 10, "ctx.measureText('A').fontBoundingBoxDescent", "10"); - - _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 40, "ctx.measureText('ABCD').fontBoundingBoxAscent", "40"); - _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); - }), 500); -}); - + deferTest(); + var f = new FontFace("Ahem", "/fonts/Ahem.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px Ahem'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 40, "ctx.measureText('A').fontBoundingBoxAscent", "40"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 10, "ctx.measureText('A').fontBoundingBoxDescent", "10"); + + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 40, "ctx.measureText('ABCD').fontBoundingBoxAscent", "40"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 10, "ctx.measureText('ABCD').fontBoundingBoxDescent", "10"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html index 6cdd7b8cf30..2737d2da9a6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.fontBoundingBox.html @@ -26,22 +26,21 @@ var t = async_test("Testing fontBoundingBox"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 85, "ctx.measureText('A').fontBoundingBoxAscent", "85"); - _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 39, "ctx.measureText('A').fontBoundingBoxDescent", "39"); - - _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 85, "ctx.measureText('ABCD').fontBoundingBoxAscent", "85"); - _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 39, "ctx.measureText('ABCD').fontBoundingBoxDescent", "39"); - }), 500); -}); - + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 85, "ctx.measureText('A').fontBoundingBoxAscent", "85"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 39, "ctx.measureText('A').fontBoundingBoxDescent", "39"); + + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 85, "ctx.measureText('ABCD').fontBoundingBoxAscent", "85"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 39, "ctx.measureText('ABCD').fontBoundingBoxDescent", "39"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.rtl.text.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.rtl.text.html index 539eab0715c..a92d5cbd0be 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.rtl.text.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.rtl.text.html @@ -26,12 +26,11 @@ var t = async_test("Measurement should follow canvas direction instead text direction"); _addTest(function(canvas, ctx) { -metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); - -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.basic.html index 4c528ed06a7..1d5502d8f0e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.basic.html @@ -26,21 +26,20 @@ var t = async_test("The width of character is same as font used"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50"); - _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100"); - _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200"); - - ctx.font = '100px CanvasTest'; - _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100"); - }), 500); -}); - + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50"); + _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100"); + _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200"); + + ctx.font = '100px CanvasTest'; + _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.empty.html index 83686314227..ce9e80b3381 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-text-to-the-canvas/2d.text.measure.width.empty.html @@ -26,16 +26,15 @@ var t = async_test("The empty string has zero width"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); - }), 500); -}); - + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html index cc48c2e1476..481d6fe9e51 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html @@ -19,32 +19,31 @@ var t = async_test("CSSHSL works as color input"); _addTest(function(canvas, ctx) { -ctx.fillStyle = new CSSHSL(CSS.deg(180), 0.5, 0.5); -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 64,191,191,255, 3); - -const color = new CSSHSL(CSS.deg(180), 1, 1); -ctx.fillStyle = color; -_assertSame(ctx.fillStyle, '#ffffff', "ctx.fillStyle", "'#ffffff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); -color.l = 0.5; -ctx.fillStyle = color; -_assertSame(ctx.fillStyle, '#00ffff', "ctx.fillStyle", "'#00ffff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,255,255); - -ctx.fillStyle = new CSSRGB(1, 0, 1).toHSL(); -_assertSame(ctx.fillStyle, '#ff00ff', "ctx.fillStyle", "'#ff00ff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,0,255,255); - -color.h = CSS.deg(120); -color.s = 1; -color.l = 0.5; -ctx.fillStyle = color; -ctx.fillRect(0, 0, 100, 50); - + ctx.fillStyle = new CSSHSL(CSS.deg(180), 0.5, 0.5); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 64,191,191,255, 3); + + const color = new CSSHSL(CSS.deg(180), 1, 1); + ctx.fillStyle = color; + _assertSame(ctx.fillStyle, '#ffffff', "ctx.fillStyle", "'#ffffff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + color.l = 0.5; + ctx.fillStyle = color; + _assertSame(ctx.fillStyle, '#00ffff', "ctx.fillStyle", "'#00ffff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,255,255); + + ctx.fillStyle = new CSSRGB(1, 0, 1).toHSL(); + _assertSame(ctx.fillStyle, '#ff00ff', "ctx.fillStyle", "'#ff00ff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,0,255,255); + + color.h = CSS.deg(120); + color.s = 1; + color.l = 0.5; + ctx.fillStyle = color; + ctx.fillRect(0, 0, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html index 0e3fcd4f671..cfdb603d5de 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.CSSRGB.html @@ -19,41 +19,40 @@ var t = async_test("CSSRGB works as color input"); _addTest(function(canvas, ctx) { -ctx.fillStyle = new CSSRGB(1, 0, 1); -_assertSame(ctx.fillStyle, '#ff00ff', "ctx.fillStyle", "'#ff00ff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,0,255,255); - -const color = new CSSRGB(0, CSS.percent(50), 0); -ctx.fillStyle = color; -_assertSame(ctx.fillStyle, '#008000', "ctx.fillStyle", "'#008000'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,128,0,255); -color.g = 0; -ctx.fillStyle = color; -_assertSame(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,255); - -color.alpha = 0; -ctx.fillStyle = color; -_assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); -ctx.reset(); -color.alpha = 0.5; -ctx.fillStyle = color; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,128); - -ctx.fillStyle = new CSSHSL(CSS.deg(0), 1, 1).toRGB(); -_assertSame(ctx.fillStyle, '#ffffff', "ctx.fillStyle", "'#ffffff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); - -color.alpha = 1; -color.g = 1; -ctx.fillStyle = color; -ctx.fillRect(0, 0, 100, 50); - + ctx.fillStyle = new CSSRGB(1, 0, 1); + _assertSame(ctx.fillStyle, '#ff00ff', "ctx.fillStyle", "'#ff00ff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,0,255,255); + + const color = new CSSRGB(0, CSS.percent(50), 0); + ctx.fillStyle = color; + _assertSame(ctx.fillStyle, '#008000', "ctx.fillStyle", "'#008000'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,128,0,255); + color.g = 0; + ctx.fillStyle = color; + _assertSame(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); + + color.alpha = 0; + ctx.fillStyle = color; + _assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); + ctx.reset(); + color.alpha = 0.5; + ctx.fillStyle = color; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,128); + + ctx.fillStyle = new CSSHSL(CSS.deg(0), 1, 1).toRGB(); + _assertSame(ctx.fillStyle, '#ffffff', "ctx.fillStyle", "'#ffffff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + + color.alpha = 1; + color.g = 1; + ctx.fillStyle = color; + ctx.fillRect(0, 0, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html index 31e051ae6c2..1bd3e2d4ad0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.default.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); - + _assertSame(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html index 4101bf4ce9d..423293e1b60 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = 'rgba(255,255,255,0.5)'; -_assertSame(ctx.fillStyle, 'rgba(255, 255, 255, 0.5)', "ctx.fillStyle", "'rgba(255, 255, 255, 0.5)'"); - + ctx.fillStyle = 'rgba(255,255,255,0.5)'; + _assertSame(ctx.fillStyle, 'rgba(255, 255, 255, 0.5)', "ctx.fillStyle", "'rgba(255, 255, 255, 0.5)'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html index 9f178473097..ec63d7662d2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = 'rgba(255,255,255,0.45)'; -assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/); - + ctx.fillStyle = 'rgba(255,255,255,0.45)'; + assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html index 9361389541c..bcdd57a7cac 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.solid.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#fa0'; -_assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'"); - + ctx.fillStyle = '#fa0'; + _assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html index fd381eb8147..21931aaf23b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.get.transparent.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = 'rgba(0,0,0,0)'; -_assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); - + ctx.fillStyle = 'rgba(0,0,0,0)'; + _assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.html index 16bb9235c9b..9fb83063f62 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidstring.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.fillStyle = 'invalid'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillStyle = 'invalid'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.html index d218368359f..84d8fbd3ffa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.invalidtype.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.fillStyle = null; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillStyle = null; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html index 12a338e066a..87b5bc9371a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html index 71db4187ac0..746c358dbbc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html index 6c84e94b031..b8a9cd5a090 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html index d37965702e0..d5e58b9321f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html index 62ad91f1dba..85bbb802b53 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html index 9c879828d0a..154bdcd49a6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html index c3e2334d445..5cf81e41a1a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html index b9baf11e2b4..17d0782df1b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html index 274585c3c9f..2f4b1e8e1a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html index e4a5cbc0942..bc70e21d621 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html index 976bf71b87f..7f774985319 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html index 16100e6a94c..c33a50a9466 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html index eb0158e392c..3d0cafc66b4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html index c1b7c566b3a..a70613b49fa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html index 06aa355d251..8c46d887ba9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html index eb66e2748aa..b6b4760086b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html index 0c13368ac26..7933d47fd2b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html index fd2cedd56d9..8a4e29d40ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html index 7fa79bf07d1..632b7f57fb5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0, 255.0, 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255.0, 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.parse.css-color-4-rgb-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html index 89ef2183a74..1d3e683b35d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0, 255, 0, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html index 6be6f060671..8a6f3523509 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0, 255, 0, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html index 23c69bd939e..1fdf9ecf92d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0 255 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 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.parse.css-color-4-rgb-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html index b853fbf3537..a1d99d5e240 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0 255 0 / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html index 8a62fa22d8e..ad2c5f5484f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0 255 0 / 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html index 66834dd7064..f394dbfb2ff 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0, 255.0, 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255.0, 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.parse.css-color-4-rgba-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html index 4a4cb78c62a..5529bc14627 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0, 255, 0, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html index 51e94687861..82047a5698c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0, 255, 0, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html index 07a65ac8f36..5fea546f104 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0 255 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 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.parse.css-color-4-rgba-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html index 2f798f47f31..d0485665221 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0 255 0 / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html index 5ca7564a058..28feb2eb178 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0 255 0 / 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html index e48d05ceabb..a1481e36e1a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html @@ -19,12 +19,11 @@ var t = async_test("currentColor is computed from the canvas element"); _addTest(function(canvas, ctx) { -canvas.setAttribute('style', 'color: #0f0'); -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'currentColor'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + canvas.setAttribute('style', 'color: #0f0'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'currentColor'; + 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.parse.current.changed.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html index f298af5adb6..2f4d0fe4f05 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html @@ -19,13 +19,12 @@ var t = async_test("currentColor is computed when the attribute is set, not when it is painted"); _addTest(function(canvas, ctx) { -canvas.setAttribute('style', 'color: #0f0'); -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'currentColor'; -canvas.setAttribute('style', 'color: #f00'); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + canvas.setAttribute('style', 'color: #0f0'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'currentColor'; + canvas.setAttribute('style', 'color: #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/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html index 2642b888e9d..96b070c8c10 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.current.removed.html @@ -19,24 +19,23 @@ var t = async_test("currentColor is solid black when the canvas element is not in a document"); _addTest(function(canvas, ctx) { -// Try not to let it undetectably incorrectly pick up opaque-black -// from other parts of the document: -document.body.parentNode.setAttribute('style', 'color: #f00'); -document.body.setAttribute('style', 'color: #f00'); -canvas.setAttribute('style', 'color: #f00'); - -var canvas2 = document.createElement('canvas'); -var ctx2 = canvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillStyle = 'currentColor'; -ctx2.fillRect(0, 0, 100, 50); -ctx.drawImage(canvas2, 0, 0); - -document.body.parentNode.removeAttribute('style'); -document.body.removeAttribute('style'); - -_assertPixel(canvas, 50,25, 0,0,0,255); - + // Try not to let it undetectably incorrectly pick up opaque-black + // from other parts of the document: + document.body.parentNode.setAttribute('style', 'color: #f00'); + document.body.setAttribute('style', 'color: #f00'); + canvas.setAttribute('style', 'color: #f00'); + + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillStyle = 'currentColor'; + ctx2.fillRect(0, 0, 100, 50); + ctx.drawImage(canvas2, 0, 0); + + document.body.parentNode.removeAttribute('style'); + document.body.removeAttribute('style'); + + _assertPixel(canvas, 50,25, 0,0,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html index 9fbb2750147..017bfc88c25 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html index fc79cc7d3fc..c8704edbb26 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = '#0f0f'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#0f0f'; + 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.parse.hex6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html index b946c30e174..9644a46a0c1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = '#00fF00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#00fF00'; + 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.parse.hex8.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html index 5865e98f3f5..b2dd06982d5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = '#00ff00ff'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#00ff00ff'; + 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.parse.hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html index e169904889b..ceb3da52e0b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120, 100%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, 50%)'; + 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.parse.hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html index ec61f580eb6..22e67e33d43 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl( -240 , 100% , 50% )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl( -240 , 100% , 50% )'; + 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.parse.hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html index 0ec6fce487b..e182952fbf9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(360120, 100%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(360120, 100%, 50%)'; + 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.parse.hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html index b3119da927d..b320c1c98be 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(-360240, 100%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(-360240, 100%, 50%)'; + 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.parse.hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html index 1867bba7cb8..1264f626de6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html index 7a5e764d95f..e0fc7875596 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(+120, +100%, +50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(+120, +100%, +50%)'; + 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.parse.hsl-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html index f623320cd53..59d66c383c9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120, 200%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 200%, 50%)'; + 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.parse.hsl-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html index 0293acd9eb4..1a1939e47af 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120, -200%, 49.9%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 127,127,127,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, -200%, 49.9%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html index 2ea1a5115a5..56f3a0a8b54 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120, 100%, 200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, 200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html index add688ebc91..af9d11e678c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsl(120, 100%, -200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, -200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html index 38427cfc3ac..dbc738ffa7e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla(120, 100%, 50%, 0.499)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 50%, 0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html index 01a83676ad8..aa21789b028 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html index b7914e3a021..2acac26e1a9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla(120, 200%, 50%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 200%, 50%, 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.fillStyle.parse.hsla-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html index 94b62374560..0f32fb5474a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla(120, -200%, 49.9%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 127,127,127,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, -200%, 49.9%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html index bc2466b6b57..4bc134aec5c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla(120, 100%, 200%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html index 35c0d00011b..f8b2382755a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html index 13fac2fd589..9c5e2258b9e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla(120, 100%, 50%, 2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 50%, 2)'; + 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.parse.hsla-clamp-6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html index ba76ad6a99b..153515eedda 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'hsla(120, 100%, 0%, -2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 0%, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html index ae54397c924..65d0d2020cf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.html4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'limE'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'limE'; + 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.parse.invalid.css-color-4-hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html index 1850125baa4..4046f825a11 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html index b4fd4a6fd97..2075f8e4598 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html index 224da3a981d..53bbf6c7eef 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html index 0e4b77ba80b..e8be93b59d1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0 100% 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html index 08e03db12f3..b8938adeb2e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html index 62f82953fdb..7104ca6a848 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html index d6b78e923d5..c340e7445dd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsla(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html index c5717406a20..3f94ec16ff9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html index 01ff94e8b02..69503593fe0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html index 2b782e35fc1..96af643ee80 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html index 54849f6c559..a2691acaf1b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html index 97d5748aaff..eb5f56692a6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(0 0 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0 0 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html index 666c3c3d3e5..7de9dd4911e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(0, 0, 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0, 0, 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html index fefe336c19f..20b889c5ccc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html index bf12006745c..908545cebe6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html index a4e4e906afc..851314f6439 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html index 04c67e343ef..9aba3922760 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html index 7027db50cad..361db1de43b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html index ae7a32a5a4a..7df089d840c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html index d355309c19b..6089675b814 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html index 0b80566b8cf..488daf46902 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html index 02b75c3aba6..ec0def2e100 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html index 6a73bc1f75c..2b07b8dc9b9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html index 3a03959ec4e..f886d4a67cb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html index 38a01fc107a..153f9cb513d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html index 6783a18e873..7a2bd4f930a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html index 8f9137e4d72..8ad0f542647 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html index 56c7228b410..780b83b383e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html index df84f6854f5..ad5944f1c0a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html index 2a7d0753d90..948a9d8a360 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 50%,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50%,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html index 5d22135c5cf..7a4bdb318f1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html index f1a29cdac2d..4164de3bbdc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html index e48d086ef23..109a22cdf98 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 0, 50%, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html index 80433bcffd6..acdd4d4c8ee 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html index e1a49f97c9d..292f909bcd3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html index c8a7f2e6588..f47ec43f552 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html index b9c491fd310..d15d787f639 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html index 15dab0bef5b..ce391d00696 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html index 7ab4a42fa8c..934f725dd3f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html index 1aa36bb32bd..f92a06b4504 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html index 7ce48c1b7e9..8ebde1782a7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html index d3bd36dcf2d..6e3d135f418 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html index 0f468b66fad..a6a61002daf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html index 20da461ad9e..464d562b2f6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html index 6dc36ea341d..815ce2f8b6b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html index 86afaa70977..33c3e33dfce 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html index dfaac146371..0432a3bbd47 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(-1000, 1000, -1000)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-1000, 1000, -1000)'; + 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.parse.rgb-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html index 5247f467318..cf81e3c73f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(-200%, 200%, -200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-200%, 200%, -200%)'; + 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.parse.rgb-clamp-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html index 8db471c3c05..b3c609fbee8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)'; + 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.parse.rgb-clamp-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html index e7a210f48d5..60aa8563bdd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)'; + 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.parse.rgb-clamp-5.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html index 1f1e9ef70fb..242ca3933db 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)'; + 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.parse.rgb-eof.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html index b69c779a7a9..201874c27d5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0, 255, 0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 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.parse.rgb-num.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html index 7d9d5eda56c..0ce1db836fc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0,255,0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0,255,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.parse.rgb-percent.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html index ea5529c0ee6..9b3de61672a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgb(0% ,100% ,0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0% ,100% ,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.parse.rgba-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html index c5816e0660f..587253ad69d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0, 255, 0, -2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html index 69a55cfc9a0..4e8156e60a5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0, 255, 0, 2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 2)'; + 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.parse.rgba-eof.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html index 12c296dcfb3..5f07d38b682 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0, 255, 0, 1'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 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.fillStyle.parse.rgba-num-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html index 41968883df3..0c329c96ea3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba( 0 , 255 , 0 , .499 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , .499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html index f7fb6185ea0..384a7f412a7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba( 0 , 255 , 0 , 0.499 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 0.499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html index 3f1a7305bde..60ee007577a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba(0%,100%,0%,0.499)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0%,100%,0%,0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html index efa7eb8928a..eaec0debcbb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba( 0 , 255 , 0 , 1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 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.fillStyle.parse.rgba-solid-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html index eaf917e2c9c..947bbbce8d9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba( 0 , 255 , 0 , 1.0 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 1.0 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html index c525f824a92..052a12beae5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba( 0 , 255 , 0 , +1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , +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.fillStyle.parse.rgba-solid-4.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html index b7f96741bd5..ee9cd4e34e1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'rgba( -0 , 255 , +0 , 1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( -0 , 255 , +0 , 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.fillStyle.parse.svg-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html index 9a9a280c477..0ff839b8cb2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'gray'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 128,128,128,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'gray'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html index 26c2abec09c..141f4bfe461 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'grey'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 128,128,128,255); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'grey'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html index d6c61951766..3a56389973c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.system.html @@ -19,11 +19,9 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'ThreeDDarkShadow'; -assert_regexp_match(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/); // test that it's not red - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'ThreeDDarkShadow'; + assert_regexp_match(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/); // test that it's not red }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html index 9ab01f0cbb6..5b9a834c0b2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'transparent'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'transparent'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html index d7730a55045..a077534c23e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html @@ -19,12 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { - -ctx.fillStyle = '#f00'; -ctx.fillStyle = 'TrAnSpArEnT'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); - + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'TrAnSpArEnT'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html index d420bbfc360..2a12b05839b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html @@ -19,21 +19,20 @@ var t = async_test("Passing a function in to ctx.fillStyle or ctx.strokeStyle with a toString callback works as specified"); _addTest(function(canvas, ctx) { -ctx.fillStyle = { toString: function() { return "#008000"; } }; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -ctx.fillStyle = {}; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -ctx.fillStyle = 800000; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -assert_throws_js(TypeError, function() { ctx.fillStyle = { toString: function() { throw new TypeError; } }; }); -ctx.strokeStyle = { toString: function() { return "#008000"; } }; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -ctx.strokeStyle = {}; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -ctx.strokeStyle = 800000; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -assert_throws_js(TypeError, function() { ctx.strokeStyle = { toString: function() { throw new TypeError; } }; }); - + ctx.fillStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = {}; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = 800000; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.fillStyle = { toString: function() { throw new TypeError; } }; }); + ctx.strokeStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = {}; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = 800000; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.strokeStyle = { toString: function() { throw new TypeError; } }; }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html index ab10f44b2fa..1a4cde4146f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html @@ -19,26 +19,25 @@ var t = async_test("Conic gradient function with invalid inputs"); _addTest(function(canvas, ctx) { -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(-Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(NaN, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, -Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, NaN, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, NaN); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, Infinity); }); - -const g = ctx.createConicGradient(0, 0, 25); -assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#f00'); }); -assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#f00'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, -Infinity); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, NaN); }); - + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(-Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, Infinity); }); + + const g = ctx.createConicGradient(0, 0, 25); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#f00'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#f00'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, -Infinity); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, NaN); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html index f61b614f705..ba85463b41a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html @@ -19,17 +19,16 @@ var t = async_test("Conic gradient with negative rotation"); _addTest(function(canvas, ctx) { -const g = ctx.createConicGradient(-Math.PI/2, 50, 25); -// It's red in the upper right region and green on the lower left region -g.addColorStop(0, "#f00"); -g.addColorStop(0.25, "#0f0"); -g.addColorStop(0.50, "#0f0"); -g.addColorStop(0.75, "#f00"); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); -_assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); - + const g = ctx.createConicGradient(-Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html index ffe95866584..f8cebbb0d43 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html @@ -19,17 +19,16 @@ var t = async_test("Conic gradient with positive rotation"); _addTest(function(canvas, ctx) { -const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); -// It's red in the upper right region and green on the lower left region -g.addColorStop(0, "#f00"); -g.addColorStop(0.25, "#0f0"); -g.addColorStop(0.50, "#0f0"); -g.addColorStop(0.75, "#f00"); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); -_assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); - + const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html index bdf702fb49c..dcc75752542 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.empty.html @@ -19,13 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createLinearGradient(0, 0, 0, 50); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 0, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html index e0ed47e03fe..13f48f37bf9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html @@ -19,17 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#ff0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, 'rgba(0,0,255, 0)'); -g.addColorStop(1, 'rgba(0,0,255, 1)'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); -_assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); - + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(0,0,255, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html index e6806d7df10..3f7e27abe0f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.color.html @@ -19,15 +19,14 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); -_assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); - + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html index 33fee527d4b..0d635ed6712 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html @@ -19,15 +19,14 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, 'rgba(255,255,0, 0)'); -g.addColorStop(1, 'rgba(0,0,255, 1)'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 190,190,65,65, 3); -_assertPixelApprox(canvas, 50,25, 126,126,128,128, 3); -_assertPixelApprox(canvas, 75,25, 62,62,192,192, 3); - + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(255,255,0, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 190,190,65,65, 3); + _assertPixelApprox(canvas, 50,25, 126,126,128,128, 3); + _assertPixelApprox(canvas, 75,25, 62,62,192,192, 3); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html index adfac66d57d..9e62f3436c6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html @@ -19,17 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -canvas.width = 200; -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#ff0'); -g.addColorStop(0.5, '#0ff'); -g.addColorStop(1, '#f0f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 200, 50); -_assertPixelApprox(canvas, 50,25, 127,255,127,255, 3); -_assertPixelApprox(canvas, 100,25, 0,255,255,255, 3); -_assertPixelApprox(canvas, 150,25, 127,127,255,255, 3); - + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.5, '#0ff'); + g.addColorStop(1, '#f0f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 50,25, 127,255,127,255, 3); + _assertPixelApprox(canvas, 100,25, 0,255,255,255, 3); + _assertPixelApprox(canvas, 150,25, 127,127,255,255, 3); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html index abad0b5cb01..b46a7bed360 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.outside.html @@ -19,19 +19,18 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(25, 0, 75, 0); -g.addColorStop(0.4, '#0f0'); -g.addColorStop(0.6, '#0f0'); - -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 20,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 80,25, 0,255,0,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(25, 0, 75, 0); + g.addColorStop(0.4, '#0f0'); + g.addColorStop(0.6, '#0f0'); + + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 20,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 80,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html index ecd61728c25..099a3ea81a3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html @@ -19,33 +19,32 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -canvas.width = 200; -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0, '#ff0'); -g.addColorStop(0.25, '#00f'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#ff0'); -g.addColorStop(0.5, '#00f'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.75, '#00f'); -g.addColorStop(0.75, '#f00'); -g.addColorStop(0.75, '#ff0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.5, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 200, 50); -_assertPixelApprox(canvas, 49,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 51,25, 255,255,0,255, 16); -_assertPixelApprox(canvas, 99,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 101,25, 255,255,0,255, 16); -_assertPixelApprox(canvas, 149,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 151,25, 255,255,0,255, 16); - + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.25, '#00f'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#ff0'); + g.addColorStop(0.5, '#00f'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.75, '#00f'); + g.addColorStop(0.75, '#f00'); + g.addColorStop(0.75, '#ff0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 49,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 51,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 99,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 101,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 149,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 151,25, 255,255,0,255, 16); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html index 3b544695058..a4a2955d3bd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html @@ -19,23 +19,22 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 100, 0); -var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; -for (var p = 0; p < ps.length; ++p) -{ - g.addColorStop(ps[p], '#0f0'); - for (var i = 0; i < 15; ++i) - g.addColorStop(ps[p], '#f00'); - g.addColorStop(ps[p], '#0f0'); -} -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 30,25, 0,255,0,255); -_assertPixel(canvas, 40,25, 0,255,0,255); -_assertPixel(canvas, 60,25, 0,255,0,255); -_assertPixel(canvas, 80,25, 0,255,0,255); - + var g = ctx.createLinearGradient(0, 0, 100, 0); + var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; + for (var p = 0; p < ps.length; ++p) + { + g.addColorStop(ps[p], '#0f0'); + for (var i = 0; i < 15; ++i) + g.addColorStop(ps[p], '#f00'); + g.addColorStop(ps[p], '#0f0'); + } + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 30,25, 0,255,0,255); + _assertPixel(canvas, 40,25, 0,255,0,255); + _assertPixel(canvas, 60,25, 0,255,0,255); + _assertPixel(canvas, 80,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html index f6fa97475b1..9ac31626df4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.solid.html @@ -19,13 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html index 5297996c065..80302761d60 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html @@ -19,15 +19,14 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 0, 50); -g.addColorStop(0, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,12, 191,191,63,255, 10); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 5); -_assertPixelApprox(canvas, 50,37, 63,63,191,255, 10); - + var g = ctx.createLinearGradient(0, 0, 0, 50); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,12, 191,191,63,255, 10); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 5); + _assertPixelApprox(canvas, 50,37, 63,63,191,255, 10); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html index 8c6b944cfff..7a8892db115 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html @@ -19,17 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.rect(0, 0, 100, 50); -ctx.fill(); -_assertPixel(canvas, 40,20, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.rect(0, 0, 100, 50); + ctx.fill(); + _assertPixel(canvas, 40,20, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html index 3a7fe18a347..7696cefdd0b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html @@ -19,16 +19,15 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 40,20, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 40,20, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html index 619dc843e82..98ef6c3425a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillText.html @@ -19,17 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.font = '100px sans-serif'; -ctx.fillText("AA", 0, 50); -_assertGreen(ctx, 100, 50); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.font = '100px sans-serif'; + ctx.fillText("AA", 0, 50); + _assertGreen(ctx, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html index e5fb6482027..283e3874ad1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.strokeStyle = g; -ctx.rect(20, 20, 60, 10); -ctx.stroke(); -_assertPixel(canvas, 19,19, 0,255,0,255); -_assertPixel(canvas, 20,19, 0,255,0,255); -_assertPixel(canvas, 21,19, 0,255,0,255); -_assertPixel(canvas, 19,20, 0,255,0,255); -_assertPixel(canvas, 20,20, 0,255,0,255); -_assertPixel(canvas, 21,20, 0,255,0,255); -_assertPixel(canvas, 19,21, 0,255,0,255); -_assertPixel(canvas, 20,21, 0,255,0,255); -_assertPixel(canvas, 21,21, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.rect(20, 20, 60, 10); + ctx.stroke(); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html index 54f49233b75..7d243ecbc48 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html @@ -19,24 +19,23 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.strokeStyle = g; -ctx.strokeRect(20, 20, 60, 10); -_assertPixel(canvas, 19,19, 0,255,0,255); -_assertPixel(canvas, 20,19, 0,255,0,255); -_assertPixel(canvas, 21,19, 0,255,0,255); -_assertPixel(canvas, 19,20, 0,255,0,255); -_assertPixel(canvas, 20,20, 0,255,0,255); -_assertPixel(canvas, 21,20, 0,255,0,255); -_assertPixel(canvas, 19,21, 0,255,0,255); -_assertPixel(canvas, 20,21, 0,255,0,255); -_assertPixel(canvas, 21,21, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.strokeRect(20, 20, 60, 10); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html index df8553d67ec..bab7c6b6d91 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeText.html @@ -19,17 +19,16 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.strokeStyle = g; -ctx.font = '100px sans-serif'; -ctx.strokeText("AA", 0, 50); -_assertGreen(ctx, 100, 50); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.font = '100px sans-serif'; + ctx.strokeText("AA", 0, 50); + _assertGreen(ctx, 100, 50); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html index 2a7e270b341..89d00927151 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html @@ -19,30 +19,29 @@ var t = async_test("createLinearGradient() throws TypeError if arguments are not finite"); _addTest(function(canvas, ctx) { -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, NaN, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, NaN, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, NaN); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); - + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, NaN, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, NaN, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, NaN); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html index b2b1f78ffd8..0ae3220f06f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.1.html @@ -19,18 +19,17 @@ var t = async_test("Linear gradient coordinates are relative to the coordinate space at the time of filling"); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-50, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html index 49ff026226d..8f761c666fe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.2.html @@ -19,19 +19,18 @@ var t = async_test("Linear gradient coordinates are relative to the coordinate space at the time of filling"); _addTest(function(canvas, ctx) { -ctx.translate(100, 0); -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-150, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.translate(100, 0); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-150, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html index 36f5e469727..fdd1e0e9a45 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.linear.transform.3.html @@ -19,19 +19,18 @@ var t = async_test("Linear gradient transforms do not experience broken caching effects"); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.translate(-50, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html index cc20035d28c..9ff3e607c7e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.compare.html @@ -19,12 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g1 = ctx.createLinearGradient(0, 0, 100, 0); -var g2 = ctx.createLinearGradient(0, 0, 100, 0); -_assertDifferent(g1, g2, "g1", "g2"); -ctx.fillStyle = g1; -_assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1"); - + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + var g2 = ctx.createLinearGradient(0, 0, 100, 0); + _assertDifferent(g1, g2, "g1", "g2"); + ctx.fillStyle = g1; + _assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html index 3b185b4dfef..9c30d9cbac3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html @@ -19,15 +19,14 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var g = document.createElement('canvas').getContext('2d').createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = document.createElement('canvas').getContext('2d').createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html index b0d5c01cae7..95cc893671a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.current.html @@ -19,18 +19,17 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -canvas.setAttribute('style', 'color: #f00'); + canvas.setAttribute('style', 'color: #f00'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, 'currentColor'); -g.addColorStop(1, 'currentColor'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,255, 2); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'currentColor'); + g.addColorStop(1, 'currentColor'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html index 3150e9c75ae..2be7b3d6fd7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html @@ -19,22 +19,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 100, 0); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); - -var g = ctx.createRadialGradient(0, 0, 0, 100, 0, 0); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); - + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); + + var g = ctx.createRadialGradient(0, 0, 0, 100, 0, 0); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'rgb(NaN%, NaN%, NaN%)'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html index b11a1a5c88d..76aaed7115a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html @@ -19,13 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(0, 0, 100, 0); -assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(-1, '#000'); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(2, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(Infinity, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#000'); }); - + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(-1, '#000'); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(2, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#000'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html index 80af9caaa5c..c32312142d2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.return.html @@ -19,16 +19,15 @@ var t = async_test("createLinearGradient() and createRadialGradient() returns objects implementing CanvasGradient"); _addTest(function(canvas, ctx) { -window.CanvasGradient.prototype.thisImplementsCanvasGradient = true; + window.CanvasGradient.prototype.thisImplementsCanvasGradient = true; -var g1 = ctx.createLinearGradient(0, 0, 100, 0); -_assertDifferent(g1.addColorStop, undefined, "g1.addColorStop", "undefined"); -_assertSame(g1.thisImplementsCanvasGradient, true, "g1.thisImplementsCanvasGradient", "true"); - -var g2 = ctx.createRadialGradient(0, 0, 10, 0, 0, 20); -_assertDifferent(g2.addColorStop, undefined, "g2.addColorStop", "undefined"); -_assertSame(g2.thisImplementsCanvasGradient, true, "g2.thisImplementsCanvasGradient", "true"); + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + _assertDifferent(g1.addColorStop, undefined, "g1.addColorStop", "undefined"); + _assertSame(g1.thisImplementsCanvasGradient, true, "g1.thisImplementsCanvasGradient", "true"); + var g2 = ctx.createRadialGradient(0, 0, 10, 0, 0, 20); + _assertDifferent(g2.addColorStop, undefined, "g2.addColorStop", "undefined"); + _assertSame(g2.thisImplementsCanvasGradient, true, "g2.thisImplementsCanvasGradient", "true"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html index e79f8d0b2e9..37c77d2f2cb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.type.html @@ -19,9 +19,8 @@ var t = async_test("window.CanvasGradient exists and has the right properties"); _addTest(function(canvas, ctx) { -_assertDifferent(window.CanvasGradient, undefined, "window.CanvasGradient", "undefined"); -_assertDifferent(window.CanvasGradient.prototype.addColorStop, undefined, "window.CanvasGradient.prototype.addColorStop", "undefined"); - + _assertDifferent(window.CanvasGradient, undefined, "window.CanvasGradient", "undefined"); + _assertDifferent(window.CanvasGradient.prototype.addColorStop, undefined, "window.CanvasGradient.prototype.addColorStop", "undefined"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html index 6f363177e3e..ae78d0d78fa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.object.update.html @@ -19,16 +19,15 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var g = ctx.createLinearGradient(-100, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -g.addColorStop(0.1, '#0f0'); -g.addColorStop(0.9, '#0f0'); -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - + var g = ctx.createLinearGradient(-100, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + g.addColorStop(0.1, '#0f0'); + g.addColorStop(0.9, '#0f0'); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html index 4200a1e7b82..758fbcf360d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html index ab183f9030d..111cb8033d5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html index 872420b3027..a7ebc6ab48a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html index fae7ef86bad..9f270f4aed8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.front.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.front.html index ff743824962..23f4723cd31 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.front.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.front.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html index 7e95eb25b2f..15ac2bf6d71 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html @@ -19,34 +19,33 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var tol = 1; // tolerance to avoid antialiasing artifacts - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -ctx.fillStyle = '#f00'; -ctx.beginPath(); -ctx.moveTo(30+tol, 40); -ctx.lineTo(110, -20+tol); -ctx.lineTo(110, 100-tol); -ctx.fill(); - -var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); - + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(30+tol, 40); + ctx.lineTo(110, -20+tol); + ctx.lineTo(110, 100-tol); + ctx.fill(); + + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html index 7ebe7d26c59..d1f5be3d4b8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html @@ -19,34 +19,33 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var tol = 1; // tolerance to avoid antialiasing artifacts - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -ctx.fillStyle = '#0f0'; -ctx.beginPath(); -ctx.moveTo(30-tol, 40); -ctx.lineTo(110, -20-tol); -ctx.lineTo(110, 100+tol); -ctx.fill(); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); - + var tol = 1; // tolerance to avoid antialiasing artifacts + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(30-tol, 40); + ctx.lineTo(110, -20-tol); + ctx.lineTo(110, 100+tol); + ctx.fill(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.top.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.top.html index 5db91b7ff68..85c23d60be5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.top.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.cone.top.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.equal.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.equal.html index aeb4990eec6..bcb47509207 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.equal.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.equal.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside1.html index 102a31bf216..070a97e49b2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside1.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside2.html index 5b26ec5ebdd..a7b06f16aeb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside2.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside3.html index 30612d458c5..d7abedc14e9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.inside3.html @@ -19,26 +19,25 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(0.993, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(0.993, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.negative.html index ab2ecf2d2d6..d86812b68c7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.negative.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.negative.html @@ -19,10 +19,9 @@ var t = async_test("createRadialGradient() throws INDEX_SIZE_ERR if either radius is negative"); _addTest(function(canvas, ctx) { -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); }); - + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html index b60266181a0..0c16b415406 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html @@ -19,82 +19,81 @@ var t = async_test("createRadialGradient() throws TypeError if arguments are not finite"); _addTest(function(canvas, ctx) { -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, NaN, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, NaN, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, NaN, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, NaN, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, NaN); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity); }); - + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, NaN, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, NaN, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html index cb1614455e9..c928e1878ba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside1.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.outside2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside2.html index 68538496826..7bbe734468b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside2.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.outside3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside3.html index 9330fcdefa5..7705d0966f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.outside3.html @@ -19,26 +19,25 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.001, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.001, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch1.html index 3a13947d3c3..25e1c019fdd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch1.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch2.html index ca6c1b7e1f4..75a077a610d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch2.html @@ -19,27 +19,26 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); -g.addColorStop(0, '#f00'); -g.addColorStop(0.01, '#0f0'); -g.addColorStop(0.99, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + + var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); + g.addColorStop(0, '#f00'); + g.addColorStop(0.01, '#0f0'); + g.addColorStop(0.99, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch3.html index bd032a94de0..a93120c44bb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.touch3.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.1.html index 505dd698294..d0eb13c457c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.1.html @@ -19,19 +19,18 @@ var t = async_test("Radial gradient coordinates are relative to the coordinate space at the time of filling"); _addTest(function(canvas, ctx) { -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html index d8d475fc5a5..6e56c4c63bd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.2.html @@ -19,20 +19,19 @@ var t = async_test("Radial gradient coordinates are relative to the coordinate space at the time of filling"); _addTest(function(canvas, ctx) { -ctx.translate(100, 0); -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.translate(100, 0); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html index ff27cb0cc84..426021d0972 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.gradient.radial.transform.3.html @@ -19,20 +19,19 @@ var t = async_test("Radial gradient transforms do not experience broken caching effects"); _addTest(function(canvas, ctx) { -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.translate(50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html index 9b975228eaa..be69cca9973 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.animated.gif.html @@ -19,18 +19,17 @@ var t = async_test("createPattern() of an animated GIF draws the first frame"); _addTest(function(canvas, ctx) { -deferTest(); -step_timeout(function () { - var pattern = ctx.createPattern(document.getElementById('anim-gr.gif'), 'repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 50, 50); - step_timeout(t.step_func_done(function () { - ctx.fillRect(50, 0, 50, 50); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }), 250); -}, 250); - + deferTest(); + step_timeout(function () { + var pattern = ctx.createPattern(document.getElementById('anim-gr.gif'), 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + step_timeout(t.step_func_done(function () { + ctx.fillRect(50, 0, 50, 50); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 250); + }, 250); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html index f0e50d0df5f..069263adff6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.canvas.html @@ -19,30 +19,29 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -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); - -var pattern = ctx.createPattern(canvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 50,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + 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); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html index 31999965d1e..5ebffe50f62 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.image.html @@ -19,18 +19,17 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var img = document.getElementById('green.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html index 09e0a0474a1..f24899c3028 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.nocontext.html @@ -19,22 +19,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -canvas2.width = 100; -canvas2.height = 50; -var pattern = ctx.createPattern(canvas2, 'no-repeat'); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html index c07005e2016..c510063d80e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.type.html @@ -19,14 +19,13 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertDifferent(window.CanvasPattern, undefined, "window.CanvasPattern", "undefined"); + _assertDifferent(window.CanvasPattern, undefined, "window.CanvasPattern", "undefined"); -window.CanvasPattern.prototype.thisImplementsCanvasPattern = true; - -var img = document.getElementById('green.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -_assert(pattern.thisImplementsCanvasPattern, "pattern.thisImplementsCanvasPattern"); + window.CanvasPattern.prototype.thisImplementsCanvasPattern = true; + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + _assert(pattern.thisImplementsCanvasPattern, "pattern.thisImplementsCanvasPattern"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html index eba1ad50fe3..fbeb7bd7978 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html @@ -19,24 +19,23 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -canvas.width = 0; -canvas.height = 10; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 10, "canvas.height", "10"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); - -canvas.width = 10; -canvas.height = 0; -_assertSame(canvas.width, 10, "canvas.width", "10"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); - -canvas.width = 0; -canvas.height = 0; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); - + canvas.width = 0; + canvas.height = 10; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 10, "canvas.height", "10"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + + canvas.width = 10; + canvas.height = 0; + _assertSame(canvas.width, 10, "canvas.width", "10"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html index cbda7d0a2dc..f93b36ddf2a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.crosscanvas.html @@ -19,16 +19,15 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('green.png'); + var img = document.getElementById('green.png'); -var pattern = document.createElement('canvas').getContext('2d').createPattern(img, 'no-repeat'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 50,25, 0,255,0,255); + var pattern = document.createElement('canvas').getContext('2d').createPattern(img, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _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.pattern.image.broken.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken.html index 9f1bb2d036f..2cf21746ca6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.broken.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('broken.png'); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(img, 'repeat'); }); - + var img = document.getElementById('broken.png'); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(img, 'repeat'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html index 82b86241ed8..fb05cbb455b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.emptysrc.html @@ -19,10 +19,9 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('red.png'); -img.src = ""; -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.getElementById('red.png'); + img.src = ""; + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html index 91d92feab78..375c1b49c96 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.immediate.html @@ -19,14 +19,13 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -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: -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + 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: + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html index 69d039994f4..d43a0ca918b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.nosrc.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = new Image(); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = new Image(); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html index 0acd089f8eb..984bd36a74e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.reload.html @@ -19,15 +19,14 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -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: -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + 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: + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html index 6df23c0c39e..20d55436840 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.incomplete.removedsrc.html @@ -19,10 +19,9 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('red.png'); -img.removeAttribute('src'); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.getElementById('red.png'); + img.removeAttribute('src'); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html index fe2722fd88b..2af0a3ed095 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent-but-loading.html @@ -19,13 +19,12 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.createElement("img"); -img.src = "/images/no-such-image-really.png"; -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); -var img = document.createElementNS("http://www.w3.org/2000/svg", "image"); -img.src = "/images/no-such-image-really.png"; -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.createElement("img"); + img.src = "/images/no-such-image-really.png"; + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); + var img = document.createElementNS("http://www.w3.org/2000/svg", "image"); + img.src = "/images/no-such-image-really.png"; + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html index 71a31e36262..b365281179a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nonexistent.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('no-such-image-really.png'); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(img, 'repeat'); }); - + var img = document.getElementById('no-such-image-really.png'); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(img, 'repeat'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html index b1bcad566dc..710749dd547 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.nosrc.html @@ -19,11 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.createElement("img"); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); -var img = document.createElementNS("http://www.w3.org/2000/svg", "image"); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.createElement("img"); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); + var img = document.createElementNS("http://www.w3.org/2000/svg", "image"); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html index 0a9407ba55e..8ae002d6824 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.null.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_js(TypeError, function() { ctx.createPattern(null, 'repeat'); }); - + assert_throws_js(TypeError, function() { ctx.createPattern(null, 'repeat'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html index c612982e9c8..af32e63bba3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.string.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_js(TypeError, function() { ctx.createPattern('../images/red.png', 'repeat'); }); - + assert_throws_js(TypeError, function() { ctx.createPattern('../images/red.png', 'repeat'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html index 27fea1849a9..75f50c7a4a0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.undefined.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_js(TypeError, function() { ctx.createPattern(undefined, 'repeat'); }); - + assert_throws_js(TypeError, function() { ctx.createPattern(undefined, 'repeat'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html index aebf34e9578..cd12c2e8836 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zeroheight.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('red-zeroheight.svg'); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.getElementById('red-zeroheight.svg'); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html index 0e74363a15c..053b8ac6486 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.image.zerowidth.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('red-zerowidth.svg'); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.getElementById('red-zerowidth.svg'); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html index 066b30a9b83..0524351fdb1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas1.html @@ -19,26 +19,25 @@ 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); + 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); -var pattern = ctx.createPattern(canvas2, 'no-repeat'); + var pattern = ctx.createPattern(canvas2, 'no-repeat'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html index 10f9c0ab18b..6e50a5761c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.canvas2.html @@ -19,30 +19,29 @@ 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); - -var pattern = ctx.createPattern(canvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); - -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + 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); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html index 5ac850a446d..94f55c84f60 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image1.html @@ -19,21 +19,20 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('green.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -deferTest(); -img.onload = t.step_func_done(function () -{ - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - - _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); -}); -img.src = '/images/red.png'; - + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + deferTest(); + img.onload = t.step_func_done(function () + { + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _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); + }); + img.src = '/images/red.png'; }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html index 1c95aa0909b..1025d195f21 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.modify.image2.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('green.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#00f'; -ctx.fillRect(0, 0, 100, 50); -deferTest(); -img.onload = t.step_func_done(function () -{ - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - - _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); -}); -img.src = '/images/red.png'; - + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 0, 100, 50); + deferTest(); + img.onload = t.step_func_done(function () + { + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _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); + }); + img.src = '/images/red.png'; }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html index 6b0fb8c3090..036be9e0681 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html @@ -19,19 +19,18 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('green.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html index 1b1b9bb1b58..dfe2b8589e5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html @@ -19,22 +19,21 @@ 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); - -var img = document.getElementById('green.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.translate(50, 0); -ctx.fillRect(-50, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html index c483e4f64e2..dfd637211dc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html @@ -19,23 +19,22 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('green.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 50, 50); - -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); - -ctx.fillStyle = pattern; -ctx.translate(50, 0); -ctx.fillRect(-50, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + var img = document.getElementById('green.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html index 733f728ad6c..5456a543da2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html @@ -19,23 +19,22 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('red.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.translate(50, 25); -ctx.fillRect(-50, -25, 100, 50); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 50, 25); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('red.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html index a7279943d47..4df0cdfe672 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('red.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -ctx.fillStyle = pattern; -ctx.fillRect(0, -50, 100, 50); -ctx.fillRect(-100, 0, 100, 50); -ctx.fillRect(0, 50, 100, 50); -ctx.fillRect(100, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('red.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html index b45c95be1f8..f0ad70fc1e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html @@ -19,29 +19,28 @@ var t = async_test("Canvas patterns do not get flipped when painted"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var canvas2 = document.createElement('canvas'); -canvas2.width = 100; -canvas2.height = 50; -var ctx2 = canvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 25); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 25, 100, 25); - -var pattern = ctx.createPattern(canvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 25); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 25); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 25, 100, 25); + + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html index a618223b060..b45f4ab773f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html @@ -19,25 +19,24 @@ var t = async_test("Image patterns do not get flipped when painted"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('rrgg-256x256.png'); -var pattern = ctx.createPattern(img, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.save(); -ctx.translate(0, -103); -ctx.fillRect(0, 103, 100, 50); -ctx.restore(); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 25); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('rrgg-256x256.png'); + var pattern = ctx.createPattern(img, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html index 238f155b2ae..8999ac4e444 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html @@ -19,19 +19,18 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('green-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('green-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html index cfc270d379d..8dc6402d554 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html @@ -19,20 +19,19 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('rgrg-256x256.png'); -var pattern = ctx.createPattern(img, 'repeat'); -ctx.fillStyle = pattern; -ctx.translate(-128, -78); -ctx.fillRect(128, 78, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('rgrg-256x256.png'); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html index b05feec9374..9c03d02898b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html @@ -19,16 +19,15 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('ggrr-256x256.png'); -var pattern = ctx.createPattern(img, 'repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + var img = document.getElementById('ggrr-256x256.png'); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html index 223d8c02155..0dc0a865b4a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html @@ -19,19 +19,18 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('rgrg-256x256.png'); -var pattern = ctx.createPattern(img, 'repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -ctx.translate(-128, -78); -ctx.fillRect(128, 78, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + var img = document.getElementById('rgrg-256x256.png'); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html index ca140400d8f..b9391958777 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html @@ -19,20 +19,19 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('green-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat'); -ctx.fillStyle = pattern; -ctx.translate(50, 25); -ctx.fillRect(-50, -25, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('green-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html index 9f2f871c0b0..8c77908cd1b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html @@ -19,21 +19,20 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 16); - -var img = document.getElementById('green-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat-x'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 16); + + var img = document.getElementById('green-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html index 38ad51b237c..4c7fa9d4981 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('red-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat-x'); -ctx.fillStyle = pattern; -ctx.translate(0, 16); -ctx.fillRect(0, -16, 100, 50); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 16); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('red-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html index ba01bf3092d..26ee85e4d1d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html @@ -19,22 +19,21 @@ 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); -var img = document.getElementById('red-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat-x'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('red-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 16); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html index bb07aca80e1..c28ff155eba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html @@ -19,21 +19,20 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 16, 50); - -var img = document.getElementById('green-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat-y'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 16, 50); + + var img = document.getElementById('green-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html index c7ec99e720a..7f2bb163f36 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html @@ -19,25 +19,24 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); - -var img = document.getElementById('red-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat-y'); -ctx.fillStyle = pattern; -ctx.translate(48, 0); -ctx.fillRect(-48, 0, 100, 50); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 16, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 50,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + + var img = document.getElementById('red-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html index a3267d97017..7be743ec2b6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html @@ -19,22 +19,21 @@ 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); -var img = document.getElementById('red-16x16.png'); -var pattern = ctx.createPattern(img, 'repeat-y'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('red-16x16.png'); + var pattern = ctx.createPattern(img, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 16, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html index ccbef07f654..d998bbeb2fc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.case.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "Repeat"); }); - + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "Repeat"); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html index 48db7da219a..2810efe7000 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.empty.html @@ -19,18 +19,17 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var img = document.getElementById('green-1x1.png'); -var pattern = ctx.createPattern(img, ""); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 200, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var img = document.getElementById('green-1x1.png'); + var pattern = ctx.createPattern(img, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html index 7a4b264d2a8..0de121a4f5b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.null.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assert(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); - + _assert(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html index b28bf57036c..33d601d974c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "repeat\0"); }); - + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "repeat\0"); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html index ba40af07b8d..f0a7ae84884 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.undefined.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, undefined); }); - + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, undefined); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html index 5c26a41845c..cdcc7d65237 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "invalid"); }); - + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "invalid"); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html index f9b47f5be6c..11c9ec0ebb0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); }); - + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html index 1f25bbc82ad..8cd3983dc32 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.nonexistent.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('no-such-image-really.png'); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(img, 'repeat'); }); - + var img = document.getElementById('no-such-image-really.png'); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(img, 'repeat'); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html index b18611353ed..11c07e36dee 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zeroheight.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('red-zeroheight.svg'); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.getElementById('red-zeroheight.svg'); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html index 2f93d7c342a..a8b8cb1351d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.svgimage.zerowidth.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var img = document.getElementById('red-zerowidth.svg'); -_assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); - + var img = document.getElementById('red-zerowidth.svg'); + _assertSame(ctx.createPattern(img, 'repeat'), null, "ctx.createPattern(img, 'repeat')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html index 775d360e1c0..21da30581d6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.identity.html @@ -19,23 +19,22 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -canvas2.width = 100; -canvas2.height = 50; -var pattern = ctx.createPattern(canvas2, 'no-repeat'); -pattern.setTransform(new DOMMatrix()); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + pattern.setTransform(new DOMMatrix()); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html index 8650ed9a1d1..bfb22aeb142 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.infinity.html @@ -19,23 +19,22 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -canvas2.width = 100; -canvas2.height = 50; -var pattern = ctx.createPattern(canvas2, 'no-repeat'); -pattern.setTransform({a: Infinity}); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + pattern.setTransform({a: Infinity}); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html index ebd2801241c..13f0459e9f7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.pattern.transform.invalid.html @@ -19,12 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -canvas2.width = 100; -canvas2.height = 50; -var pattern = ctx.createPattern(canvas2, 'no-repeat'); -assert_throws_js(TypeError, function() { pattern.setTransform({a: 1, m11: 2}); }); - + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var pattern = ctx.createPattern(canvas2, 'no-repeat'); + assert_throws_js(TypeError, function() { pattern.setTransform({a: 1, m11: 2}); }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html index 91542e2892b..a432d74a428 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.default.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'"); - + _assertSame(ctx.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.1.html index 38d3bd74eeb..8888ae68856 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.1.html @@ -19,14 +19,13 @@ var t = async_test("Shadow color alpha components are used"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = 'rgba(255, 0, 0, 0.01)'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); - -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 4); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(255, 0, 0, 0.01)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 4); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.2.html index ae813036b8c..534d3dd16d6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.2.html @@ -19,14 +19,13 @@ var t = async_test("Shadow color alpha components are used"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = 'rgba(0, 0, 255, 0.5)'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(0, 0, 255, 0.5)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.3.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.3.html index 42cabad36a0..468228208c6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.3.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are affected by globalAlpha"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 50; -ctx.globalAlpha = 0.5; -ctx.fillRect(0, -50, 100, 50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.5; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.4.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.4.html index 96af9df0faa..2932c9dfe1c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.4.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.4.html @@ -19,16 +19,15 @@ var t = async_test("Shadows with alpha components are correctly affected by globalAlpha"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) -ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; -ctx.shadowOffsetY = 50; -ctx.globalAlpha = 0.707; -ctx.fillRect(0, -50, 100, 50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.707; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.5.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.5.html index 2f0b6838d80..ffa9ed8fde8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.5.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.alpha.5.html @@ -19,15 +19,14 @@ var t = async_test("Shadows of shapes with alpha components are drawn correctly"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html index 4d1d71c2068..b688156546c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.initial.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); - + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html index cbd68c92d0d..68f5dd41bcf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.invalid.html @@ -19,34 +19,33 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.shadowBlur = 1; -ctx.shadowBlur = -2; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = -2; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = Infinity; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = -Infinity; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = -Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = NaN; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = NaN; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = 'string'; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = 'string'; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = true; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); - -ctx.shadowBlur = 1; -ctx.shadowBlur = false; -_assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + ctx.shadowBlur = 1; + ctx.shadowBlur = true; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = false; + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html index 1e6a1a80a76..51063a6ade1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowBlur.valid.html @@ -19,18 +19,17 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.shadowBlur = 1; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 0.5; -_assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5"); + ctx.shadowBlur = 0.5; + _assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5"); -ctx.shadowBlur = 1e6; -_assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6"); - -ctx.shadowBlur = 0; -_assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + ctx.shadowBlur = 1e6; + _assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6"); + ctx.shadowBlur = 0; + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html index 5e02f3d1224..f4d0d33d6d9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.initial.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); - + _assertSame(ctx.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html index 68b82d842e4..73f835dd96c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.invalid.html @@ -19,22 +19,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = 'bogus'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = 'red bogus'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'red bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = ctx; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); - -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = undefined; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = ctx; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = undefined; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html index 84728f03089..bc86c3d6c17 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowColor.valid.html @@ -19,12 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.shadowColor = 'lime'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); - -ctx.shadowColor = 'RGBA(0,255, 0,0)'; -_assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'"); + ctx.shadowColor = 'lime'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = 'RGBA(0,255, 0,0)'; + _assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html index f15e383a067..056dd1607b3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.initial.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); -_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); - + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html index c9872cb49d1..1567edb16af 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.invalid.html @@ -19,48 +19,47 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = Infinity; -ctx.shadowOffsetY = Infinity; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = Infinity; + ctx.shadowOffsetY = Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = -Infinity; -ctx.shadowOffsetY = -Infinity; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = -Infinity; + ctx.shadowOffsetY = -Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = NaN; -ctx.shadowOffsetY = NaN; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = NaN; + ctx.shadowOffsetY = NaN; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = 'string'; -ctx.shadowOffsetY = 'string'; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = 'string'; + ctx.shadowOffsetY = 'string'; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = true; -ctx.shadowOffsetY = true; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 1, "ctx.shadowOffsetY", "1"); - -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = false; -ctx.shadowOffsetY = false; -_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); -_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = true; + ctx.shadowOffsetY = true; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 1, "ctx.shadowOffsetY", "1"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = false; + ctx.shadowOffsetY = false; + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html index dc89870e778..04fe18c3915 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.attributes.shadowOffset.valid.html @@ -19,31 +19,30 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); - -ctx.shadowOffsetX = 0.5; -ctx.shadowOffsetY = 0.25; -_assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5"); -_assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25"); - -ctx.shadowOffsetX = -0.5; -ctx.shadowOffsetY = -0.25; -_assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5"); -_assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25"); - -ctx.shadowOffsetX = 0; -ctx.shadowOffsetY = 0; -_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); -_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); - -ctx.shadowOffsetX = 1e6; -ctx.shadowOffsetY = 1e6; -_assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6"); -_assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6"); - + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + + ctx.shadowOffsetX = 0.5; + ctx.shadowOffsetY = 0.25; + _assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5"); + _assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25"); + + ctx.shadowOffsetX = -0.5; + ctx.shadowOffsetY = -0.25; + _assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5"); + _assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25"); + + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + + ctx.shadowOffsetX = 1e6; + ctx.shadowOffsetY = 1e6; + _assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6"); + _assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html index f5acaa97bed..aae0a163bb1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.high-manual.html @@ -19,13 +19,12 @@ var t = async_test("Shadows look correct for large blurs"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#ff0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 0; -ctx.shadowBlur = 100; -ctx.fillRect(-200, -200, 200, 400); - + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 0; + ctx.shadowBlur = 100; + ctx.fillRect(-200, -200, 200, 400); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html index ba594cea603..9674d6f0dba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.blur.low-manual.html @@ -19,20 +19,19 @@ var t = async_test("Shadows look correct for small blurs"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#ff0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 25; -for (var x = 0; x < 100; ++x) { - ctx.save(); - ctx.beginPath(); - ctx.rect(x, 0, 1, 50); - ctx.clip(); - ctx.shadowBlur = x; - ctx.fillRect(-200, -200, 500, 200); - ctx.restore(); -} - + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 25; + for (var x = 0; x < 100; ++x) { + ctx.save(); + ctx.beginPath(); + ctx.rect(x, 0, 1, 50); + ctx.clip(); + ctx.shadowBlur = x; + ctx.fillRect(-200, -200, 500, 200); + ctx.restore(); + } }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html index 5ad64e16fdf..222199e6463 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.alpha.html @@ -19,21 +19,20 @@ var t = async_test("Shadows are drawn correctly for partially-transparent canvases"); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -canvas2.width = 100; -canvas2.height = 50; -var ctx2 = canvas2.getContext('2d'); -ctx2.fillStyle = 'rgba(255, 0, 0, 0.5)'; -ctx2.fillRect(0, 0, 100, 50); - -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.drawImage(canvas2, 0, -50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = 'rgba(255, 0, 0, 0.5)'; + ctx2.fillRect(0, 0, 100, 50); + + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.drawImage(canvas2, 0, -50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html index fd70884d02d..e752c8f180c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.basic.html @@ -19,21 +19,20 @@ var t = async_test("Shadows are drawn for canvases"); _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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.drawImage(canvas2, 0, -50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + 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 = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.drawImage(canvas2, 0, -50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html index f18b7d7189e..7d159328a43 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.1.html @@ -19,19 +19,18 @@ var t = async_test("Shadows are not drawn for transparent canvases"); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -canvas2.width = 100; -canvas2.height = 50; -var ctx2 = canvas2.getContext('2d'); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.drawImage(canvas2, 0, -50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.drawImage(canvas2, 0, -50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html index c9590543ea3..4326d42bbe9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.canvas.transparent.2.html @@ -19,27 +19,26 @@ var t = async_test("Shadows are not drawn for transparent parts of canvases"); _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, 50, 50); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.drawImage(canvas2, 50, -50); -ctx.shadowColor = '#f00'; -ctx.drawImage(canvas2, -50, -50); - -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + var canvas2 = document.createElement('canvas'); + canvas2.width = 100; + canvas2.height = 50; + var ctx2 = canvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 50, 50); + + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.drawImage(canvas2, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(canvas2, -50, -50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.1.html index f952096bbd6..6caff8b92fe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.1.html @@ -19,23 +19,22 @@ var t = async_test("Shadows of clipped shapes are still drawn within the clipping region"); _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.beginPath(); -ctx.rect(50, 0, 50, 50); -ctx.clip(); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -ctx.restore(); - -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(50, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.2.html index 22208c5ad33..a5b05237e68 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.2.html @@ -19,23 +19,22 @@ var t = async_test("Shadows are not drawn outside the clipping region"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); - -ctx.save(); -ctx.beginPath(); -ctx.rect(0, 0, 50, 50); -ctx.clip(); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -ctx.restore(); - -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.3.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.3.html index 5af9b012adc..b7652634fb8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.clip.3.html @@ -19,24 +19,23 @@ var t = async_test("Shadows of clipped shapes are still drawn within the clipping region"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); - -ctx.save(); -ctx.beginPath(); -ctx.rect(0, 0, 50, 50); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(-50, 0, 50, 50); -ctx.restore(); - -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(-50, 0, 50, 50); + ctx.restore(); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.1.html index 28a82e65868..d64ecb49729 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.1.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are drawn using globalCompositeOperation"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.fillStyle = '#0f0'; -ctx.fillRect(-100, 0, 200, 50); - -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, 0, 200, 50); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.2.html index aeb6dc1053d..abc6b98d727 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.2.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are drawn using globalCompositeOperation"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.shadowColor = '#f00'; -ctx.shadowBlur = 1; -ctx.fillStyle = '#0f0'; -ctx.fillRect(-10, -10, 120, 70); - -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 1; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-10, -10, 120, 70); + + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.3.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.3.html index 9a0c02e110f..45eebd9eb0a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.composite.3.html @@ -19,17 +19,16 @@ var t = async_test("Areas outside shadows are drawn correctly with destination-out"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.shadowColor = '#f00'; -ctx.shadowBlur = 10; -ctx.fillStyle = '#f00'; -ctx.fillRect(200, 0, 100, 50); - -_assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 10; + ctx.fillStyle = '#f00'; + ctx.fillRect(200, 0, 100, 50); + + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.blur.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.blur.html index ffe70f1c385..7efa459c299 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.blur.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.blur.html @@ -19,13 +19,12 @@ var t = async_test("Shadows are drawn if shadowBlur is set"); _addTest(function(canvas, ctx) { -ctx.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowBlur = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html index e3adc9ae896..953ea04277c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.off.1.html @@ -19,11 +19,10 @@ var t = async_test("Shadows are not drawn when only shadowColor is set"); _addTest(function(canvas, ctx) { -ctx.shadowColor = '#f00'; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.shadowColor = '#f00'; + 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/shadows/2d.shadow.enable.off.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.off.2.html index 8dd3fc32d78..2a8cf7301dd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.off.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.off.2.html @@ -19,12 +19,11 @@ var t = async_test("Shadows are not drawn when only shadowColor is set"); _addTest(function(canvas, ctx) { -ctx.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#f00'; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + 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/shadows/2d.shadow.enable.x.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.x.html index 54fa86e1154..6eae985fd68 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.x.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.x.html @@ -19,13 +19,12 @@ var t = async_test("Shadows are drawn if shadowOffsetX is set"); _addTest(function(canvas, ctx) { -ctx.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.y.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.y.html index 7295d578be3..2025babca69 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.y.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.enable.y.html @@ -19,13 +19,12 @@ var t = async_test("Shadows are drawn if shadowOffsetY is set"); _addTest(function(canvas, ctx) { -ctx.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html index 7ae83ebe9af..65f4fdad276 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.alpha.html @@ -19,18 +19,17 @@ var t = async_test("Shadows are drawn correctly for partially-transparent gradient fills"); _addTest(function(canvas, ctx) { -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); -gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); + gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html index 233770e0d00..a7c5efe7380 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.basic.html @@ -19,18 +19,17 @@ var t = async_test("Shadows are drawn for gradient fills"); _addTest(function(canvas, ctx) { -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, '#f00'); -gradient.addColorStop(1, '#f00'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(1, '#f00'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html index 2427c7f59d5..1c11f75e809 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.1.html @@ -19,18 +19,17 @@ var t = async_test("Shadows are not drawn for transparent gradient fills"); _addTest(function(canvas, ctx) { -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, 'rgba(0,0,0,0)'); -gradient.addColorStop(1, 'rgba(0,0,0,0)'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html index e27b19cc0af..244aecab21c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.gradient.transparent.2.html @@ -19,24 +19,23 @@ var t = async_test("Shadows are not drawn for transparent parts of gradient fills"); _addTest(function(canvas, ctx) { -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, '#f00'); -gradient.addColorStop(0.499, '#f00'); -gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); -gradient.addColorStop(1, 'rgba(0,0,0,0)'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); - -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(0.499, '#f00'); + gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.alpha.html index 2c8133f6309..8d9022d61da 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.alpha.html @@ -19,14 +19,13 @@ var t = async_test("Shadows are drawn correctly for partially-transparent images"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.drawImage(document.getElementById('transparent50.png'), 0, -50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.drawImage(document.getElementById('transparent50.png'), 0, -50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.basic.html index f91b195e4c0..351e7515221 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.basic.html @@ -19,14 +19,13 @@ var t = async_test("Shadows are drawn for images"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.drawImage(document.getElementById('red.png'), 0, -50); - -_assertPixel(canvas, 50,25, 0,255,0,255); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.drawImage(document.getElementById('red.png'), 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.scale.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.scale.html index c0edc313739..cbec7ccce16 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.scale.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.scale.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are drawn correctly for scaled images"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.drawImage(document.getElementById('redtransparent.png'), 0, 0, 100, 50, -10, -50, 240, 50); - -_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.drawImage(document.getElementById('redtransparent.png'), 0, 0, 100, 50, -10, -50, 240, 50); + + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.section.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.section.html index 2ff2bf2a244..472559b736d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.section.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.section.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are not drawn for areas outside image source rectangles"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#f00'; -ctx.drawImage(document.getElementById('redtransparent.png'), 50, 0, 50, 50, 0, -50, 50, 50); - -_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#f00'; + ctx.drawImage(document.getElementById('redtransparent.png'), 50, 0, 50, 50, 0, -50, 50, 50); + + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html index c152dc2962b..768e961df0e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.1.html @@ -19,14 +19,13 @@ var t = async_test("Shadows are not drawn for transparent images"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.drawImage(document.getElementById('transparent.png'), 0, -50); - -_assertPixel(canvas, 50,25, 0,255,0,255); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.drawImage(document.getElementById('transparent.png'), 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html index 636c72d9d6b..a445b7aebe8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.image.transparent.2.html @@ -19,20 +19,19 @@ var t = async_test("Shadows are not drawn for transparent parts of images"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.drawImage(document.getElementById('redtransparent.png'), 50, -50); -ctx.shadowColor = '#f00'; -ctx.drawImage(document.getElementById('redtransparent.png'), -50, -50); - -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.drawImage(document.getElementById('redtransparent.png'), 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(document.getElementById('redtransparent.png'), -50, -50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html index 828fe89f000..0a73b07b6c2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeX.html @@ -19,15 +19,14 @@ var t = async_test("Shadows can be offset with negative x"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = -50; -ctx.fillRect(50, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = -50; + ctx.fillRect(50, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html index daf9b7eec0c..04c9620fd20 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.negativeY.html @@ -19,15 +19,14 @@ var t = async_test("Shadows can be offset with negative y"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = -25; -ctx.fillRect(0, 25, 100, 25); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = -25; + ctx.fillRect(0, 25, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html index 9d627ddfddb..12544743852 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveX.html @@ -19,15 +19,14 @@ var t = async_test("Shadows can be offset with positive x"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html index 619826342e8..fdcf25a435f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.offset.positiveY.html @@ -19,15 +19,14 @@ var t = async_test("Shadows can be offset with positive y"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 25; -ctx.fillRect(0, 0, 100, 25); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 25; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.outside.html index 331dca9246c..fcf21294889 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.outside.html @@ -19,23 +19,22 @@ var t = async_test("Shadows of shapes outside the visible area can be offset onto the visible area"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 100; -ctx.fillRect(-100, 0, 25, 50); -ctx.shadowOffsetX = -100; -ctx.fillRect(175, 0, 25, 50); -ctx.shadowOffsetX = 0; -ctx.shadowOffsetY = 100; -ctx.fillRect(25, -100, 50, 25); -ctx.shadowOffsetY = -100; -ctx.fillRect(25, 125, 50, 25); -_assertPixel(canvas, 12,25, 0,255,0,255); -_assertPixel(canvas, 87,25, 0,255,0,255); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.fillRect(-100, 0, 25, 50); + ctx.shadowOffsetX = -100; + ctx.fillRect(175, 0, 25, 50); + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 100; + ctx.fillRect(25, -100, 50, 25); + ctx.shadowOffsetY = -100; + ctx.fillRect(25, 125, 50, 25); + _assertPixel(canvas, 12,25, 0,255,0,255); + _assertPixel(canvas, 87,25, 0,255,0,255); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html index a995a4ab1f1..8e602d6c2b2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.alpha.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are drawn correctly for partially-transparent fill patterns"); _addTest(function(canvas, ctx) { -var pattern = ctx.createPattern(document.getElementById('transparent50.png'), 'repeat'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.fillStyle = pattern; -ctx.fillRect(0, -50, 100, 50); - -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - + var pattern = ctx.createPattern(document.getElementById('transparent50.png'), 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html index adb8aeaedf6..c776d6bc3bc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.basic.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are drawn for fill patterns"); _addTest(function(canvas, ctx) { -var pattern = ctx.createPattern(document.getElementById('red.png'), 'repeat'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = pattern; -ctx.fillRect(0, -50, 100, 50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + var pattern = ctx.createPattern(document.getElementById('red.png'), 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html index 37af35d44d2..c3dca30138b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.1.html @@ -19,16 +19,15 @@ var t = async_test("Shadows are not drawn for transparent fill patterns"); _addTest(function(canvas, ctx) { -var pattern = ctx.createPattern(document.getElementById('transparent.png'), 'repeat'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = pattern; -ctx.fillRect(0, -50, 100, 50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + var pattern = ctx.createPattern(document.getElementById('transparent.png'), 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html index e96e9e33a47..ecb82412be2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.pattern.transparent.2.html @@ -19,20 +19,19 @@ var t = async_test("Shadows are not drawn for transparent parts of fill patterns"); _addTest(function(canvas, ctx) { -var pattern = ctx.createPattern(document.getElementById('redtransparent.png'), 'repeat'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.fillStyle = pattern; -ctx.fillRect(0, -50, 100, 50); - -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); - + var pattern = ctx.createPattern(document.getElementById('redtransparent.png'), 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html index c5834b86dcf..6146ba7d196 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.basic.html @@ -19,21 +19,20 @@ var t = async_test("Shadows are drawn for strokes"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.moveTo(0, -25); -ctx.lineTo(100, -25); -ctx.stroke(); - -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.moveTo(0, -25); + ctx.lineTo(100, -25); + ctx.stroke(); + + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html index ff6a1c4c1df..5d6e53a6851 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.1.html @@ -19,24 +19,23 @@ var t = async_test("Shadows are not drawn for areas outside stroke caps"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.lineCap = 'butt'; -ctx.moveTo(-50, -25); -ctx.lineTo(0, -25); -ctx.moveTo(100, -25); -ctx.lineTo(150, -25); -ctx.stroke(); - -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'butt'; + ctx.moveTo(-50, -25); + ctx.lineTo(0, -25); + ctx.moveTo(100, -25); + ctx.lineTo(150, -25); + ctx.stroke(); + + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html index 40fd22a1c35..f18a9b6cc53 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.cap.2.html @@ -19,22 +19,21 @@ var t = async_test("Shadows are drawn for stroke caps"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.lineCap = 'square'; -ctx.moveTo(25, -25); -ctx.lineTo(75, -25); -ctx.stroke(); - -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'square'; + ctx.moveTo(25, -25); + ctx.lineTo(75, -25); + ctx.stroke(); + + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html index 5c7cda8e7b9..46735a918f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.1.html @@ -19,24 +19,23 @@ var t = async_test("Shadows are not drawn for areas outside stroke joins"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'bevel'; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); -ctx.stroke(); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'bevel'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html index 0ed3c90cb85..85abc24e817 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.2.html @@ -19,26 +19,25 @@ var t = async_test("Shadows are drawn for stroke joins"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'miter'; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); -ctx.stroke(); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html index ada4e159fa0..795c6137d5d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.stroke.join.3.html @@ -19,25 +19,24 @@ var t = async_test("Shadows are drawn for stroke joins respecting miter limit"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'miter'; -ctx.miterLimit = 0.1; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) -ctx.stroke(); - -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 0.1; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) + ctx.stroke(); + + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.1.html index 57450512775..abfb54e5dbf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.1.html @@ -19,15 +19,14 @@ var t = async_test("Shadows take account of transformations"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.translate(100, 100); -ctx.fillRect(-100, -150, 100, 50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.translate(100, 100); + ctx.fillRect(-100, -150, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.2.html index dc97c0672cf..736dd4efa4a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/shadows/2d.shadow.transform.2.html @@ -19,15 +19,14 @@ var t = async_test("Shadow offsets are not affected by transformations"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.rotate(Math.PI) -ctx.fillRect(-100, 0, 100, 50); - -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.rotate(Math.PI) + ctx.fillRect(-100, 0, 100, 50); + + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.default.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.default.html index 5c725d4a93c..d32f7831d05 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.default.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); - + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.invalid.html index 7c69b5ae34a..7b7f33766ae 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.invalid.html @@ -19,22 +19,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.textAlign = 'start'; -ctx.textAlign = 'bogus'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'bogus'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'start'; -ctx.textAlign = 'END'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'END'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'start'; -ctx.textAlign = 'end '; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); - -ctx.textAlign = 'start'; -ctx.textAlign = 'end\0'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'end '; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'end\0'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.valid.html index c8fb253a7b3..a568530f3bd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.align.valid.html @@ -19,21 +19,20 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.textAlign = 'start'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'end'; -_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'"); + ctx.textAlign = 'end'; + _assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'"); -ctx.textAlign = 'left'; -_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'"); + ctx.textAlign = 'left'; + _assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'"); -ctx.textAlign = 'right'; -_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'"); - -ctx.textAlign = 'center'; -_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'"); + ctx.textAlign = 'right'; + _assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'"); + ctx.textAlign = 'center'; + _assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.default.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.default.html index 8e442254f7a..08e8512c667 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.default.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); - + _assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.invalid.html index 1b31ce1be04..e527a77288d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.invalid.html @@ -19,22 +19,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.textBaseline = 'top'; -ctx.textBaseline = 'bogus'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'bogus'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'top'; -ctx.textBaseline = 'MIDDLE'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'MIDDLE'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'top'; -ctx.textBaseline = 'middle '; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); - -ctx.textBaseline = 'top'; -ctx.textBaseline = 'middle\0'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle '; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle\0'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.valid.html index 3e1cb358113..238f6ff7dc8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.baseline.valid.html @@ -19,24 +19,23 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.textBaseline = 'top'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'hanging'; -_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'"); + ctx.textBaseline = 'hanging'; + _assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'"); -ctx.textBaseline = 'middle'; -_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'"); + ctx.textBaseline = 'middle'; + _assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'"); -ctx.textBaseline = 'alphabetic'; -_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); + ctx.textBaseline = 'alphabetic'; + _assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); -ctx.textBaseline = 'ideographic'; -_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'"); - -ctx.textBaseline = 'bottom'; -_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'"); + ctx.textBaseline = 'ideographic'; + _assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'"); + ctx.textBaseline = 'bottom'; + _assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.alphabetic.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.alphabetic.html index 5bbd90f6375..0f70a475c81 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.alphabetic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.alphabetic.html @@ -26,22 +26,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'alphabetic'; - ctx.fillText('CC', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'alphabetic'; + ctx.fillText('CC', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.bottom.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.bottom.html index 311be39f4fe..706d7743af7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.bottom.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.bottom.html @@ -26,22 +26,21 @@ var t = async_test("textBaseline bottom is the bottom of the em square (not the bounding box)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'bottom'; - ctx.fillText('CC', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'bottom'; + ctx.fillText('CC', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html index 65aa7cd176e..7b3a0a9373b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.hanging.html @@ -26,22 +26,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, 12.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'hanging'; + ctx.fillText('CC', 0, 12.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html index 84f126200a9..8da9aabb942 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.ideographic.html @@ -26,22 +26,21 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 31.25); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'ideographic'; + ctx.fillText('CC', 0, 31.25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.middle.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.middle.html index a09a2f3153c..ebc821c2bbd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.middle.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.middle.html @@ -26,22 +26,21 @@ var t = async_test("textBaseline middle is the middle of the em square (not the bounding box)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'middle'; - ctx.fillText('CC', 0, 25); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'middle'; + ctx.fillText('CC', 0, 25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.top.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.top.html index b0c72c41ead..21e505ec795 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.top.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.baseline.top.html @@ -26,22 +26,21 @@ var t = async_test("textBaseline top is the top of the em square (not the bounding box)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'top'; - ctx.fillText('CC', 0, 0); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'top'; + ctx.fillText('CC', 0, 0); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.end.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.end.html index 57de14adc23..15b802f1c48 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.end.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.end.html @@ -26,18 +26,17 @@ var t = async_test("Space characters at the end of a line are collapsed (per CSS)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'right'; - ctx.fillText('EE ', 100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('EE ', 100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.other.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.other.html index e593b9769e5..3454cfb6fba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.other.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.other.html @@ -26,17 +26,16 @@ var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.space.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.space.html index 6e24007b1c9..20c5f70569d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.space.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.space.html @@ -26,17 +26,16 @@ var t = async_test("Space characters are converted to U+0020, and collapsed (per CSS)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E EE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.start.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.start.html index 5ec776e3240..c06efba5c85 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.start.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.draw.space.collapse.start.html @@ -26,17 +26,16 @@ var t = async_test("Space characters at the start of a line are collapsed (per CSS)"); _addTest(function(canvas, ctx) { -ctx.font = '50px CanvasTest'; -deferTest(); -step_timeout(t.step_func_done(function () { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText(' EE', 0, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); -}), 500); - + ctx.font = '50px CanvasTest'; + deferTest(); + step_timeout(t.step_func_done(function () { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText(' EE', 0, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }), 500); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.default.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.default.html index 135c9bd84a8..c6ac0848437 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.default.html @@ -19,8 +19,7 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); - + _assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.basic.html index 57db32b6881..70efec7743b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.basic.html @@ -19,12 +19,11 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '20px serif'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); - -ctx.font = '20PX SERIF'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20PX SERIF'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.complex.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.complex.html index cd6235ed3ec..7f11506b382 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.complex.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.complex.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; -_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'"); - + ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; + _assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.family.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.family.html index f5c24bdd503..c53bedbffcc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.family.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.family.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; -_assertSame(ctx.font, '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","', "ctx.font", "'20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, \"QuotedFont\\\\\\\\\\\\\",\"'"); - + ctx.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; + _assertSame(ctx.font, '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","', "ctx.font", "'20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, \"QuotedFont\\\\\\\\\\\\\",\"'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.invalid.html index e2735440edd..4fef0b48460 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.invalid.html @@ -19,53 +19,52 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '20px serif'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = ''; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = ''; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'bogus'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'bogus'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'inherit'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'inherit'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px {bogus}'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px {bogus}'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px initial'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px initial'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px default'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px default'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px inherit'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px inherit'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px revert'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px revert'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'var(--x)'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'var(--x)'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'var(--x, 10px serif)'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); - -ctx.font = '20px serif'; -ctx.font = '1em serif; background: green; margin: 10px'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'var(--x, 10px serif)'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '1em serif; background: green; margin: 10px'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.default.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.default.html index 65bb5549c4b..cb245f18a2f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.default.html @@ -19,11 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -var ctx2 = canvas2.getContext('2d'); -ctx2.font = '1000% serif'; -_assertSame(ctx2.font, '100px serif', "ctx2.font", "'100px serif'"); - + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.font = '1000% serif'; + _assertSame(ctx2.font, '100px serif', "ctx2.font", "'100px serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.html index 18476b3b7ad..519a1eb0b4a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.size.percentage.html @@ -19,11 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '50% serif'; -_assertSame(ctx.font, '72px serif', "ctx.font", "'72px serif'"); -canvas.setAttribute('style', 'font-size: 100px'); -_assertSame(ctx.font, '72px serif', "ctx.font", "'72px serif'"); - + ctx.font = '50% serif'; + _assertSame(ctx.font, '72px serif', "ctx.font", "'72px serif'"); + canvas.setAttribute('style', 'font-size: 100px'); + _assertSame(ctx.font, '72px serif', "ctx.font", "'72px serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.system.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.system.html index 707be4ee10c..10fa0cb36de 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.system.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.system.html @@ -19,9 +19,8 @@ var t = async_test("System fonts must be computed to explicit values"); _addTest(function(canvas, ctx) { -ctx.font = 'message-box'; -_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'"); - + ctx.font = 'message-box'; + _assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.tiny.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.tiny.html index e5215f1bc55..10c9d2a0e0a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.tiny.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.parse.tiny.html @@ -19,9 +19,8 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -ctx.font = '1px sans-serif'; -_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); - + ctx.font = '1px sans-serif'; + _assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.relative_size.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.relative_size.html index 8040d389160..97b9718b14b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.relative_size.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.font.relative_size.html @@ -19,11 +19,10 @@ var t = async_test(""); _addTest(function(canvas, ctx) { -var canvas2 = document.createElement('canvas'); -var ctx2 = canvas2.getContext('2d'); -ctx2.font = '1em sans-serif'; -_assertSame(ctx2.font, '10px sans-serif', "ctx2.font", "'10px sans-serif'"); - + var canvas2 = document.createElement('canvas'); + var ctx2 = canvas2.getContext('2d'); + ctx2.font = '1em sans-serif'; + _assertSame(ctx2.font, '10px sans-serif', "ctx2.font", "'10px sans-serif'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.measure.width.space.html b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.measure.width.space.html index 4d7ee4ef758..b6f2ef50f76 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.measure.width.space.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/text-styles/2d.text.measure.width.space.html @@ -26,22 +26,21 @@ var t = async_test("Space characters are converted to U+0020 and collapsed (per CSS)"); _addTest(function(canvas, ctx) { -deferTest(); -var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); -document.fonts.add(f); -document.fonts.ready.then(() => { - step_timeout(t.step_func_done(function () { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150"); - _assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200"); - _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150"); - _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200"); - - _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100"); - _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100"); - }), 500); -}); - + deferTest(); + var f = new FontFace("CanvasTest", "/fonts/CanvasTest.ttf"); + document.fonts.add(f); + document.fonts.ready.then(() => { + step_timeout(t.step_func_done(function () { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150"); + _assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200"); + _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150"); + _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200"); + + _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100"); + _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100"); + }), 500); + }); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html index 459e0d543f4..6814679aba8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.bitmap.html @@ -19,14 +19,13 @@ var t = async_test("save()/restore() does not affect the current bitmap"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.save(); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.restore(); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html index 6d1ab02f89d..1ce44ab147a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.clip.html @@ -19,16 +19,15 @@ var t = async_test("save()/restore() affects the clipping path"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.save(); -ctx.rect(0, 0, 1, 1); -ctx.clip(); -ctx.restore(); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 1, 1); + ctx.clip(); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html index a57274cc674..1eb8360e5f0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.fillStyle.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for fillStyle"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.fillStyle; -ctx.save(); -ctx.fillStyle = "#ff0000"; -ctx.restore(); -_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); - -// Also test that save() doesn't modify the values -ctx.fillStyle = "#ff0000"; -old = ctx.fillStyle; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.fillStyle; + ctx.save(); + ctx.fillStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + + // Also test that save() doesn't modify the values + ctx.fillStyle = "#ff0000"; + old = ctx.fillStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html index ff674ac3f6d..8cb4d171bbe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.font.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for font"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.font; -ctx.save(); -ctx.font = "25px serif"; -ctx.restore(); -_assertSame(ctx.font, old, "ctx.font", "old"); - -// Also test that save() doesn't modify the values -ctx.font = "25px serif"; -old = ctx.font; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "25px serif" -ctx.save(); -_assertSame(ctx.font, old, "ctx.font", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.font; + ctx.save(); + ctx.font = "25px serif"; + ctx.restore(); + _assertSame(ctx.font, old, "ctx.font", "old"); + + // Also test that save() doesn't modify the values + ctx.font = "25px serif"; + old = ctx.font; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "25px serif" + ctx.save(); + _assertSame(ctx.font, old, "ctx.font", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html index db48f9693eb..f3dae5ff512 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalAlpha.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for globalAlpha"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.globalAlpha; -ctx.save(); -ctx.globalAlpha = 0.5; -ctx.restore(); -_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); - -// Also test that save() doesn't modify the values -ctx.globalAlpha = 0.5; -old = ctx.globalAlpha; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.globalAlpha; + ctx.save(); + ctx.globalAlpha = 0.5; + ctx.restore(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + + // Also test that save() doesn't modify the values + ctx.globalAlpha = 0.5; + old = ctx.globalAlpha; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html index cbc4198bbdf..fed0ceec3bf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for globalCompositeOperation"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.globalCompositeOperation; -ctx.save(); -ctx.globalCompositeOperation = "copy"; -ctx.restore(); -_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); - -// Also test that save() doesn't modify the values -ctx.globalCompositeOperation = "copy"; -old = ctx.globalCompositeOperation; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "copy" -ctx.save(); -_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.globalCompositeOperation; + ctx.save(); + ctx.globalCompositeOperation = "copy"; + ctx.restore(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + + // Also test that save() doesn't modify the values + ctx.globalCompositeOperation = "copy"; + old = ctx.globalCompositeOperation; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "copy" + ctx.save(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html index fafbde6201b..90c52ce5646 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineCap.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for lineCap"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.lineCap; -ctx.save(); -ctx.lineCap = "round"; -ctx.restore(); -_assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); - -// Also test that save() doesn't modify the values -ctx.lineCap = "round"; -old = ctx.lineCap; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "round" -ctx.save(); -_assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.lineCap; + ctx.save(); + ctx.lineCap = "round"; + ctx.restore(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + + // Also test that save() doesn't modify the values + ctx.lineCap = "round"; + old = ctx.lineCap; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html index 46d3ec681da..00495d9fb64 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineJoin.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for lineJoin"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.lineJoin; -ctx.save(); -ctx.lineJoin = "round"; -ctx.restore(); -_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); - -// Also test that save() doesn't modify the values -ctx.lineJoin = "round"; -old = ctx.lineJoin; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "round" -ctx.save(); -_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.lineJoin; + ctx.save(); + ctx.lineJoin = "round"; + ctx.restore(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + + // Also test that save() doesn't modify the values + ctx.lineJoin = "round"; + old = ctx.lineJoin; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html index ac96381a7d5..0705878d0a9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.lineWidth.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for lineWidth"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.lineWidth; -ctx.save(); -ctx.lineWidth = 0.5; -ctx.restore(); -_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); - -// Also test that save() doesn't modify the values -ctx.lineWidth = 0.5; -old = ctx.lineWidth; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.lineWidth; + ctx.save(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + + // Also test that save() doesn't modify the values + ctx.lineWidth = 0.5; + old = ctx.lineWidth; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html index ab3c55eaf83..efd22075157 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.miterLimit.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for miterLimit"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.miterLimit; -ctx.save(); -ctx.miterLimit = 0.5; -ctx.restore(); -_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); - -// Also test that save() doesn't modify the values -ctx.miterLimit = 0.5; -old = ctx.miterLimit; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.miterLimit; + ctx.save(); + ctx.miterLimit = 0.5; + ctx.restore(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + + // Also test that save() doesn't modify the values + ctx.miterLimit = 0.5; + old = ctx.miterLimit; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html index a8023f1448c..5848ae560ca 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.path.html @@ -19,15 +19,14 @@ var t = async_test("save()/restore() does not affect the current path"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.save(); -ctx.rect(0, 0, 100, 50); -ctx.restore(); -ctx.fillStyle = '#0f0'; -ctx.fill(); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html index 2525271fe73..c5699b78fdb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowBlur.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for shadowBlur"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.shadowBlur; -ctx.save(); -ctx.shadowBlur = 5; -ctx.restore(); -_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowBlur = 5; -old = ctx.shadowBlur; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.shadowBlur; + ctx.save(); + ctx.shadowBlur = 5; + ctx.restore(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowBlur = 5; + old = ctx.shadowBlur; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html index 64690e3ef90..9b6a435202a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowColor.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for shadowColor"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.shadowColor; -ctx.save(); -ctx.shadowColor = "#ff0000"; -ctx.restore(); -_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowColor = "#ff0000"; -old = ctx.shadowColor; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.shadowColor; + ctx.save(); + ctx.shadowColor = "#ff0000"; + ctx.restore(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowColor = "#ff0000"; + old = ctx.shadowColor; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html index a140c3fa0c4..427a44a3735 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetX.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for shadowOffsetX"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.shadowOffsetX; -ctx.save(); -ctx.shadowOffsetX = 5; -ctx.restore(); -_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowOffsetX = 5; -old = ctx.shadowOffsetX; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetX; + ctx.save(); + ctx.shadowOffsetX = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowOffsetX = 5; + old = ctx.shadowOffsetX; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html index 8fc9b7c9079..b711445c209 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.shadowOffsetY.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for shadowOffsetY"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.shadowOffsetY; -ctx.save(); -ctx.shadowOffsetY = 5; -ctx.restore(); -_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowOffsetY = 5; -old = ctx.shadowOffsetY; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetY; + ctx.save(); + ctx.shadowOffsetY = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + + // Also test that save() doesn't modify the values + ctx.shadowOffsetY = 5; + old = ctx.shadowOffsetY; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html index 252074f41a5..122c5434738 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stack.html @@ -19,17 +19,16 @@ var t = async_test("save()/restore() can be nested as a stack"); _addTest(function(canvas, ctx) { -ctx.lineWidth = 1; -ctx.save(); -ctx.lineWidth = 2; -ctx.save(); -ctx.lineWidth = 3; -_assertSame(ctx.lineWidth, 3, "ctx.lineWidth", "3"); -ctx.restore(); -_assertSame(ctx.lineWidth, 2, "ctx.lineWidth", "2"); -ctx.restore(); -_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); - + ctx.lineWidth = 1; + ctx.save(); + ctx.lineWidth = 2; + ctx.save(); + ctx.lineWidth = 3; + _assertSame(ctx.lineWidth, 3, "ctx.lineWidth", "3"); + ctx.restore(); + _assertSame(ctx.lineWidth, 2, "ctx.lineWidth", "2"); + ctx.restore(); + _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html index 433e83c58a2..6fa591d06a0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.stackdepth.html @@ -19,18 +19,17 @@ var t = async_test("save()/restore() stack depth is not unreasonably limited"); _addTest(function(canvas, ctx) { -var limit = 512; -for (var i = 1; i < limit; ++i) -{ - ctx.save(); - ctx.lineWidth = i; -} -for (var i = limit-1; i > 0; --i) -{ - _assertSame(ctx.lineWidth, i, "ctx.lineWidth", "i"); - ctx.restore(); -} - + var limit = 512; + for (var i = 1; i < limit; ++i) + { + ctx.save(); + ctx.lineWidth = i; + } + for (var i = limit-1; i > 0; --i) + { + _assertSame(ctx.lineWidth, i, "ctx.lineWidth", "i"); + ctx.restore(); + } }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html index aeae2f8b384..9ccaac7e7aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.strokeStyle.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for strokeStyle"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.strokeStyle; -ctx.save(); -ctx.strokeStyle = "#ff0000"; -ctx.restore(); -_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); - -// Also test that save() doesn't modify the values -ctx.strokeStyle = "#ff0000"; -old = ctx.strokeStyle; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.strokeStyle; + ctx.save(); + ctx.strokeStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + + // Also test that save() doesn't modify the values + ctx.strokeStyle = "#ff0000"; + old = ctx.strokeStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html index 3bac234ac30..a86d62a8b78 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textAlign.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for textAlign"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.textAlign; -ctx.save(); -ctx.textAlign = "center"; -ctx.restore(); -_assertSame(ctx.textAlign, old, "ctx.textAlign", "old"); - -// Also test that save() doesn't modify the values -ctx.textAlign = "center"; -old = ctx.textAlign; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "center" -ctx.save(); -_assertSame(ctx.textAlign, old, "ctx.textAlign", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.textAlign; + ctx.save(); + ctx.textAlign = "center"; + ctx.restore(); + _assertSame(ctx.textAlign, old, "ctx.textAlign", "old"); + + // Also test that save() doesn't modify the values + ctx.textAlign = "center"; + old = ctx.textAlign; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "center" + ctx.save(); + _assertSame(ctx.textAlign, old, "ctx.textAlign", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html index 238ee7eba24..5cbf712fb17 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.textBaseline.html @@ -19,22 +19,21 @@ var t = async_test("save()/restore() works for textBaseline"); _addTest(function(canvas, ctx) { -// Test that restore() undoes any modifications -var old = ctx.textBaseline; -ctx.save(); -ctx.textBaseline = "bottom"; -ctx.restore(); -_assertSame(ctx.textBaseline, old, "ctx.textBaseline", "old"); - -// Also test that save() doesn't modify the values -ctx.textBaseline = "bottom"; -old = ctx.textBaseline; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "bottom" -ctx.save(); -_assertSame(ctx.textBaseline, old, "ctx.textBaseline", "old"); -ctx.restore(); - + // Test that restore() undoes any modifications + var old = ctx.textBaseline; + ctx.save(); + ctx.textBaseline = "bottom"; + ctx.restore(); + _assertSame(ctx.textBaseline, old, "ctx.textBaseline", "old"); + + // Also test that save() doesn't modify the values + ctx.textBaseline = "bottom"; + old = ctx.textBaseline; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "bottom" + ctx.save(); + _assertSame(ctx.textBaseline, old, "ctx.textBaseline", "old"); + ctx.restore(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html index 6d035ef9ea3..6edee8ae84d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.transformation.html @@ -19,15 +19,14 @@ var t = async_test("save()/restore() affects the current transformation matrix"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.save(); -ctx.translate(200, 0); -ctx.restore(); -ctx.fillStyle = '#f00'; -ctx.fillRect(-200, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.translate(200, 0); + ctx.restore(); + ctx.fillStyle = '#f00'; + ctx.fillRect(-200, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html index bbf6433e174..763f2695562 100644 --- a/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html +++ b/tests/wpt/web-platform-tests/html/canvas/element/the-canvas-state/2d.state.saverestore.underflow.html @@ -19,12 +19,11 @@ var t = async_test("restore() with an empty stack has no effect"); _addTest(function(canvas, ctx) { -for (var i = 0; i < 16; ++i) - ctx.restore(); -ctx.lineWidth = 0.5; -ctx.restore(); -_assertSame(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5"); - + for (var i = 0; i < 16; ++i) + ctx.restore(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html index 0dad0853d3c..453d5e7f331 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'clear'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js index a06cbdc206a..86407784bdf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.clear.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'clear'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html index a89736b5793..a54b09bbfc4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'copy'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js index a8fbc74c1c3..42d7ec23c2a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.copy.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'copy'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html index dc53e8b5f02..d88afa5ded5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js index fcb944543c0..96627b03ece 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-atop.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html index 73140e11df1..54223ee5fc9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js index e5d7f0b039f..525ca84f478 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-in.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html index 5f89aa29f7f..1b9b88a9188 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js index a4436be0d2f..aaaadd71851 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-out.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html index d18f9dc8641..44d6a5bb02e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js index 967e47b34d2..b13e7b1b68d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.destination-over.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'destination-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html index 9de44add683..65186a7753e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'lighter'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js index 849d4a6a6f8..e8dd516d2a5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.lighter.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'lighter'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html index cf9d5cfcbe1..2d0b6a6ab6f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js index 7601db1f5aa..f40ef449315 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-atop.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-atop'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html index 30864d65a33..28cdc267236 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js index 5b21b35564a..4f116ac6224 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-in.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-in'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html index d698540260f..25d5e0737a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js index cf5b0a9ac47..ce1bdd9f359 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-out.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-out'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html index e1e86c7979f..8e6b68621c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js index d61ebd1e56a..7f4355c483f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.source-over.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'source-over'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html index c2d1f526454..a15811a52ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.html @@ -17,31 +17,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'); - -var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'xor'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js index 1b2286a87ac..929f6f7eebb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.canvas.xor.worker.js @@ -13,31 +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 offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); -var ctx2 = offscreenCanvas2.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx2.drawImage(bitmap, 0, 0); - ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; - ctx.fillRect(0, 0, 100, 50); - ctx.globalCompositeOperation = 'xor'; - ctx.drawImage(offscreenCanvas2, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(canvas.width, canvas.height); + var ctx2 = offscreenCanvas2.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx2.drawImage(bitmap, 0, 0); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html index 842bcf19c58..f0e9989cce4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.html @@ -17,20 +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.globalCompositeOperation = 'clear'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js index 7365ecc3a7b..abae05ac241 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.clear.worker.js @@ -13,20 +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.globalCompositeOperation = 'clear'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html index 5d6afc11cf6..2471cd7edd1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.html @@ -17,20 +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.globalCompositeOperation = 'copy'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js index 3158893fc5b..dfebd98a6b7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.copy.worker.js @@ -13,20 +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.globalCompositeOperation = 'copy'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html index 93d4d70adb7..efb5e7ab6d8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.html @@ -17,20 +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.globalCompositeOperation = 'destination-atop'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js index 78b5368194d..9c8fa79c5aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-atop.worker.js @@ -13,20 +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.globalCompositeOperation = 'destination-atop'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html index d2520378e47..bc467a1d994 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.html @@ -17,20 +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.globalCompositeOperation = 'destination-in'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js index bc120261038..a98624f8248 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-in.worker.js @@ -13,20 +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.globalCompositeOperation = 'destination-in'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html index fdb1792b538..674ec3aeb81 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.html @@ -17,20 +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.globalCompositeOperation = 'destination-out'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js index ebe3a70d035..0cf915d1c77 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-out.worker.js @@ -13,20 +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.globalCompositeOperation = 'destination-out'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html index ae4cb499bca..6abd0af788e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.html @@ -17,20 +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.globalCompositeOperation = 'destination-over'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js index fb8778f0e15..b1b5eee6f4e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.destination-over.worker.js @@ -13,20 +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.globalCompositeOperation = 'destination-over'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html index 1f705f26455..00782a683e1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.html @@ -17,20 +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.globalCompositeOperation = 'lighter'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js index f6bf4c4aff4..8576d9db7c4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.lighter.worker.js @@ -13,20 +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.globalCompositeOperation = 'lighter'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html index eb5474702c7..a7dc6a3bc8a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.html @@ -17,20 +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.globalCompositeOperation = 'source-atop'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js index fec34e1bc62..fd220f52b3c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-atop.worker.js @@ -13,20 +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.globalCompositeOperation = 'source-atop'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html index cdc814fa75f..3f24076161a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.html @@ -17,20 +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.globalCompositeOperation = 'source-in'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js index b9a67cef2e8..0c61fb77945 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-in.worker.js @@ -13,20 +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.globalCompositeOperation = 'source-in'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html index 9df047f77f9..4033893b2b6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.html @@ -17,20 +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.globalCompositeOperation = 'source-out'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js index 9d2524064a7..ec57663af18 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-out.worker.js @@ -13,20 +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.globalCompositeOperation = 'source-out'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html index 522f4f996ba..5b48161c659 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.html @@ -17,20 +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.globalCompositeOperation = 'source-over'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js index 6d401c46b05..15c322ee597 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.source-over.worker.js @@ -13,20 +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.globalCompositeOperation = 'source-over'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html index dc1170db37a..0156e4a2ef2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.html @@ -17,20 +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.globalCompositeOperation = 'xor'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js index 1d89becc27b..30bae44aa99 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.clip.xor.worker.js @@ -13,20 +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.globalCompositeOperation = 'xor'; -ctx.rect(-20, -20, 10, 10); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.rect(-20, -20, 10, 10); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html index 5858e8f4b5f..75115ce7c27 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js index 137654742c1..9a9ff0ec70a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.clear.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html index 1aa9c98e9d3..4cb9c474102 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js index ba3399a2b11..8fe345da5b4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.copy.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html index 76547a1f86a..a86950c04b0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js index 677b882b011..8b862a00556 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-atop.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 128,255,128,191, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html index 8fa57869616..0415cbc7b57 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js index aa8c1ac06d5..1f580cd95aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-in.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html index 3a4da68c2cb..6c183fdedd4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js index 94ac27a00d4..d364abf8bc9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-out.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,255,32, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html index c6da28db6a7..3ace58d8d81 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js index 3bc357dce87..7ee7d94069d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.destination-over.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 109,255,146,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html index db89e5a3e8e..9c50789a526 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js index 922b5f46352..aa55199d072 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.lighter.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,128,255, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html index 44dd6f4274d..a87385b20c3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js index 1b329938588..b0ee8d8686a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-atop.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html index 64c28c0c211..bd1d09f19d3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js index 3048f849a9c..201c9bc1094 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-in.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html index 46d3e483ee7..e31cf7342f7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js index 090bbe7d226..16ed7c48bb3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-out.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 255,255,0,96, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html index 1d13b772483..f4a871aeec3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js index 7937e5be694..a1deadcdd4b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.source-over.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 219,255,36,223, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html index 73253fabcaa..91e992e267f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.html @@ -17,28 +17,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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js index 7a22f7d39f2..a77191f9f61 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.image.xor.worker.js @@ -13,28 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow75.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, 0); - _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow75.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 191,255,64,128, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html index a06565d6d8d..9bb03097fca 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js index 983a3b03e3f..c49ec7a322f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.clear.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html index aaad0b418ff..a5bcda93370 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js index 63cc6c1e90d..ee4baecbd2a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.copy.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html index be4cf393a1b..c5554ff240b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js index a09827ca88b..8829971c6b6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-atop.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html index e5ea33b5b0b..8e620e2714e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js index b06ad632668..fe9e4617179 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-in.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html index 49efe240d08..06da4d36500 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js index 3b0232e2555..05ec2fae16f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-out.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html index c1d7965cad1..e62c3fea702 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js index 99d64be5783..5c171fc282b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.destination-over.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,255,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html index 2877e14ad9c..2e09805cc14 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,255,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,255,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js index 011a19934ee..353389221da 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.lighter.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,255,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,255,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html index 9f972edabc9..dd36e0e6220 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js index 2dc6ec9b2e8..27e1c253ce0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-atop.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html index c674bbde91b..83dcc8e523f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js index 5b833ec156a..7dfdb07075c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-in.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html index 0fa403bb75c..3067c44fcdf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js index 0486939935f..82525492675 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-out.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html index 4392e60c9e5..059655334f3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js index ce8190ec0f9..1c82a95c363 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.source-over.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 255,255,0,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html index a9eb83e6a9d..822c9c70d13 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.html @@ -17,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js index 8b7edec945f..cb098ebab1a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.solid.xor.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(255, 255, 0, 1.0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html index 91ba094fe88..81d781acc75 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js index 6624bbc17d2..8f30463c417 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.clear.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'clear'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'clear'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html index 20c107bd774..ab3a97226f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,191, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,191, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js index 7fb646acd50..6b9ea9dbcfb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.copy.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,191, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,191, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html index 2bc5466d278..5e580f5a670 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,128,128,191, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,128,191, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js index f433bedf7c9..3247632e53a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-atop.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,128,128,191, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,128,191, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html index 1d1121812df..9f0ec56357d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,96, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,96, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js index a4c159aeef8..c9205230c0e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-in.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,96, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,96, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html index 17b3fecd028..a1abe3eed91 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,32, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,32, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js index cf6827fc51f..1a5409589b4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-out.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,32, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,32, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html index 04c267a8170..4f0305f27f3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,146,109,223, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,146,109,223, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js index 98a4b5b59ed..37eb785d673 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.destination-over.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-over'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,146,109,223, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,146,109,223, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html index 86d06f2485d..6a2f5df71f6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,128,191,255, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,191,255, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js index f9b419ace74..3d890affd90 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.lighter.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'lighter'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,128,191,255, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'lighter'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,128,191,255, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html index f4e79c0c240..bac035cea3e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js index db65db83666..d56ef6e2e40 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-atop.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html index 56b4e7704d5..5dd67046ed4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js index 32765c4c03e..58ad13bc5e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-in.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html index cca28c5ebcf..56b1d4ad463 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js index 3cf507bf845..62ec8959550 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-out.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,255,96, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html index a8ae30131d0..f038d44a543 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,36,219,223, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,36,219,223, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js index 35545c04d4e..494a45f848e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.source-over.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-over'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,36,219,223, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-over'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,36,219,223, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html index 638bae02ece..bbab8a086c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.html @@ -17,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js index b21d30d900c..4b65667ed81 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.transparent.xor.worker.js @@ -13,17 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'xor'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,64,191,128, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html index f10275f4075..0ff9d851dd4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.html @@ -17,18 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js index 3b86c720f5f..50f3ed0f222 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.copy.worker.js @@ -13,18 +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.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html index 8672e9e19f4..2d2f92edb5f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.html @@ -17,18 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js index 69610fc1072..9a84b0894a7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-atop.worker.js @@ -13,18 +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.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html index 0f069372ad1..5670b321a66 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.html @@ -18,18 +18,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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js index 26b287134b1..aa24ba97a60 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.destination-in.worker.js @@ -14,18 +14,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.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html index 6e1ecdd719f..58347442bde 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.html @@ -17,18 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js index 6da98654cfc..33e326d1f47 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-in.worker.js @@ -13,18 +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.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html index de16897f8c4..ea44ca4f044 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.html @@ -17,18 +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 = 'rgba(0, 255, 0, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js index 515b587b58b..1d39b364b0e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.fill.source-out.worker.js @@ -13,18 +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.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; -ctx.translate(0, 25); -ctx.fillRect(0, 50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 0, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + ctx.fillStyle = 'rgba(0, 0, 255, 0.75)'; + ctx.translate(0, 25); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html index 5f3c9a19143..a3f009532b6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js index 2faecdf0dd9..05a208efbbe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.copy.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html index 3605e446983..e46d8c0c4c8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js index 8b361e066d9..3662f862e9f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-atop.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html index c48ee8e16e3..41c1c73b021 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js index b270efc7aa4..d7cd348e786 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.destination-in.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html index af4c3b7daaa..51c92d5dbc4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js index 5fe00cf14b0..02397f02ec5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-in.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html index 4f1c3869b0d..29227f2a5ad 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js index f93185bc66c..70acee3f159 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.image.source-out.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); - _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 40, 40, 10, 10, 40, 50, 10, 10); + _assertPixelApprox(canvas, 15,15, 0,0,0,0, 5); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html index 57c499d81cc..10a9960559b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.html @@ -17,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js index bf6bdfe9431..1f285eae4c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.copy.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html index 73684800ca5..ead1299cf0d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.html @@ -17,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js index 3574add7d80..a9beb0f27ed 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-atop.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html index b41c4b749c7..0322bfe2584 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.html @@ -17,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js index 979a0849e81..e146e2e91ad 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.destination-in.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html index 99aeefbb6af..0d93a0362e6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.html @@ -17,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js index 55596f859de..cce4b54bd5f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-in.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html index 0dfd4ae0d0b..b6ab8cbda4b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.html @@ -17,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js index f0820e03fe0..501a84f7e7b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.nocontext.source-out.worker.js @@ -13,17 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -ctx.drawImage(offscreenCanvas2, 0, 0); -_assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + ctx.drawImage(offscreenCanvas2, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html index 244cc82f556..6d9a23beee1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js index 3aeddac219e..d3b6e074222 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.copy.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'copy'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'copy'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html index 3624f1baa91..e5cb1292733 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js index 86aaf9fb52a..83bd328b376 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-atop.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-atop'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-atop'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html index 21990f1ae0f..ef55aa7222f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js index 184efcd71e3..c599c3dfc6d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.destination-in.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'destination-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html index f95da543c91..98ba8bb12cf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js index 61c798b7aae..10178699f6a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-in.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-in'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-in'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html index 4eb6ba519f7..bdd17f9e084 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.html @@ -17,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js index 5827c7a1d7f..764a09416f3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.uncovered.pattern.source-out.worker.js @@ -13,29 +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 = 'rgba(0, 255, 255, 0.5)'; -ctx.fillRect(0, 0, 100, 50); -ctx.globalCompositeOperation = 'source-out'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/yellow.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillRect(0, 50, 100, 50); - _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0, 255, 255, 0.5)'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'source-out'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/yellow.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillRect(0, 50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,0,0,0, 5); + }, t_fail); + }).then(t_pass, t_fail); }); 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 50aeabd286d..cd293595fe8 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 @@ -15,21 +15,11 @@ promise_test(async t => { var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); - 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); - }); - }); + const response = await fetch('/images/green.svg'); + 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 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 a15371db39d..8293e89f247 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 @@ -11,21 +11,11 @@ promise_test(async t => { var canvas = new OffscreenCanvas(100, 50); var ctx = canvas.getContext('2d'); - 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); - }); - }); + const response = await fetch('/images/green.svg'); + 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 SVG image"); done(); 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 4941d37347f..5dfb2f3002c 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 @@ -17,21 +17,11 @@ promise_test(async t => { 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); - }); - }); + const response = await fetch('/images/red-zerowidth.svg'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + 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 a3182c9b73f..467beb4d12f 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 @@ -13,21 +13,11 @@ promise_test(async t => { 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); - }); - }); + const response = await fetch('/images/red-zerowidth.svg'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + 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/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html index af5b04170d4..8e488a5a588 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.CSSHSL.html @@ -17,29 +17,35 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var offscreenCanvas = new OffscreenCanvas(100, 50); -var ctx = offscreenCanvas.getContext('2d'); - -ctx.fillStyle = new CSSHSL(CSS.deg(180), 0.5, 0.5); -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(offscreenCanvas, 50,25, 64,191,191,255, 3); - -const color = new CSSHSL(CSS.deg(180), 1, 1); -ctx.fillStyle = color; -_assertSame(ctx.fillStyle, '#ffffff', "ctx.fillStyle", "'#ffffff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(offscreenCanvas, 50,25, 255,255,255,255); -color.l = 0.5; -ctx.fillStyle = color; -_assertSame(ctx.fillStyle, '#00ffff', "ctx.fillStyle", "'#00ffff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(offscreenCanvas, 50,25, 0,255,255,255); - -ctx.fillStyle = new CSSRGB(1, 0, 1).toHSL(); -_assertSame(ctx.fillStyle, '#ff00ff', "ctx.fillStyle", "'#ff00ff'"); -ctx.fillRect(0, 0, 100, 50); -_assertPixel(offscreenCanvas, 50,25, 255,0,255,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + ctx.fillStyle = new CSSHSL(CSS.deg(180), 0.5, 0.5); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 64,191,191,255, 3); + + const color = new CSSHSL(CSS.deg(180), 1, 1); + ctx.fillStyle = color; + _assertSame(ctx.fillStyle, '#ffffff', "ctx.fillStyle", "'#ffffff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + color.l = 0.5; + ctx.fillStyle = color; + _assertSame(ctx.fillStyle, '#00ffff', "ctx.fillStyle", "'#00ffff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,255,255); + + ctx.fillStyle = new CSSRGB(1, 0, 1).toHSL(); + _assertSame(ctx.fillStyle, '#ff00ff', "ctx.fillStyle", "'#ff00ff'"); + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,0,255,255); + + color.h = CSS.deg(120); + color.s = 1; + color.l = 0.5; + ctx.fillStyle = color; + ctx.fillRect(0, 0, 100, 50); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.html index 3a3b6a9798c..58075168e8a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.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.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); -t.done(); + _assertSame(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.js index 95ae259ca49..34a6f1276a7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.default.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.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.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.fillStyle, '#000000', "ctx.fillStyle", "'#000000'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html index 68b09d06f54..cd0b0c24376 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.html @@ -17,12 +17,12 @@ 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 = 'rgba(255,255,255,0.5)'; -_assertSame(ctx.fillStyle, 'rgba(255, 255, 255, 0.5)', "ctx.fillStyle", "'rgba(255, 255, 255, 0.5)'"); -t.done(); + ctx.fillStyle = 'rgba(255,255,255,0.5)'; + _assertSame(ctx.fillStyle, 'rgba(255, 255, 255, 0.5)', "ctx.fillStyle", "'rgba(255, 255, 255, 0.5)'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.js index de8f491ca36..7590816b327 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.halftransparent.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'); - -ctx.fillStyle = 'rgba(255,255,255,0.5)'; -_assertSame(ctx.fillStyle, 'rgba(255, 255, 255, 0.5)', "ctx.fillStyle", "'rgba(255, 255, 255, 0.5)'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(255,255,255,0.5)'; + _assertSame(ctx.fillStyle, 'rgba(255, 255, 255, 0.5)', "ctx.fillStyle", "'rgba(255, 255, 255, 0.5)'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html index 9f8566809d9..6be295ae0bb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.html @@ -17,12 +17,12 @@ 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 = 'rgba(255,255,255,0.45)'; -assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/); -t.done(); + ctx.fillStyle = 'rgba(255,255,255,0.45)'; + assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js index 3715183d55d..1c25bc2ed59 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.semitransparent.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'); - -ctx.fillStyle = 'rgba(255,255,255,0.45)'; -assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(255,255,255,0.45)'; + assert_regexp_match(ctx.fillStyle, /^rgba\(255, 255, 255, 0\.4\d+\)$/); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html index 3eca93e237f..4d8ccc0ff47 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.html @@ -17,12 +17,12 @@ 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 = '#fa0'; -_assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'"); -t.done(); + ctx.fillStyle = '#fa0'; + _assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.js index 2ada7336516..efec71ca9e9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.solid.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'); - -ctx.fillStyle = '#fa0'; -_assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#fa0'; + _assertSame(ctx.fillStyle, '#ffaa00', "ctx.fillStyle", "'#ffaa00'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html index caab8e0236d..8fe102f2b1c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.html @@ -17,12 +17,12 @@ 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 = 'rgba(0,0,0,0)'; -_assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); -t.done(); + ctx.fillStyle = 'rgba(0,0,0,0)'; + _assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.js index 57f5facf2e8..51542bad82a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.get.transparent.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'); - -ctx.fillStyle = 'rgba(0,0,0,0)'; -_assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0,0,0,0)'; + _assertSame(ctx.fillStyle, 'rgba(0, 0, 0, 0)', "ctx.fillStyle", "'rgba(0, 0, 0, 0)'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html index 260554c4bcb..a30bc4ac7c7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.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.fillStyle = 'invalid'; -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.fillStyle = '#0f0'; + ctx.fillStyle = 'invalid'; + 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/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.js index 4e4df4f810b..f2f5ccacce0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidstring.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.fillStyle = 'invalid'; -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.fillStyle = '#0f0'; + ctx.fillStyle = 'invalid'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.html index 53c0f77c8ce..23814ae87c6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.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.fillStyle = null; -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.fillStyle = '#0f0'; + ctx.fillStyle = null; + 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/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.js index 19b31206388..13e10e12540 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.invalidtype.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.fillStyle = null; -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.fillStyle = '#0f0'; + ctx.fillStyle = null; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html index d4a2466b7d3..222d7f6077a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120 100.0% 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js index 074d796caf3..74137880b72 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-1.worker.js @@ -13,15 +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.fillStyle = 'hsl(120 100.0% 50.0%)'; -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.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html index 6853ae51ea5..b2c93c1e260 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js index a4226cf8cad..3ccd75a4007 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-2.worker.js @@ -13,15 +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.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html index 62f4e48ef3c..fc8726904ce 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js index de3e3791fa7..bfaba364462 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-3.worker.js @@ -13,15 +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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html index 082ddcd75ef..71cb327c5f8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js index 2714bdf835a..afe12657bc3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-4.worker.js @@ -13,15 +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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html index 55f92e17ef8..787d5e7644b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js index ef3fe13355b..05c77b0a1dc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-5.worker.js @@ -13,15 +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.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html index 74657fca63e..8acc67f968e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js index a36af9a563a..8ff08394b7a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-6.worker.js @@ -13,15 +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.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html index 419b15f72e1..dc295d070a6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js index 10da1141aac..9d0513ffcaa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-7.worker.js @@ -13,15 +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.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html index a5acc80ef8c..50970585ca0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js index e12f96350b9..ce56342ceab 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-8.worker.js @@ -13,15 +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.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html index dc184153996..47cd157c44d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js index 51de0e0b15e..e45f55930d5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsl-9.worker.js @@ -13,15 +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.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html index 84b80615be0..2d1e46f1a94 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120 100.0% 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js index 2d7abab3be6..2a1157ed1f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-1.worker.js @@ -13,15 +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.fillStyle = 'hsl(120 100.0% 50.0%)'; -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.fillStyle = 'hsl(120 100.0% 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html index a3f2c67ab47..f5531f68e1d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js index dd66b1d079a..23cd58d1a0c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-2.worker.js @@ -13,15 +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.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120 100.0% 50.0% / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html index 5b809ba567b..fde2328c438 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js index 7ef6d8f4751..64577bc348a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-3.worker.js @@ -13,15 +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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html index 3e063664fb9..3b6e1f1347d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js index ed1dec01624..05b08f0a0c3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-4.worker.js @@ -13,15 +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.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html index 34f626a0a55..b0677c16dce 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js index 89042269ab2..51484f3aefe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-5.worker.js @@ -13,15 +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.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html index 3c1a23bf37e..809d11c4cd9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js index 645081df5e1..7b224e5c931 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-6.worker.js @@ -13,15 +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.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(120deg, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html index cc874e8fbe1..48c3c6927e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js index f42602ebc3a..ed51a5df402 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-7.worker.js @@ -13,15 +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.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(133.33333333grad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html index 75014364817..f49b313a1f1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js index 376cb94c904..c61fb1a1fcc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-8.worker.js @@ -13,15 +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.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(2.0943951024rad, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html index f759e6910bf..68c4e224a2d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js index 58f404175d0..51541b71487 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-hsla-9.worker.js @@ -13,15 +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.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(0.3333333333turn, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html index 44648751a30..c9d75ca5c60 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0, 255.0, 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255.0, 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js index 34ecf3d3186..f0a67250f15 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-1.worker.js @@ -13,15 +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.fillStyle = 'rgb(0, 255.0, 0)'; -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.fillStyle = 'rgb(0, 255.0, 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html index 328d731e491..0acc23ef950 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0, 255, 0, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js index 958d5df352e..eb6b952b4cb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-2.worker.js @@ -13,15 +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.fillStyle = 'rgb(0, 255, 0, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html index 1dc99c24c7b..85c2606c982 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0, 255, 0, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js index f82df16e9ad..9db5b7c33ef 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-3.worker.js @@ -13,15 +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.fillStyle = 'rgb(0, 255, 0, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html index 1b72c4f235d..e028260ee53 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0 255 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js index 08dba89ec81..fecb3ecb6ee 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-4.worker.js @@ -13,15 +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.fillStyle = 'rgb(0 255 0)'; -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.fillStyle = 'rgb(0 255 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html index 9044fe81a4e..51ace916b11 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0 255 0 / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js index 27ccca6c64f..03948b0c694 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-5.worker.js @@ -13,15 +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.fillStyle = 'rgb(0 255 0 / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html index 66cb90876f1..6df2f914e83 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0 255 0 / 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js index 3ff4312fcb2..5f31d9a9f49 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgb-6.worker.js @@ -13,15 +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.fillStyle = 'rgb(0 255 0 / 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html index a0d2239244a..19d726ee3b5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0, 255.0, 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255.0, 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js index ef45434cabf..24f278221e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-1.worker.js @@ -13,15 +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.fillStyle = 'rgba(0, 255.0, 0)'; -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.fillStyle = 'rgba(0, 255.0, 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html index 96dcbf61d8f..1603ae93abe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0, 255, 0, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js index e03f5252e9f..fcda86bae24 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-2.worker.js @@ -13,15 +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.fillStyle = 'rgba(0, 255, 0, 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html index f972e83696f..53ad71781af 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0, 255, 0, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js index 3bc693f212c..164f17f3d8b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-3.worker.js @@ -13,15 +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.fillStyle = 'rgba(0, 255, 0, 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html index 6825e8658af..3dc9f9c7a77 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0 255 0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js index a50cc026bb7..da512a261e6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-4.worker.js @@ -13,15 +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.fillStyle = 'rgba(0 255 0)'; -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.fillStyle = 'rgba(0 255 0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html index 7c8b19c80d4..db0e891f22c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0 255 0 / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js index e134e34b297..7f10cba4d54 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-5.worker.js @@ -13,15 +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.fillStyle = 'rgba(0 255 0 / 0.2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 0.2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html index b63b46f9d25..c4ec4622a5a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0 255 0 / 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js index 3e401de74d5..2d81992ebac 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.css-color-4-rgba-6.worker.js @@ -13,15 +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.fillStyle = 'rgba(0 255 0 / 20%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,51); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0 255 0 / 20%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,51); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html index 90d3e6037eb..90c4d4f5d7a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.html @@ -17,15 +17,14 @@ 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.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js index 9f0d0a4322a..7ee281b4431 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex3.worker.js @@ -13,15 +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.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.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/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html index d10e3a89106..8a6260fa891 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html @@ -17,15 +17,14 @@ 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.fillStyle = '#0f0f'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#0f0f'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js index fa84ca13529..53001f95800 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex4.worker.js @@ -13,15 +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.fillStyle = '#0f0f'; -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.fillStyle = '#0f0f'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html index 69394c9a831..02f698ea30f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.html @@ -17,15 +17,14 @@ 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.fillStyle = '#00fF00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#00fF00'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js index cb432b4f99e..e9420b62e19 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex6.worker.js @@ -13,15 +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.fillStyle = '#00fF00'; -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.fillStyle = '#00fF00'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html index 80abfe3265e..1563bab113b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html @@ -17,15 +17,14 @@ 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.fillStyle = '#00ff00ff'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = '#00ff00ff'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js index e114569893e..35cdc5c292b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hex8.worker.js @@ -13,15 +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.fillStyle = '#00ff00ff'; -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.fillStyle = '#00ff00ff'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html index 65e5c187474..96e6515a61d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120, 100%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js index 83d507c826c..204df1a35fb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-1.worker.js @@ -13,15 +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.fillStyle = 'hsl(120, 100%, 50%)'; -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.fillStyle = 'hsl(120, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html index fdd78ad7bea..b6f8f2bb76a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl( -240 , 100% , 50% )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl( -240 , 100% , 50% )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js index 0dfc848716e..f282d3ca1f0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-2.worker.js @@ -13,15 +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.fillStyle = 'hsl( -240 , 100% , 50% )'; -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.fillStyle = 'hsl( -240 , 100% , 50% )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html index 51692444076..5ed3b96b9bd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(360120, 100%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(360120, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js index 54dec44d38e..a4abd304a8b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-3.worker.js @@ -13,15 +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.fillStyle = 'hsl(360120, 100%, 50%)'; -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.fillStyle = 'hsl(360120, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html index 90f30ab92c3..f91edd75bf1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(-360240, 100%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(-360240, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js index 43c20668afb..19cbfd08cf8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-4.worker.js @@ -13,15 +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.fillStyle = 'hsl(-360240, 100%, 50%)'; -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.fillStyle = 'hsl(-360240, 100%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html index 7760e236fdc..c4624da0c9d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120.0, 100.0%, 50.0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120.0, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js index d4c95c10b24..49689b8274a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-5.worker.js @@ -13,15 +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.fillStyle = 'hsl(120.0, 100.0%, 50.0%)'; -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.fillStyle = 'hsl(120.0, 100.0%, 50.0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html index 795092931b7..5baa5b3b006 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(+120, +100%, +50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(+120, +100%, +50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js index f5acc2df25b..9f99d96403a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-6.worker.js @@ -13,15 +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.fillStyle = 'hsl(+120, +100%, +50%)'; -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.fillStyle = 'hsl(+120, +100%, +50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html index 1b375468baf..db43c45dc8b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120, 200%, 50%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 200%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js index cc3308d7ed6..868beda7644 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-1.worker.js @@ -13,15 +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.fillStyle = 'hsl(120, 200%, 50%)'; -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.fillStyle = 'hsl(120, 200%, 50%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html index 0133f7f50a3..a5b399a748e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120, -200%, 49.9%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 127,127,127,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, -200%, 49.9%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js index 48c23aa10aa..2f1d2d72e69 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-2.worker.js @@ -13,15 +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.fillStyle = 'hsl(120, -200%, 49.9%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 127,127,127,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, -200%, 49.9%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html index e35355c21c0..cfa6d82382f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120, 100%, 200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, 200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js index ef1ac418c9c..4c71d6d1409 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-3.worker.js @@ -13,15 +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.fillStyle = 'hsl(120, 100%, 200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, 200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html index c42b6f1f5d1..a3bfd8c22f5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsl(120, 100%, -200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, -200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js index 061685dbdef..e4477f5cb8e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsl-clamp-4.worker.js @@ -13,15 +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.fillStyle = 'hsl(120, 100%, -200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsl(120, 100%, -200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html index 0defd457ab0..67a65da730e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla(120, 100%, 50%, 0.499)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 50%, 0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js index 64a26e6ca3b..c002368227a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-1.worker.js @@ -13,15 +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.fillStyle = 'hsla(120, 100%, 50%, 0.499)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 50%, 0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html index 0498edd6da6..c63fac5dd60 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js index 6101f0e3ab7..aca5d8d9167 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-2.worker.js @@ -13,15 +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.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla( 120.0 , 100.0% , 50.0% , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html index 313ecf277cf..ebd766165d7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla(120, 200%, 50%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 200%, 50%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js index 8724efd28ab..6a29123d95b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-1.worker.js @@ -13,15 +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.fillStyle = 'hsla(120, 200%, 50%, 1)'; -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.fillStyle = 'hsla(120, 200%, 50%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html index 761471f43ae..91ec54841c6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla(120, -200%, 49.9%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 127,127,127,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, -200%, 49.9%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js index af4271c66cc..c27c9f8619c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-2.worker.js @@ -13,15 +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.fillStyle = 'hsla(120, -200%, 49.9%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 127,127,127,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, -200%, 49.9%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 127,127,127,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html index 287a23a58a2..343bf8b2e2c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla(120, 100%, 200%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js index 1e10a76dc27..64f459c23f0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-3.worker.js @@ -13,15 +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.fillStyle = 'hsla(120, 100%, 200%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 255,255,255,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 255,255,255,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html index a0e420cab28..c54d409934a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla(120, 100%, -200%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js index e746bc34729..b24163a7860 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-4.worker.js @@ -13,15 +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.fillStyle = 'hsla(120, 100%, -200%, 1)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, -200%, 1)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html index 06837197499..d068ffa9215 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla(120, 100%, 50%, 2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 50%, 2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js index 61d86a8a95f..a10af90a0f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-5.worker.js @@ -13,15 +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.fillStyle = 'hsla(120, 100%, 50%, 2)'; -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.fillStyle = 'hsla(120, 100%, 50%, 2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html index a8106395194..f8f0a78f218 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.html @@ -17,15 +17,14 @@ 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.fillStyle = 'hsla(120, 100%, 0%, -2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'hsla(120, 100%, 0%, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js index 57c0d587eee..da6cd93e2a1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.hsla-clamp-6.worker.js @@ -13,15 +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.fillStyle = 'hsla(120, 100%, 0%, -2)'; -ctx.fillRect(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.fillStyle = 'hsla(120, 100%, 0%, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html index 767768ab2f7..fc1c1af18b4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'limE'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'limE'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js index a8b8552afb5..7430608f636 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.html4.worker.js @@ -13,15 +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.fillStyle = 'limE'; -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.fillStyle = 'limE'; + 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/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html index 1a227a436a4..3edffc6d93a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js index 20fc879bc62..054568e1dee 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html index 36b95ed247a..477b318f416 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js index c2c6fc0ace0..74d6904f84a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html index d208c6296b6..e2092666c6b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js index c2f90ef320c..7e930df4007 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html index 2fba5aaf9c6..5bcc1755b04 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0 100% 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js index 6903ae94c2d..cca9d52ab1c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-4.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0 100% 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0 100% 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html index f340a52aa8c..ba465408028 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0, 100%, 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js index 8f0cfc0cba5..5c17b9eeb3f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsl-5.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50% /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html index 834a1b7b18e..a5f8f3fe9ca 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsla(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js index 45e074321e3..1ab7e713d0f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100%, 50% / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html index cd33bbf8007..bd543220d0d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsla(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js index e0d75717db7..9f1aeed5633 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsla(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0 100% 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html index fd01b7623af..e33b9415b24 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsla(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js index 4adb92bb644..c06a31941b3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-hsla-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 100% 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html index f1e1b2ab37d..8fbbc7ae513 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js index 450556b31be..a728e8d358b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html index dc22f99e3d3..adc82974889 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js index 35217d1b807..da9b95c191c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html index 434c15eccb3..4d385d56ccc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js index 28200cfdd5a..eee7fb92fd7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html index 58ed0e7318f..6b855b4357e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(0 0 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0 0 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js index 1830996c26b..2b25416de7d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-4.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(0 0 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0 0 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html index 95643739c41..13fadb9a245 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(0, 0, 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0, 0, 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js index 4591bbde34a..7932932d93a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgb-5.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(0, 0, 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(0, 0, 0 /)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html index 5ae093eae1e..5353f77b8fd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js index d9a315c98db..ef559c45f04 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0 / 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html index 036f389153a..aaa555aa050 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js index 1fc2f5d8638..7a06f832e85 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255 0 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html index 663557987aa..e8c05888519 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js index 1eadf9125b0..65ed246a392 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.css-color-4-rgba-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html index 83e1c410f5e..28a7ff47396 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js index 3807fd33112..0cb79048c51 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html index 453ec4bd5c3..0dcf0f8282f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js index 9bb7e2c33c8..d2dd1937484 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#f0'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html index c1d4e8c1e85..8e1bd9fa0f3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js index 4eaa0b0d0f5..805becb3b8a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#g00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html index 89c23a0074a..f59991d3170 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js index ceffb191b2b..1499fb7e135 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex4.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html index 4d62d09be03..9567114a13d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js index 7225544f8b7..d50daeb4c40 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex5.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html index 69dfdc723fc..b36d0c86545 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js index 2e5a93b49a9..606aa4f458f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex6.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html index 2be93ca69a8..5b38e7873f8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js index fbd4a887c5e..92ff04a5305 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex7.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#ff0000f'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html index f67758d42ed..1eda0c74a19 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js index fcc230ce9db..4508cc567c2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hex8.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html index 54e67111379..9ff3c68fe2c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js index 3b0bb9165b3..e3cbe474b25 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0%, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html index 7614b8c34d0..46fac5fd400 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js index ec906f7fa19..56c36f3688a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(z, 100%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html index 13d19ac9240..1f05e8d9442 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js index 370eba20978..491b5bdf498 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 0, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html index 9f01aa21800..dd2cec79770 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js index 9d53d26c96a..fef0f0aee2e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-4.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html index 23f38067a9f..909e230b16d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js index 98f4b1c7214..635e0bf72e3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-5.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100.%, 50%)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html index 405a0e52b24..9bb652c0763 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsl(0, 100%, 50%,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50%,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js index 87185470028..efe1aa7dedc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsl-6.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsl(0, 100%, 50%,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsl(0, 100%, 50%,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html index ae9d7986b7a..9b553c669d3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js index b6a70f2a421..757ca911fb5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0%, 100%, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html index de123411ecd..d894bc42fd7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js index 809c805352d..be2b2ddf009 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html index beab07b8624..8901a112b22 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'hsla(0, 0, 50%, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js index 4d2b53bbeba..52d3707f708 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.hsla-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'hsla(0, 0, 50%, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'hsla(0, 0, 50%, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html index 4ac286e6160..ceb6c53a839 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js index ef588934c15..6331a2dfb2f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'darkbrown'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html index 6b54c1816b9..684a6655749 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js index b66a07419c1..101646c995c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'firebrick1'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html index 05cfaa906d6..ebf508f464e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js index da51a4ab2ab..61e43e03d8e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'red blue'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html index 47aab58ada2..ba1f71b123d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js index c167c2b9556..b1efecdc57b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-4.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red"'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html index af19e193e04..a889a387af9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js index 8fe3a9b13e6..e519fff4262 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.name-5.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = '"red'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html index 300bb85ee2c..e1fb32a179f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js index 3c97d856c7a..8255f354785 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255.0, 0, 0,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html index 8bc9c079dd1..54d7daf999f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js index 7e4e27c9142..c0787e32cb3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(100%, 0, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html index 11e93a1c724..9874fc6f743 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js index 59d89f7b519..62365ac17ab 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgb-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgb(255, - 1, 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html index 3a0b3991173..fbfa4baef26 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js index efd7640594f..53063fd9b5b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-1.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(100%, 0, 0, 1)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html index 28a21805204..43cd1763c1c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js index dfdafb1a7e0..df7079284c9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-2.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1. 0)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html index d9ad0be5e50..96955226a53 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js index 1dca0eb9b14..8f45ef582f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-3.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1.)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html index db71a88e704..9334d693abf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js index dff64ba9073..47549bea5e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-4.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, '; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html index 00e7791bcbe..7b53652a945 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.html @@ -17,15 +17,14 @@ 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'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js index 80a65dcbc2d..562b9661ecf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.invalid.rgba-5.worker.js @@ -13,15 +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 = '#0f0'; -try { ctx.fillStyle = 'rgba(255, 0, 0, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + try { ctx.fillStyle = 'rgba(255, 0, 0, 1,)'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html index ce03f7b8403..c9e9e4c4130 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(-1000, 1000, -1000)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-1000, 1000, -1000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js index 48cf6a72f56..51b81c5bbae 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-1.worker.js @@ -13,15 +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.fillStyle = 'rgb(-1000, 1000, -1000)'; -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.fillStyle = 'rgb(-1000, 1000, -1000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html index e4f9260ec6b..98df8d67e4d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(-200%, 200%, -200%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-200%, 200%, -200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js index 70adec462ac..bfe9102f99d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-2.worker.js @@ -13,15 +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.fillStyle = 'rgb(-200%, 200%, -200%)'; -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.fillStyle = 'rgb(-200%, 200%, -200%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html index 73bbc00d1ed..70f5ed05f6f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js index 883328b42d7..809d2093483 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-3.worker.js @@ -13,15 +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.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)'; -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.fillStyle = 'rgb(-2147483649, 4294967298, -18446744073709551619)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html index 1bdb70d68c9..1f387998e0d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js index ca5543ac9b5..c0ec5ec9213 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-4.worker.js @@ -13,15 +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.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)'; -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.fillStyle = 'rgb(-1000000000000000000000000000000000000000, 1000000000000000000000000000000000000000, -1000000000000000000000000000000000000000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html index 880ad046e14..c2ac0b94d2d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js index 41f8799f400..ac2692ec4be 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-clamp-5.worker.js @@ -13,15 +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.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)'; -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.fillStyle = 'rgb(-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html index 9a84105dbc5..2979d7da987 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0, 255, 0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0, 255, 0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js index 39589937d55..997df7b03f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-eof.worker.js @@ -13,15 +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.fillStyle = 'rgb(0, 255, 0'; -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.fillStyle = 'rgb(0, 255, 0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html index 6cda83e0a80..67ba77f3e38 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0,255,0)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0,255,0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js index 229d6aec613..1d54b1f1890 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-num.worker.js @@ -13,15 +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.fillStyle = 'rgb(0,255,0)'; -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.fillStyle = 'rgb(0,255,0)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html index 6f7125de0ff..8fe3be55ed2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgb(0% ,100% ,0%)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgb(0% ,100% ,0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js index 4ba5c987e58..824376083e8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgb-percent.worker.js @@ -13,15 +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.fillStyle = 'rgb(0% ,100% ,0%)'; -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.fillStyle = 'rgb(0% ,100% ,0%)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html index 1cf20f7898c..af3acb95e94 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0, 255, 0, -2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js index 9ba73e22eb7..e3a5bf56eaa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-1.worker.js @@ -13,15 +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.fillStyle = 'rgba(0, 255, 0, -2)'; -ctx.fillRect(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.fillStyle = 'rgba(0, 255, 0, -2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,0,0,0); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html index c8b4844ae62..32ee9798941 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0, 255, 0, 2)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js index fd1c53a7335..612c40b6752 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-clamp-2.worker.js @@ -13,15 +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.fillStyle = 'rgba(0, 255, 0, 2)'; -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.fillStyle = 'rgba(0, 255, 0, 2)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html index d3fd3df2e4f..baa42cde181 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0, 255, 0, 1'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0, 255, 0, 1'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js index 6e51f09b5fa..73e0b4fd436 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-eof.worker.js @@ -13,15 +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.fillStyle = 'rgba(0, 255, 0, 1'; -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.fillStyle = 'rgba(0, 255, 0, 1'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html index 1ce69821ae5..eaa83e18015 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba( 0 , 255 , 0 , .499 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , .499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js index 2805af6e05c..bb1a97fbe75 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-1.worker.js @@ -13,15 +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.fillStyle = 'rgba( 0 , 255 , 0 , .499 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , .499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html index 979eff66b24..47bf3ddceda 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba( 0 , 255 , 0 , 0.499 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 0.499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js index 2ed15492407..5629ca5cb22 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-num-2.worker.js @@ -13,15 +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.fillStyle = 'rgba( 0 , 255 , 0 , 0.499 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 0.499 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html index 2c737e21c14..068befd9b43 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba(0%,100%,0%,0.499)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0%,100%,0%,0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js index 5852ea3eb1e..6d904153250 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-percent.worker.js @@ -13,15 +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.fillStyle = 'rgba(0%,100%,0%,0.499)'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,127); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba(0%,100%,0%,0.499)'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,127); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html index 701b5efc79b..0e58836e5df 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba( 0 , 255 , 0 , 1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js index 51e6d774210..cddedb7d595 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-1.worker.js @@ -13,15 +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.fillStyle = 'rgba( 0 , 255 , 0 , 1 )'; -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.fillStyle = 'rgba( 0 , 255 , 0 , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html index 7280c10dd64..8da29eeffbf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba( 0 , 255 , 0 , 1.0 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , 1.0 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js index 4dcbd72aef0..126cbb9269b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-2.worker.js @@ -13,15 +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.fillStyle = 'rgba( 0 , 255 , 0 , 1.0 )'; -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.fillStyle = 'rgba( 0 , 255 , 0 , 1.0 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html index dfbb4439736..e67374c541e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba( 0 , 255 , 0 , +1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( 0 , 255 , 0 , +1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js index 060fad9bb85..d8d1513c908 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-3.worker.js @@ -13,15 +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.fillStyle = 'rgba( 0 , 255 , 0 , +1 )'; -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.fillStyle = 'rgba( 0 , 255 , 0 , +1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html index 131396c8d09..777aacea70f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.html @@ -17,15 +17,14 @@ 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.fillStyle = 'rgba( -0 , 255 , +0 , 1 )'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'rgba( -0 , 255 , +0 , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js index 43a8cf82516..aa516a2d7f0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.rgba-solid-4.worker.js @@ -13,15 +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.fillStyle = 'rgba( -0 , 255 , +0 , 1 )'; -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.fillStyle = 'rgba( -0 , 255 , +0 , 1 )'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html index ffcc525b486..8dc6844ae9f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'gray'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 128,128,128,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'gray'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js index 86b4f8175da..e8660caf6d6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-1.worker.js @@ -13,15 +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.fillStyle = 'gray'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 128,128,128,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'gray'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html index eafecd0e6da..28335650067 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'grey'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 128,128,128,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'grey'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js index 3aa530508e1..3488200d868 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.svg-2.worker.js @@ -13,15 +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.fillStyle = 'grey'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 128,128,128,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'grey'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 128,128,128,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html index 65a84a78ecd..6e124062b1e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.html @@ -17,14 +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.fillStyle = '#f00'; -ctx.fillStyle = 'ThreeDDarkShadow'; -assert_regexp_match(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/); // test that it's not red -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'ThreeDDarkShadow'; + assert_regexp_match(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/); // test that it's not red + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js index 8e211458234..cf62855af9d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.system.worker.js @@ -13,14 +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 = '#f00'; -ctx.fillStyle = 'ThreeDDarkShadow'; -assert_regexp_match(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/); // test that it's not red -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'ThreeDDarkShadow'; + assert_regexp_match(ctx.fillStyle, /^#(?!(FF0000|ff0000|f00)$)/); // test that it's not red + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html index 98da0c29cde..a595d70bc06 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.html @@ -17,15 +17,14 @@ 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.fillStyle = 'transparent'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'transparent'; + ctx.fillRect(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/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js index a934b66c8c5..7f9a975bc10 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-1.worker.js @@ -13,15 +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.fillStyle = 'transparent'; -ctx.fillRect(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.fillStyle = 'transparent'; + ctx.fillRect(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/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html index cfebe8fc1da..0f2a7e06092 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.html @@ -17,15 +17,14 @@ 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.fillStyle = 'TrAnSpArEnT'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,0,0,0); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillStyle = 'TrAnSpArEnT'; + ctx.fillRect(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/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js index e577bf55dd6..794ca926dde 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.parse.transparent-2.worker.js @@ -13,15 +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.fillStyle = 'TrAnSpArEnT'; -ctx.fillRect(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.fillStyle = 'TrAnSpArEnT'; + ctx.fillRect(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/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html index 70eb6b1a261..3e56bd2b627 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.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 = { toString: function() { return "#008000"; } }; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -ctx.fillStyle = {}; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -ctx.fillStyle = 800000; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -assert_throws_js(TypeError, function() { ctx.fillStyle = { toString: function() { throw new TypeError; } }; }); -ctx.strokeStyle = { toString: function() { return "#008000"; } }; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -ctx.strokeStyle = {}; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -ctx.strokeStyle = 800000; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -assert_throws_js(TypeError, function() { ctx.strokeStyle = { toString: function() { throw new TypeError; } }; }); -t.done(); + ctx.fillStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = {}; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = 800000; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.fillStyle = { toString: function() { throw new TypeError; } }; }); + ctx.strokeStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = {}; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = 800000; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.strokeStyle = { toString: function() { throw new TypeError; } }; }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.js index 68ae0a5da2c..3ae93092b85 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.fillStyle.toStringFunctionCallback.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 = { toString: function() { return "#008000"; } }; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -ctx.fillStyle = {}; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -ctx.fillStyle = 800000; -_assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); -assert_throws_js(TypeError, function() { ctx.fillStyle = { toString: function() { throw new TypeError; } }; }); -ctx.strokeStyle = { toString: function() { return "#008000"; } }; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -ctx.strokeStyle = {}; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -ctx.strokeStyle = 800000; -_assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); -assert_throws_js(TypeError, function() { ctx.strokeStyle = { toString: function() { throw new TypeError; } }; }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = {}; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + ctx.fillStyle = 800000; + _assertSame(ctx.fillStyle, "#008000", "ctx.fillStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.fillStyle = { toString: function() { throw new TypeError; } }; }); + ctx.strokeStyle = { toString: function() { return "#008000"; } }; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = {}; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + ctx.strokeStyle = 800000; + _assertSame(ctx.strokeStyle, "#008000", "ctx.strokeStyle", "\"#008000\""); + assert_throws_js(TypeError, function() { ctx.strokeStyle = { toString: function() { throw new TypeError; } }; }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html index 3d1f21ec052..5ccb19e09cd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.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'); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(-Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(NaN, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, -Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, NaN, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, NaN); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(-Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, Infinity); }); -const g = ctx.createConicGradient(0, 0, 25); -assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#f00'); }); -assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#f00'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, -Infinity); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, NaN); }); -t.done(); + const g = ctx.createConicGradient(0, 0, 25); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#f00'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#f00'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, -Infinity); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, NaN); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.js index b6bd62cbb70..19b603ea750 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.invalid.inputs.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'); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(-Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(NaN, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, -Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, NaN, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, NaN); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, Infinity); }); - -const g = ctx.createConicGradient(0, 0, 25); -assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#f00'); }); -assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#f00'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, -Infinity); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, NaN); }); -t.done(); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(-Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createConicGradient(0, Infinity, Infinity); }); + const g = ctx.createConicGradient(0, 0, 25); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#f00'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#f00'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, -Infinity); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, NaN); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html index dde54400e28..848f1496eac 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.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'); -const g = ctx.createConicGradient(-Math.PI/2, 50, 25); -// It's red in the upper right region and green on the lower left region -g.addColorStop(0, "#f00"); -g.addColorStop(0.25, "#0f0"); -g.addColorStop(0.50, "#0f0"); -g.addColorStop(0.75, "#f00"); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); -_assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); -t.done(); + const g = ctx.createConicGradient(-Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.js index 68589cfab51..1f9735ee088 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.negative.rotation.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'); - -const g = ctx.createConicGradient(-Math.PI/2, 50, 25); -// It's red in the upper right region and green on the lower left region -g.addColorStop(0, "#f00"); -g.addColorStop(0.25, "#0f0"); -g.addColorStop(0.50, "#0f0"); -g.addColorStop(0.75, "#f00"); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); -_assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + const g = ctx.createConicGradient(-Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html index 42d5a87af49..06b593904fd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.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'); -const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); -// It's red in the upper right region and green on the lower left region -g.addColorStop(0, "#f00"); -g.addColorStop(0.25, "#0f0"); -g.addColorStop(0.50, "#0f0"); -g.addColorStop(0.75, "#f00"); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); -_assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); -t.done(); + const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.js index cece603ddb9..45bbf403136 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.positive.rotation.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'); - -const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); -// It's red in the upper right region and green on the lower left region -g.addColorStop(0, "#f00"); -g.addColorStop(0.25, "#0f0"); -g.addColorStop(0.50, "#0f0"); -g.addColorStop(0.75, "#f00"); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); -_assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + const g = ctx.createConicGradient(3*Math.PI/2, 50, 25); + // It's red in the upper right region and green on the lower left region + g.addColorStop(0, "#f00"); + g.addColorStop(0.25, "#0f0"); + g.addColorStop(0.50, "#0f0"); + g.addColorStop(0.75, "#f00"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,15, 255,0,0,255, 3); + _assertPixelApprox(canvas, 75,40, 0,255,0,255, 3); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html index 93229d93f5d..bad1ff47673 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.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); -var g = ctx.createLinearGradient(0, 0, 0, 50); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 0, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js index 207a1b0cabd..225de258235 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.empty.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.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); -var g = ctx.createLinearGradient(0, 0, 0, 50); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 0, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html index 52c11fcbfd7..525cb79e03c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.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 = '#ff0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, 'rgba(0,0,255, 0)'); -g.addColorStop(1, 'rgba(0,0,255, 1)'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); -_assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); -t.done(); + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(0,0,255, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.js index d9f08a9bede..5c2f7e07b6a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.alpha.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 = '#ff0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, 'rgba(0,0,255, 0)'); -g.addColorStop(1, 'rgba(0,0,255, 1)'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); -_assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#ff0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(0,0,255, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.html index 8f327817601..c742eff2f9c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.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'); -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); -_assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); -t.done(); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.js index fcf1f84f37c..6d273b7b43a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.color.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 g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); -_assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 191,191,63,255, 3); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 3); + _assertPixelApprox(canvas, 75,25, 63,63,191,255, 3); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html index 0e7d3b5577b..00575c399a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.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'); -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, 'rgba(255,255,0, 0)'); -g.addColorStop(1, 'rgba(0,0,255, 1)'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 190,190,65,65, 3); -_assertPixelApprox(canvas, 50,25, 126,126,128,128, 3); -_assertPixelApprox(canvas, 75,25, 62,62,192,192, 3); -t.done(); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(255,255,0, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 190,190,65,65, 3); + _assertPixelApprox(canvas, 50,25, 126,126,128,128, 3); + _assertPixelApprox(canvas, 75,25, 62,62,192,192, 3); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.js index cc1cc9f2191..1462cb59e25 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.coloralpha.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 g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, 'rgba(255,255,0, 0)'); -g.addColorStop(1, 'rgba(0,0,255, 1)'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 25,25, 190,190,65,65, 3); -_assertPixelApprox(canvas, 50,25, 126,126,128,128, 3); -_assertPixelApprox(canvas, 75,25, 62,62,192,192, 3); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, 'rgba(255,255,0, 0)'); + g.addColorStop(1, 'rgba(0,0,255, 1)'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 25,25, 190,190,65,65, 3); + _assertPixelApprox(canvas, 50,25, 126,126,128,128, 3); + _assertPixelApprox(canvas, 75,25, 62,62,192,192, 3); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html index 724ae5c0939..3f2594f2cb1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.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'); -canvas.width = 200; -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#ff0'); -g.addColorStop(0.5, '#0ff'); -g.addColorStop(1, '#f0f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 200, 50); -_assertPixelApprox(canvas, 50,25, 127,255,127,255, 3); -_assertPixelApprox(canvas, 100,25, 0,255,255,255, 3); -_assertPixelApprox(canvas, 150,25, 127,127,255,255, 3); -t.done(); + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.5, '#0ff'); + g.addColorStop(1, '#f0f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 50,25, 127,255,127,255, 3); + _assertPixelApprox(canvas, 100,25, 0,255,255,255, 3); + _assertPixelApprox(canvas, 150,25, 127,127,255,255, 3); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.js index ff3687c1a98..ebfcddca9f0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.multiple.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.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'); - -canvas.width = 200; -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#ff0'); -g.addColorStop(0.5, '#0ff'); -g.addColorStop(1, '#f0f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 200, 50); -_assertPixelApprox(canvas, 50,25, 127,255,127,255, 3); -_assertPixelApprox(canvas, 100,25, 0,255,255,255, 3); -_assertPixelApprox(canvas, 150,25, 127,127,255,255, 3); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.5, '#0ff'); + g.addColorStop(1, '#f0f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 50,25, 127,255,127,255, 3); + _assertPixelApprox(canvas, 100,25, 0,255,255,255, 3); + _assertPixelApprox(canvas, 150,25, 127,127,255,255, 3); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.html index 0ef97af879a..0dda6c0c235 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.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); -var g = ctx.createLinearGradient(25, 0, 75, 0); -g.addColorStop(0.4, '#0f0'); -g.addColorStop(0.6, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 20,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 80,25, 0,255,0,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(25, 0, 75, 0); + g.addColorStop(0.4, '#0f0'); + g.addColorStop(0.6, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 20,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 80,25, 0,255,0,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.js index 60d10a59d8a..66fc180e7e9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.outside.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); -var g = ctx.createLinearGradient(25, 0, 75, 0); -g.addColorStop(0.4, '#0f0'); -g.addColorStop(0.6, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 20,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -_assertPixelApprox(canvas, 80,25, 0,255,0,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(25, 0, 75, 0); + g.addColorStop(0.4, '#0f0'); + g.addColorStop(0.6, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 20,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 80,25, 0,255,0,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html index 77eb328ecf1..0139da177aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.html @@ -17,36 +17,36 @@ 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'); -canvas.width = 200; -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0, '#ff0'); -g.addColorStop(0.25, '#00f'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#ff0'); -g.addColorStop(0.5, '#00f'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.75, '#00f'); -g.addColorStop(0.75, '#f00'); -g.addColorStop(0.75, '#ff0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.5, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 200, 50); -_assertPixelApprox(canvas, 49,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 51,25, 255,255,0,255, 16); -_assertPixelApprox(canvas, 99,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 101,25, 255,255,0,255, 16); -_assertPixelApprox(canvas, 149,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 151,25, 255,255,0,255, 16); -t.done(); + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.25, '#00f'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#ff0'); + g.addColorStop(0.5, '#00f'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.75, '#00f'); + g.addColorStop(0.75, '#f00'); + g.addColorStop(0.75, '#ff0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 49,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 51,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 99,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 101,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 149,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 151,25, 255,255,0,255, 16); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.js index e11c85f8d81..d404deab266 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap.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'); - -canvas.width = 200; -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0, '#ff0'); -g.addColorStop(0.25, '#00f'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.25, '#ff0'); -g.addColorStop(0.5, '#00f'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.75, '#00f'); -g.addColorStop(0.75, '#f00'); -g.addColorStop(0.75, '#ff0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.5, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 200, 50); -_assertPixelApprox(canvas, 49,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 51,25, 255,255,0,255, 16); -_assertPixelApprox(canvas, 99,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 101,25, 255,255,0,255, 16); -_assertPixelApprox(canvas, 149,25, 0,0,255,255, 16); -_assertPixelApprox(canvas, 151,25, 255,255,0,255, 16); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 200; + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0, '#ff0'); + g.addColorStop(0.25, '#00f'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.25, '#ff0'); + g.addColorStop(0.5, '#00f'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.75, '#00f'); + g.addColorStop(0.75, '#f00'); + g.addColorStop(0.75, '#ff0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.5, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 200, 50); + _assertPixelApprox(canvas, 49,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 51,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 99,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 101,25, 255,255,0,255, 16); + _assertPixelApprox(canvas, 149,25, 0,0,255,255, 16); + _assertPixelApprox(canvas, 151,25, 255,255,0,255, 16); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html index 662913b13f9..c26c8ecb782 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.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'); -var g = ctx.createLinearGradient(0, 0, 100, 0); -var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; -for (var p = 0; p < ps.length; ++p) -{ - g.addColorStop(ps[p], '#0f0'); - for (var i = 0; i < 15; ++i) - g.addColorStop(ps[p], '#f00'); - g.addColorStop(ps[p], '#0f0'); -} -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 30,25, 0,255,0,255); -_assertPixel(canvas, 40,25, 0,255,0,255); -_assertPixel(canvas, 60,25, 0,255,0,255); -_assertPixel(canvas, 80,25, 0,255,0,255); -t.done(); + var g = ctx.createLinearGradient(0, 0, 100, 0); + var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; + for (var p = 0; p < ps.length; ++p) + { + g.addColorStop(ps[p], '#0f0'); + for (var i = 0; i < 15; ++i) + g.addColorStop(ps[p], '#f00'); + g.addColorStop(ps[p], '#0f0'); + } + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 30,25, 0,255,0,255); + _assertPixel(canvas, 40,25, 0,255,0,255); + _assertPixel(canvas, 60,25, 0,255,0,255); + _assertPixel(canvas, 80,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.js index a6329af99ac..3938081cef7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.overlap2.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 g = ctx.createLinearGradient(0, 0, 100, 0); -var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; -for (var p = 0; p < ps.length; ++p) -{ - g.addColorStop(ps[p], '#0f0'); - for (var i = 0; i < 15; ++i) - g.addColorStop(ps[p], '#f00'); - g.addColorStop(ps[p], '#0f0'); -} -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 30,25, 0,255,0,255); -_assertPixel(canvas, 40,25, 0,255,0,255); -_assertPixel(canvas, 60,25, 0,255,0,255); -_assertPixel(canvas, 80,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 100, 0); + var ps = [ 0, 1/10, 1/4, 1/3, 1/2, 3/4, 1 ]; + for (var p = 0; p < ps.length; ++p) + { + g.addColorStop(ps[p], '#0f0'); + for (var i = 0; i < 15; ++i) + g.addColorStop(ps[p], '#f00'); + g.addColorStop(ps[p], '#0f0'); + } + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 30,25, 0,255,0,255); + _assertPixel(canvas, 40,25, 0,255,0,255); + _assertPixel(canvas, 60,25, 0,255,0,255); + _assertPixel(canvas, 80,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html index aa488d94120..dd369ae5e3f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.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'); -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.js index 8cc4a88d98e..387aab0ab78 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.solid.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 g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html index 15c4c7c39ef..dff5708f053 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.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'); -var g = ctx.createLinearGradient(0, 0, 0, 50); -g.addColorStop(0, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,12, 191,191,63,255, 10); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 5); -_assertPixelApprox(canvas, 50,37, 63,63,191,255, 10); -t.done(); + var g = ctx.createLinearGradient(0, 0, 0, 50); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,12, 191,191,63,255, 10); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 5); + _assertPixelApprox(canvas, 50,37, 63,63,191,255, 10); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.js index a25692cf42f..61cf9b6d8e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.vertical.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 g = ctx.createLinearGradient(0, 0, 0, 50); -g.addColorStop(0, '#ff0'); -g.addColorStop(1, '#00f'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,12, 191,191,63,255, 10); -_assertPixelApprox(canvas, 50,25, 127,127,127,255, 5); -_assertPixelApprox(canvas, 50,37, 63,63,191,255, 10); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 0, 50); + g.addColorStop(0, '#ff0'); + g.addColorStop(1, '#00f'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,12, 191,191,63,255, 10); + _assertPixelApprox(canvas, 50,25, 127,127,127,255, 5); + _assertPixelApprox(canvas, 50,37, 63,63,191,255, 10); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html index b679d5b83d6..71d5cb85dd6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.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); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.rect(0, 0, 100, 50); -ctx.fill(); -_assertPixel(canvas, 40,20, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.rect(0, 0, 100, 50); + ctx.fill(); + _assertPixel(canvas, 40,20, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.js index 71df9674ce7..3b86cec3afc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fill.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); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.rect(0, 0, 100, 50); -ctx.fill(); -_assertPixel(canvas, 40,20, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.rect(0, 0, 100, 50); + ctx.fill(); + _assertPixel(canvas, 40,20, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html index 9576f2a99e5..1b3851cd99a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.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); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 40,20, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 40,20, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.js index b6dfbf081c8..f6ab1d93487 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.fillRect.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); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 40,20, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 40,20, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html index 81a5e4e35da..3b66f6c12ad 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.html @@ -17,27 +17,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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.strokeStyle = g; -ctx.rect(20, 20, 60, 10); -ctx.stroke(); -_assertPixel(canvas, 19,19, 0,255,0,255); -_assertPixel(canvas, 20,19, 0,255,0,255); -_assertPixel(canvas, 21,19, 0,255,0,255); -_assertPixel(canvas, 19,20, 0,255,0,255); -_assertPixel(canvas, 20,20, 0,255,0,255); -_assertPixel(canvas, 21,20, 0,255,0,255); -_assertPixel(canvas, 19,21, 0,255,0,255); -_assertPixel(canvas, 20,21, 0,255,0,255); -_assertPixel(canvas, 21,21, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.rect(20, 20, 60, 10); + ctx.stroke(); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.js index c8744645a02..7e215017485 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.stroke.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); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.strokeStyle = g; -ctx.rect(20, 20, 60, 10); -ctx.stroke(); -_assertPixel(canvas, 19,19, 0,255,0,255); -_assertPixel(canvas, 20,19, 0,255,0,255); -_assertPixel(canvas, 21,19, 0,255,0,255); -_assertPixel(canvas, 19,20, 0,255,0,255); -_assertPixel(canvas, 20,20, 0,255,0,255); -_assertPixel(canvas, 21,20, 0,255,0,255); -_assertPixel(canvas, 19,21, 0,255,0,255); -_assertPixel(canvas, 20,21, 0,255,0,255); -_assertPixel(canvas, 21,21, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.rect(20, 20, 60, 10); + ctx.stroke(); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html index 91cedc70695..e7fd7e7858b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.strokeStyle = g; -ctx.strokeRect(20, 20, 60, 10); -_assertPixel(canvas, 19,19, 0,255,0,255); -_assertPixel(canvas, 20,19, 0,255,0,255); -_assertPixel(canvas, 21,19, 0,255,0,255); -_assertPixel(canvas, 19,20, 0,255,0,255); -_assertPixel(canvas, 20,20, 0,255,0,255); -_assertPixel(canvas, 21,20, 0,255,0,255); -_assertPixel(canvas, 19,21, 0,255,0,255); -_assertPixel(canvas, 20,21, 0,255,0,255); -_assertPixel(canvas, 21,21, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.strokeRect(20, 20, 60, 10); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.js index 0949fc8a195..d7344fb4e61 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.interpolate.zerosize.strokeRect.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, 100, 50); -var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.strokeStyle = g; -ctx.strokeRect(20, 20, 60, 10); -_assertPixel(canvas, 19,19, 0,255,0,255); -_assertPixel(canvas, 20,19, 0,255,0,255); -_assertPixel(canvas, 21,19, 0,255,0,255); -_assertPixel(canvas, 19,20, 0,255,0,255); -_assertPixel(canvas, 20,20, 0,255,0,255); -_assertPixel(canvas, 21,20, 0,255,0,255); -_assertPixel(canvas, 19,21, 0,255,0,255); -_assertPixel(canvas, 20,21, 0,255,0,255); -_assertPixel(canvas, 21,21, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createLinearGradient(50, 25, 50, 25); // zero-length line (undefined direction) + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.strokeStyle = g; + ctx.strokeRect(20, 20, 60, 10); + _assertPixel(canvas, 19,19, 0,255,0,255); + _assertPixel(canvas, 20,19, 0,255,0,255); + _assertPixel(canvas, 21,19, 0,255,0,255); + _assertPixel(canvas, 19,20, 0,255,0,255); + _assertPixel(canvas, 20,20, 0,255,0,255); + _assertPixel(canvas, 21,20, 0,255,0,255); + _assertPixel(canvas, 19,21, 0,255,0,255); + _assertPixel(canvas, 20,21, 0,255,0,255); + _assertPixel(canvas, 21,21, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html index f3c4209be7e..bc10ecee537 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.html @@ -17,33 +17,33 @@ 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(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, NaN, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, NaN, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, NaN); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); -t.done(); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, NaN, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, NaN, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, NaN); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js index 9fefcc3215b..87f689186bb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.nonfinite.worker.js @@ -13,33 +13,32 @@ 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.createLinearGradient(Infinity, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, NaN, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, NaN, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, NaN); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(-Infinity, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(NaN, 0, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, -Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, NaN, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, -Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, NaN, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1, NaN); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(Infinity, 0, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, 0); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, Infinity, 1, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, Infinity, Infinity); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html index 5e791079077..69fc52ceddc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.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'); -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-50, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.js index 62a96e2f677..79cdc96da86 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.1.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 g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-50, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.html index 86fb5073349..5cf27f1d8e4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.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.translate(100, 0); -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-150, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.translate(100, 0); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-150, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.js index dace251811a..a2b532d1f93 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.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'); - -ctx.translate(100, 0); -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-150, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.translate(100, 0); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-150, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.html index ccbc3ab2839..074722a49b5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.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'); -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.translate(-50, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.js index 8f5a7115eca..77df9495c3d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.linear.transform.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'); - -var g = ctx.createLinearGradient(0, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(0.25, '#0f0'); -g.addColorStop(0.75, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.translate(-50, 0); -ctx.fillRect(50, 0, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(0.25, '#0f0'); + g.addColorStop(0.75, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-50, 0); + ctx.fillRect(50, 0, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.html index a091c32b2c1..d923a2f552b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.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'); -var g1 = ctx.createLinearGradient(0, 0, 100, 0); -var g2 = ctx.createLinearGradient(0, 0, 100, 0); -_assertDifferent(g1, g2, "g1", "g2"); -ctx.fillStyle = g1; -_assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1"); -t.done(); + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + var g2 = ctx.createLinearGradient(0, 0, 100, 0); + _assertDifferent(g1, g2, "g1", "g2"); + ctx.fillStyle = g1; + _assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.js index 6c69e1ad35c..f6d45d259f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.compare.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 g1 = ctx.createLinearGradient(0, 0, 100, 0); -var g2 = ctx.createLinearGradient(0, 0, 100, 0); -_assertDifferent(g1, g2, "g1", "g2"); -ctx.fillStyle = g1; -_assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g1 = ctx.createLinearGradient(0, 0, 100, 0); + var g2 = ctx.createLinearGradient(0, 0, 100, 0); + _assertDifferent(g1, g2, "g1", "g2"); + ctx.fillStyle = g1; + _assertSame(ctx.fillStyle, g1, "ctx.fillStyle", "g1"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html index 8d54f95f727..7ea9d84a4c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.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); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var g = offscreenCanvas2.getContext('2d').createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var g = offscreenCanvas2.getContext('2d').createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.js index fa8cee44caa..f877d596ddf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.crosscanvas.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); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var g = offscreenCanvas2.getContext('2d').createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var g = offscreenCanvas2.getContext('2d').createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html index e8122781559..51160c586f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.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'); -var g = ctx.createLinearGradient(0, 0, 100, 0); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); -t.done(); + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.js index 278df5a0d1b..40e84ba42be 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidcolor.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 g = ctx.createLinearGradient(0, 0, 100, 0); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); -assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, ""); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'null'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, 'undefined'); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, null); }); + assert_throws_dom("SYNTAX_ERR", function() { g.addColorStop(0, undefined); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html index bba405069c4..b9f11042543 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.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'); -var g = ctx.createLinearGradient(0, 0, 100, 0); -assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(-1, '#000'); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(2, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(Infinity, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#000'); }); -t.done(); + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(-1, '#000'); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(2, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#000'); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.js index f71c8402eb7..80be64235b6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.invalidoffset.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 g = ctx.createLinearGradient(0, 0, 100, 0); -assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(-1, '#000'); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(2, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(Infinity, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#000'); }); -assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#000'); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(0, 0, 100, 0); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(-1, '#000'); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { g.addColorStop(2, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(-Infinity, '#000'); }); + assert_throws_js(TypeError, function() { g.addColorStop(NaN, '#000'); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.html index 175c3a215b7..00c60041e73 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.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'); -var g = ctx.createLinearGradient(-100, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -g.addColorStop(0.1, '#0f0'); -g.addColorStop(0.9, '#0f0'); -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + var g = ctx.createLinearGradient(-100, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + g.addColorStop(0.1, '#0f0'); + g.addColorStop(0.9, '#0f0'); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.js index 76721140392..db79ebfa2f8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.object.update.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 g = ctx.createLinearGradient(-100, 0, 200, 0); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -g.addColorStop(0.1, '#0f0'); -g.addColorStop(0.9, '#0f0'); -ctx.fillRect(0, 0, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createLinearGradient(-100, 0, 200, 0); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + g.addColorStop(0.1, '#0f0'); + g.addColorStop(0.9, '#0f0'); + ctx.fillRect(0, 0, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html index 537f960d8dd..9a07ec4dc2f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.js index 99711c732de..806a83f7a53 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.behind.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, 100, 50); -var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(120, 25, 10, 211, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html index 360f1ab7359..1ab27b46c41 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.js index 6af48259a35..2bb0860a6d2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.beside.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, 100, 50); -var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(0, 100, 40, 100, 100, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html index 3f3690381d3..87cac451d64 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.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); -var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.js index 2eca2d573e0..a9c859e7cea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.bottom.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); -var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 101); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html index 700740938c8..649b83cc8f8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.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); -var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.js index 25ff9b861da..8223f526554 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.cylinder.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); -var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(210, 25, 100, 230, 25, 100); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.front.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.html index 12f14ce0055..6ad51c17955 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.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); -var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.js index 6053cb40d19..a1eb55f2ecc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.front.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); -var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(311, 25, 10, 210, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html index 242aaa01280..7de944a5209 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.html @@ -17,33 +17,33 @@ 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 tol = 1; // tolerance to avoid antialiasing artifacts -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.beginPath(); -ctx.moveTo(30+tol, 40); -ctx.lineTo(110, -20+tol); -ctx.lineTo(110, 100-tol); -ctx.fill(); -var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var tol = 1; // tolerance to avoid antialiasing artifacts + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(30+tol, 40); + ctx.lineTo(110, -20+tol); + ctx.lineTo(110, 100-tol); + ctx.fill(); + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js index 15e7a6f696c..0d211a0c67a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape1.worker.js @@ -13,33 +13,32 @@ 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; // tolerance to avoid antialiasing artifacts -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.beginPath(); -ctx.moveTo(30+tol, 40); -ctx.lineTo(110, -20+tol); -ctx.lineTo(110, 100-tol); -ctx.fill(); -var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var tol = 1; // tolerance to avoid antialiasing artifacts + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.beginPath(); + ctx.moveTo(30+tol, 40); + ctx.lineTo(110, -20+tol); + ctx.lineTo(110, 100-tol); + ctx.fill(); + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html index d51a132f82a..a748546c1a8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.html @@ -17,33 +17,33 @@ 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 tol = 1; // tolerance to avoid antialiasing artifacts -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.beginPath(); -ctx.moveTo(30-tol, 40); -ctx.lineTo(110, -20-tol); -ctx.lineTo(110, 100+tol); -ctx.fill(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var tol = 1; // tolerance to avoid antialiasing artifacts + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(30-tol, 40); + ctx.lineTo(110, -20-tol); + ctx.lineTo(110, 100+tol); + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js index 793d2513dd3..2f561598b9f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.shape2.worker.js @@ -13,33 +13,32 @@ 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; // tolerance to avoid antialiasing artifacts -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.beginPath(); -ctx.moveTo(30-tol, 40); -ctx.lineTo(110, -20-tol); -ctx.lineTo(110, 100+tol); -ctx.fill(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var tol = 1; // tolerance to avoid antialiasing artifacts + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(30+10*5/2, 40, 10*3/2, 30+10*15/4, 40, 10*9/4); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.beginPath(); + ctx.moveTo(30-tol, 40); + ctx.lineTo(110, -20-tol); + ctx.lineTo(110, 100+tol); + ctx.fill(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.top.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.html index 9759eb3fa98..802006beecd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.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); -var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.js index 2ee6de3479c..731ee8f807c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.cone.top.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); -var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(230, 25, 100, 100, 25, 101); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.equal.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.html index 465ee976fae..3786e180f3b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.equal.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.worker.js index 74567335b42..d046809a314 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.equal.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, 100, 50); -var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(50, 25, 20, 50, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.html index 7c6fd31d67d..db269a9b926 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.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); -var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.js index 6d73c0935ac..bc48654ece5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside1.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); -var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(50, 25, 100, 50, 25, 200); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.html index fbad8b57b56..23de3b00f86 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.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); -var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.js index aa6ecba5f49..ffc1040d0b0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside2.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); -var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.html index 54794b13fc4..bbb2ecbcdca 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.html @@ -17,27 +17,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); -var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(0.993, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(0.993, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.js index b6d58b656c0..792d9e7852b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.inside3.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(0.993, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(50, 25, 200, 50, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(0.993, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.html index 1fb6af52289..b6dcaf175e9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.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'); -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); }); -t.done(); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.js index e0d2c7cc334..72ad3f803ec 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.negative.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_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); }); -assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, 1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -0.1); }); + assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createRadialGradient(0, 0, -0.1, 0, 0, -0.1); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html index 75ab5740db9..8ba0476938d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.html @@ -17,85 +17,85 @@ 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(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, NaN, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, NaN, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, NaN, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, NaN, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, NaN); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity); }); -t.done(); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, NaN, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, NaN, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js index f09946947ce..dd25e607b2c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.nonfinite.worker.js @@ -13,85 +13,84 @@ 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.createRadialGradient(Infinity, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, NaN, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, NaN, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, NaN, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, NaN, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, NaN); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity); }); -assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(-Infinity, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(NaN, 0, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, -Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, NaN, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, -Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, NaN, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, -Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, NaN, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, -Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, NaN, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, -Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0, NaN); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(Infinity, 0, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, Infinity, 1, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, Infinity, 0, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, 1); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, Infinity, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, Infinity, 0, Infinity); }); + assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, Infinity, Infinity); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.html index 44b2aa49fc1..6c65f23960a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.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); -var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.js index e1d3cddb244..d7beb71d2f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside1.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); -var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#0f0'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(200, 25, 10, 200, 25, 20); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#0f0'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.outside2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.html index e9e7ce497cd..8f4c48ebc12 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.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); -var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.js index a3f0235ed7a..6c753e38b10 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside2.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); -var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.outside3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.html index b66480a52c4..5cfd30876d6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.html @@ -17,27 +17,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); -var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.001, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.001, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.js index 7b90c87d038..70593ceb292 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.outside3.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.001, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(200, 25, 20, 200, 25, 10); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.001, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.html index c042b03b339..983071ec653 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.js index 7465345f6bf..21bbce1e741 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch1.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, 100, 50); -var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(150, 25, 50, 200, 25, 100); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.html index 5da1d592f84..bd239249882 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.html @@ -17,28 +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); -var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); -g.addColorStop(0, '#f00'); -g.addColorStop(0.01, '#0f0'); -g.addColorStop(0.99, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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); + var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); + g.addColorStop(0, '#f00'); + g.addColorStop(0.01, '#0f0'); + g.addColorStop(0.99, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.js index 91dfcb31acf..75abd38d5d7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch2.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); -var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); -g.addColorStop(0, '#f00'); -g.addColorStop(0.01, '#0f0'); -g.addColorStop(0.99, '#0f0'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(-80, 25, 70, 0, 25, 150); + g.addColorStop(0, '#f00'); + g.addColorStop(0.01, '#0f0'); + g.addColorStop(0.99, '#0f0'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.html index 804589f074b..bdaed6f7daa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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 = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.js index 11e17fbb80b..b2f3b0b4102 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.touch3.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, 100, 50); -var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); -g.addColorStop(0, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_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(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + var g = ctx.createRadialGradient(120, -15, 25, 140, -30, 50); + g.addColorStop(0, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _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/fill-and-stroke-styles/2d.gradient.radial.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.html index c54044c0ea6..517c9e32886 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.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'); -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.js index e2159d269f6..198dab1fceb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.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'); - -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.html index 145c2923e90..f7f4120a927 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.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.translate(100, 0); -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.translate(100, 0); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.js index 511b7f362a4..27793b90ab6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.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.translate(100, 0); -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.translate(-50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.translate(100, 0); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.translate(-50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.html index 01d14cfbfc0..e0ac17fa82a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.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'); -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.translate(50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.js index b7bf68a979d..1b74d8b4d7d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.radial.transform.3.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'); - -var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); -g.addColorStop(0, '#0f0'); -g.addColorStop(0.5, '#0f0'); -g.addColorStop(0.51, '#f00'); -g.addColorStop(1, '#f00'); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -ctx.translate(50, 25); -ctx.scale(10, 10); -ctx.fillRect(-5, -2.5, 10, 5); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var g = ctx.createRadialGradient(0, 0, 0, 0, 0, 11.2); + g.addColorStop(0, '#0f0'); + g.addColorStop(0.5, '#0f0'); + g.addColorStop(0.51, '#f00'); + g.addColorStop(1, '#f00'); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(50, 25); + ctx.scale(10, 10); + ctx.fillRect(-5, -2.5, 10, 5); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html index 80bb9466601..6f66f500e37 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.html @@ -17,28 +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); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 0, 100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 50,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.js index a2608066eac..6f6b882416a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.canvas.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); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 0, 100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 50,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 50,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html index 965daccd3aa..4ffbc6d3ac2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js index 725df51307e..b9a79d74c95 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.image.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); -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.html index 50cd38ed0f0..9fa124277ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.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'); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.js index 8f33ec9d8d9..11c307653d5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.nocontext.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html index 5c395ab94e6..c7f61889ad5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.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'); -canvas.width = 0; -canvas.height = 10; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 10, "canvas.height", "10"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); -canvas.width = 10; -canvas.height = 0; -_assertSame(canvas.width, 10, "canvas.width", "10"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); -canvas.width = 0; -canvas.height = 0; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); -t.done(); + canvas.width = 0; + canvas.height = 10; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 10, "canvas.height", "10"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + canvas.width = 10; + canvas.height = 0; + _assertSame(canvas.width, 10, "canvas.width", "10"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.js index b02e3cc232b..caeff7cdfab 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.basic.zerocanvas.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'); - -canvas.width = 0; -canvas.height = 10; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 10, "canvas.height", "10"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); -canvas.width = 10; -canvas.height = 0; -_assertSame(canvas.width, 10, "canvas.width", "10"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); -canvas.width = 0; -canvas.height = 0; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 0; + canvas.height = 10; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 10, "canvas.height", "10"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + canvas.width = 10; + canvas.height = 0; + _assertSame(canvas.width, 10, "canvas.width", "10"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + assert_throws_dom("INVALID_STATE_ERR", function() { ctx.createPattern(canvas, 'repeat'); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html index c6e0b36092e..b040e023d89 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.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'); -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var offscreenCanvas2 = new OffscreenCanvas(100, 50); - var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js index 1a1d045ba6f..e7a207447a3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.crosscanvas.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 promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var offscreenCanvas2 = new OffscreenCanvas(100, 50); - var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var pattern = offscreenCanvas2.getContext('2d').createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.html index e3ad03190d6..4297814be97 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.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(TypeError, function() { ctx.createPattern(null, 'repeat'); }); -t.done(); + assert_throws_js(TypeError, function() { ctx.createPattern(null, 'repeat'); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.js index 63dcb8f9422..c7d9969619b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.null.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.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.createPattern(null, 'repeat'); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { ctx.createPattern(null, 'repeat'); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.html index ac202ee2a43..469f2236fed 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.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(TypeError, function() { ctx.createPattern('../images/red.png', 'repeat'); }); -t.done(); + assert_throws_js(TypeError, function() { ctx.createPattern('../images/red.png', 'repeat'); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.js index c07e7d51eff..f8525e4a494 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.string.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.createPattern('../images/red.png', 'repeat'); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { ctx.createPattern('../images/red.png', 'repeat'); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.html index 0593d415293..475d8ddafac 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.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(TypeError, function() { ctx.createPattern(undefined, 'repeat'); }); -t.done(); + assert_throws_js(TypeError, function() { ctx.createPattern(undefined, 'repeat'); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.js index 1e94f39ea91..dbfdbe9a1e1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.image.undefined.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.createPattern(undefined, 'repeat'); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { ctx.createPattern(undefined, 'repeat'); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.html index 4c27f26347f..11586f5aa72 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.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'); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 0, 100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.js index c83755c984c..3dde0ef9a07 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas1.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'); - -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 0, 100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + 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 pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html index 08a6cd896ee..568140a8db3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.html @@ -17,27 +17,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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 0, 100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 0, 100, 50); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.js index a49dd10213e..fd70a2fcbb9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.modify.canvas2.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'); - -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 0, 100, 50); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + 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 pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html index f5d9f5a5582..7ec80af80fd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js index 82a49c331b5..178be23578f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.basic.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); -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html index 87158be57ce..d6ebd24277e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.html @@ -17,34 +17,34 @@ 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); -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js index 731df50c00f..8596a460ef1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord1.worker.js @@ -13,34 +13,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 = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html index a600e6ef578..97205f5489a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.html @@ -17,34 +17,34 @@ 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 promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#f00'; - ctx.fillRect(50, 0, 50, 50); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js index bd9c115f0da..5c69536d101 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord2.worker.js @@ -13,34 +13,33 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -var promise = 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.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#f00'; - ctx.fillRect(50, 0, 50, 50); - ctx.fillStyle = pattern; - ctx.translate(50, 0); - ctx.fillRect(-50, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = 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.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.fillStyle = pattern; + ctx.translate(50, 0); + ctx.fillRect(-50, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html index c569d877053..28104abc4e1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.html @@ -17,34 +17,34 @@ 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); -var promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 25); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + 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.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js index cf88ebab734..994bcc8a734 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.coord3.worker.js @@ -13,34 +13,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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 50, 25); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + 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.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 25); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html index 4242375b030..5036f8b6b50 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.html @@ -17,36 +17,36 @@ 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); -var promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - ctx.fillRect(-100, 0, 100, 50); - ctx.fillRect(0, 50, 100, 50); - ctx.fillRect(100, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = 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); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js index 85a6e43bd10..f6ccb838ded 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.norepeat.outside.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); -var promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - ctx.fillRect(-100, 0, 100, 50); - ctx.fillRect(0, 50, 100, 50); - ctx.fillRect(100, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = 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); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + ctx.fillRect(-100, 0, 100, 50); + ctx.fillRect(0, 50, 100, 50); + ctx.fillRect(100, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html index ccad92e529c..f7305573c46 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.html @@ -17,27 +17,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); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 25); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 25, 100, 25); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 25); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 25); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 25, 100, 25); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.js index 38fa35f138d..7896c70def2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.canvas.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 25); -ctx2.fillStyle = '#0f0'; -ctx2.fillRect(0, 25, 100, 25); -var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); -ctx.fillStyle = pattern; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 25); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 98,1, 0,255,0,255); -_assertPixel(canvas, 1,48, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 25); + ctx2.fillStyle = '#0f0'; + ctx2.fillRect(0, 25, 100, 25); + var pattern = ctx.createPattern(offscreenCanvas2, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html index 377cc58685b..05b278ad81b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.html @@ -17,36 +17,36 @@ 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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/rrgg-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.save(); - ctx.translate(0, -103); - ctx.fillRect(0, 103, 100, 50); - ctx.restore(); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 25); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/rrgg-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js index fccfe704267..825e12add09 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.orientation.image.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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/rrgg-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.save(); - ctx.translate(0, -103); - ctx.fillRect(0, 103, 100, 50); - ctx.restore(); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 25); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/rrgg-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.save(); + ctx.translate(0, -103); + ctx.fillRect(0, 103, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html index b5613c37980..15b7ff2c308 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js index 1f09d297f9d..6bf73924517 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.basic.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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html index a4b2bbdd7d8..225838972ee 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.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.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/rgrg-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/rgrg-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js index ea064ea327a..32d1a27b349 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord1.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.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/rgrg-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/rgrg-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html index 52449506a7d..73c31e02b8e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.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'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/grgr-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/grgr-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js index 29c6f8f006d..a94f8206407 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord2.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 promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/grgr-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/grgr-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html index d01acb8a6de..c31528d87a7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/rgrg-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/rgrg-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js index 91c14f98dc0..ab7059b7849 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.coord3.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'); - -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/rgrg-256x256.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.translate(-128, -78); - ctx.fillRect(128, 78, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/rgrg-256x256.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.translate(-128, -78); + ctx.fillRect(128, 78, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html index 2c91f1d736c..1230be998aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.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.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js index 147eadf8e71..1874aa9a30a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeat.outside.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.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'no-repeat'); - ctx.fillStyle = pattern; - ctx.translate(50, 25); - ctx.fillRect(-50, -25, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'no-repeat'); + ctx.fillStyle = pattern; + ctx.translate(50, 25); + ctx.fillRect(-50, -25, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html index ed7cee297d3..3e7b8b2b502 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.html @@ -17,33 +17,33 @@ 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.fillRect(0, 0, 100, 16); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 16); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js index d7efcfa1e13..49d343cf904 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.basic.worker.js @@ -13,33 +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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 16); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 16); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html index 342ce06aadf..9405b3a583c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.html @@ -17,36 +17,36 @@ 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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.translate(0, 16); - ctx.fillRect(0, -16, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,25, 0,255,0,255); - _assertPixel(canvas, 98,25, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js index 351092befd3..69c54c447a5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.coord1.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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.translate(0, 16); - ctx.fillRect(0, -16, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,25, 0,255,0,255); - _assertPixel(canvas, 98,25, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.translate(0, 16); + ctx.fillRect(0, -16, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html index ad4a4a24614..c81e3ce196b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.html @@ -17,33 +17,33 @@ 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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js index 0e031109f28..c4194a36984 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeatx.outside.worker.js @@ -13,33 +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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-x'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 16); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-x'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 16); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html index 6069902498e..cef32b3e9d5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.html @@ -17,33 +17,33 @@ 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.fillRect(0, 0, 16, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 16, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js index 09e9b023946..b460e240b96 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.basic.worker.js @@ -13,33 +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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 16, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 16, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html index fd1cca2e959..490b2a19939 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.html @@ -17,36 +17,36 @@ 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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.translate(48, 0); - ctx.fillRect(-48, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 50,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 50,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js index 1701d3cc766..05fde112be4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.coord1.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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.translate(48, 0); - ctx.fillRect(-48, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 50,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 50,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.translate(48, 0); + ctx.fillRect(-48, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 50,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 50,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html index b7fbd9eb879..954280620aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.html @@ -17,33 +17,33 @@ 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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js index 7242c8ff484..c421fbc0d10 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.paint.repeaty.outside.worker.js @@ -13,33 +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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/red-16x16.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat-y'); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 16, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + 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-16x16.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat-y'); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 16, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.html index 5251f93c8f1..377ae3edc44 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "Repeat"); }); -t.done(); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "Repeat"); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.js index 6a7dd8d6dd7..8073f47ed0b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.case.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "Repeat"); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "Repeat"); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html index 76e54e9616f..95baf291171 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-1x1.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, ""); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 200, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-1x1.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js index e3048881e37..5187ea44b6c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.empty.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); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/green-1x1.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, ""); - ctx.fillStyle = pattern; - ctx.fillRect(0, 0, 200, 50); - _assertPixel(canvas, 1,1, 0,255,0,255); - _assertPixel(canvas, 98,1, 0,255,0,255); - _assertPixel(canvas, 1,48, 0,255,0,255); - _assertPixel(canvas, 98,48, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/green-1x1.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, ""); + ctx.fillStyle = pattern; + ctx.fillRect(0, 0, 200, 50); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 98,1, 0,255,0,255); + _assertPixel(canvas, 1,48, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html index 0e97c7aa675..d79551a3021 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.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(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); -t.done(); + _assert(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.js index 57353f338c7..6ab4da9f8e6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.null.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.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(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assert(ctx.createPattern(canvas, null) != null, "ctx.createPattern(canvas, null) != null"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html index d5166d750b9..2f4a35dedf6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "repeat\0"); }); -t.done(); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "repeat\0"); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.js index baafd4b43a0..83e7c62fe5f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.nullsuffix.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "repeat\0"); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "repeat\0"); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.html index 731ef86f835..8ddd2319852 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, undefined); }); -t.done(); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, undefined); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.js index 1474ac43dcb..f4f25ae5a28 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.undefined.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, undefined); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, undefined); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html index 793ed67a7c1..3a37b46ab7d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "invalid"); }); -t.done(); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "invalid"); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.js index 076cba562c4..3114dde21a0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognised.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "invalid"); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "invalid"); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html index 59a0be4296b..58fb005d700 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); }); -t.done(); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.js index 0adfe9bf418..c8d18511f40 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.pattern.repeat.unrecognisednull.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_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_dom("SYNTAX_ERR", function() { ctx.createPattern(canvas, "null"); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.html index 70524cb6d99..cd7e424374a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.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.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'"); -t.done(); + _assertSame(ctx.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.js index 0d72f35264b..9e0ac8be3ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.default.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.strokeStyle.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.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.strokeStyle, '#000000', "ctx.strokeStyle", "'#000000'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html index e259f79ca28..3ff0eea153f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html @@ -111,12 +111,12 @@ async_test(function(t) { t.done(); } }); - // We wait for up to 3 frames before checking the information has propagated. - requestAnimationFrame(() => { - requestAnimationFrame(() => { - requestAnimationFrame(() => { + + function testImage() { + if (placeholder.width != 30) { + requestAnimationFrame(testImage); + } else { t.step(function() { - // Verify that updates the size of its placeholder canvas. assert_equals(placeholder.width, 30); assert_equals(placeholder.height, 40); var computedStyle = window.getComputedStyle(placeholder); @@ -134,9 +134,10 @@ async_test(function(t) { t.done(); } }); - }); - }); - }); + } + } + + requestAnimationFrame(testImage); }, "Verify that resizing an OffscreenCanvas with a 2d context propagates the new size to its placeholder canvas asynchronously."); async_test(function(t) { @@ -173,32 +174,32 @@ async_test(function(t) { t.done(); } }); - // We wait for up to 3 frames before checking the information has propagated. - requestAnimationFrame(() => { - requestAnimationFrame(() => { - requestAnimationFrame(() => { + + function testImage() { + if (placeholder.width != 30) { + requestAnimationFrame(testImage); + } else { + t.step(function() { + assert_equals(placeholder.width, 30); + assert_equals(placeholder.height, 40); + var computedStyle = window.getComputedStyle(placeholder); + assert_equals(computedStyle.getPropertyValue('width'), "30px"); + assert_equals(computedStyle.getPropertyValue('height'), "40px"); + }); + createImageBitmap(placeholder).then(image => { t.step(function() { - // Verify that updates the size of its placeholder canvas. - assert_equals(placeholder.width, 30); - assert_equals(placeholder.height, 40); - var computedStyle = window.getComputedStyle(placeholder); - assert_equals(computedStyle.getPropertyValue('width'), "30px"); - assert_equals(computedStyle.getPropertyValue('height'), "40px"); - }); - createImageBitmap(placeholder).then(image => { - t.step(function() { - // Verify that an image grabbed from the placeholder has the correct dimensions - assert_equals(image.width, 30); - assert_equals(image.height, 40); - }); - asyncStepsCompleted = asyncStepsCompleted + 1; - if (asyncStepsCompleted == 2) { - t.done(); - } + // Verify that an image grabbed from the placeholder has the correct dimensions + assert_equals(image.width, 30); + assert_equals(image.height, 40); }); + asyncStepsCompleted = asyncStepsCompleted + 1; + if (asyncStepsCompleted == 2) { + t.done(); + } }); - }); - }); + } + } + requestAnimationFrame(testImage); }, "Verify that resizing an OffscreenCanvas with a webgl context propagates the new size to its placeholder canvas asynchronously."); async_test(function(t){ @@ -210,27 +211,30 @@ async_test(function(t){ offscreen.width = offscreen.height = 10; ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 10, 10); - // We wait for up to 3 frames before checking the information has propagated. - requestAnimationFrame(() => { - requestAnimationFrame(() => { - requestAnimationFrame(() => { - var testCanvas = document.createElement('canvas'); - testCanvas.width = testCanvas.height = 20; - testCtx = testCanvas.getContext('2d'); - testCtx.drawImage(placeholder, 0, 0); - var pixel1 = testCtx.getImageData(9, 9, 1, 1).data; - var pixel2 = testCtx.getImageData(9, 10, 1, 1).data; - var pixel3 = testCtx.getImageData(10, 9, 1, 1).data; - t.step(function() { - assert_equals(placeholder.width, 10); - assert_equals(placeholder.height, 10); - assert_array_equals(pixel1, [0, 255, 0, 255]); - assert_array_equals(pixel2, [0, 0, 0, 0]); - assert_array_equals(pixel3, [0, 0, 0, 0]); - }); - t.done(); + + var testCanvas = document.createElement('canvas'); + testCanvas.width = testCanvas.height = 20; + var testCtx = testCanvas.getContext('2d'); + + function testImage() { + if (placeholder.width != 10) { + requestAnimationFrame(testImage); + } else { + testCtx.drawImage(placeholder, 0, 0); + var pixel1 = testCtx.getImageData(9, 9, 1, 1).data; + var pixel2 = testCtx.getImageData(9, 10, 1, 1).data; + var pixel3 = testCtx.getImageData(10, 9, 1, 1).data; + t.step(function() { + assert_equals(placeholder.width, 10); + assert_equals(placeholder.height, 10); + assert_array_equals(pixel1, [0, 255, 0, 255]); + assert_array_equals(pixel2, [0, 0, 0, 0]); + assert_array_equals(pixel3, [0, 0, 0, 0]); }); - }); - }); + t.done(); + } + } + + requestAnimationFrame(testImage); }, "Verify that drawImage uses the size of the frame as the intinsic size of a placeholder canvas."); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.html index cf887b62a28..603d5e5da42 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.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.shadowColor = 'rgba(255, 0, 0, 0.01)'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 4); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(255, 0, 0, 0.01)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 4); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.js index 7bcf74463c5..0bc92ac4141 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.1.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.shadowColor = 'rgba(255, 0, 0, 0.01)'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 4); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(255, 0, 0, 0.01)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 4); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.html index cb03866bc37..254d214c4cd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.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.shadowColor = 'rgba(0, 0, 255, 0.5)'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(0, 0, 255, 0.5)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.js index 8f4b98143b3..ff543b3c800 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.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.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = 'rgba(0, 0, 255, 0.5)'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = 'rgba(0, 0, 255, 0.5)'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.html index efc9fca97e2..2c50c0d748a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.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.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 50; -ctx.globalAlpha = 0.5; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.5; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.js index ddaae242d96..d8bc071c85d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.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.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 50; -ctx.globalAlpha = 0.5; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.5; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.html index 295b61269cd..d86ee4c4bff 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.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.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) -ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; -ctx.shadowOffsetY = 50; -ctx.globalAlpha = 0.707; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.707; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.js index 16defd9094a..4fdb8ca7dc5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.4.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.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.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) -ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; -ctx.shadowOffsetY = 50; -ctx.globalAlpha = 0.707; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; // (work around broken Firefox globalAlpha caching) + ctx.shadowColor = 'rgba(0, 0, 255, 0.707)'; + ctx.shadowOffsetY = 50; + ctx.globalAlpha = 0.707; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.html index 3b1089d7d79..4c1a9b08cb0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.js index 5437c65ec17..be4b78d87c5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.alpha.5.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); -ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; -ctx.shadowColor = '#00f'; -ctx.shadowOffsetY = 50; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = 'rgba(64, 0, 0, 0.5)'; + ctx.shadowColor = '#00f'; + ctx.shadowOffsetY = 50; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.html index e6c4c2fda89..21225883df9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.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.shadowBlur, 0, "ctx.shadowBlur", "0"); -t.done(); + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.js index 9cf55e796b4..7643f0edfa4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.initial.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.shadowBlur, 0, "ctx.shadowBlur", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.html index a506da4b8bc..8f199766fe2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.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.shadowBlur = 1; -ctx.shadowBlur = -2; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = Infinity; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = -Infinity; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = NaN; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -t.done(); + ctx.shadowBlur = 1; + ctx.shadowBlur = -2; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = -Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = NaN; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.js index 1f79c36d122..303b43e8193 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.invalid.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.shadowBlur = 1; -ctx.shadowBlur = -2; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = Infinity; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = -Infinity; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 1; -ctx.shadowBlur = NaN; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.shadowBlur = 1; + ctx.shadowBlur = -2; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = -Infinity; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 1; + ctx.shadowBlur = NaN; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.html index b69b9c47174..299826a5a2e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.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.shadowBlur = 1; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 0.5; -_assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5"); -ctx.shadowBlur = 1e6; -_assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6"); -ctx.shadowBlur = 0; -_assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); -t.done(); + ctx.shadowBlur = 1; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 0.5; + _assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5"); + ctx.shadowBlur = 1e6; + _assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6"); + ctx.shadowBlur = 0; + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.js index b41fa249054..c41588b50ed 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.valid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowBlur.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'); - -ctx.shadowBlur = 1; -_assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); -ctx.shadowBlur = 0.5; -_assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5"); -ctx.shadowBlur = 1e6; -_assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6"); -ctx.shadowBlur = 0; -_assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.shadowBlur = 1; + _assertSame(ctx.shadowBlur, 1, "ctx.shadowBlur", "1"); + ctx.shadowBlur = 0.5; + _assertSame(ctx.shadowBlur, 0.5, "ctx.shadowBlur", "0.5"); + ctx.shadowBlur = 1e6; + _assertSame(ctx.shadowBlur, 1e6, "ctx.shadowBlur", "1e6"); + ctx.shadowBlur = 0; + _assertSame(ctx.shadowBlur, 0, "ctx.shadowBlur", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.html index 44a25308ac5..92a8bd15006 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.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.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); -t.done(); + _assertSame(ctx.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.js index f8132d53856..8b1ec38d7ff 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.initial.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.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.shadowColor, 'rgba(0, 0, 0, 0)', "ctx.shadowColor", "'rgba(0, 0, 0, 0)'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.html index ed09bcbdcf8..93a480b307b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.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.shadowColor = '#00ff00'; -ctx.shadowColor = 'bogus'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = 'red bogus'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = ctx; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = undefined; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -t.done(); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'red bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = ctx; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = undefined; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.js index b1003718c56..67e0fa80bc0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.invalid.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.shadowColor = '#00ff00'; -ctx.shadowColor = 'bogus'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = 'red bogus'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = ctx; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = '#00ff00'; -ctx.shadowColor = undefined; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = 'red bogus'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = ctx; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = '#00ff00'; + ctx.shadowColor = undefined; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html index 9511027b5ad..acd36360a8f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.html @@ -17,14 +17,14 @@ 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.shadowColor = 'lime'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = 'RGBA(0,255, 0,0)'; -_assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'"); -t.done(); + ctx.shadowColor = 'lime'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = 'RGBA(0,255, 0,0)'; + _assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.js index f47e3660b50..02444723b4e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowColor.valid.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.shadowColor = 'lime'; -_assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); -ctx.shadowColor = 'RGBA(0,255, 0,0)'; -_assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.shadowColor = 'lime'; + _assertSame(ctx.shadowColor, '#00ff00', "ctx.shadowColor", "'#00ff00'"); + ctx.shadowColor = 'RGBA(0,255, 0,0)'; + _assertSame(ctx.shadowColor, 'rgba(0, 255, 0, 0)', "ctx.shadowColor", "'rgba(0, 255, 0, 0)'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html index e568569a585..52be5ad532d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.html @@ -17,12 +17,12 @@ 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.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); -_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); -t.done(); + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.js index af2e77f4642..b7b399b3710 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.initial.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'); - -_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); -_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html index 58c8efec200..be055aa37ce 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.html @@ -17,28 +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.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = Infinity; -ctx.shadowOffsetY = Infinity; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = -Infinity; -ctx.shadowOffsetY = -Infinity; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = NaN; -ctx.shadowOffsetY = NaN; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -t.done(); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = Infinity; + ctx.shadowOffsetY = Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = -Infinity; + ctx.shadowOffsetY = -Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = NaN; + ctx.shadowOffsetY = NaN; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.js index 892614781ad..37ae2e6b785 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.invalid.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.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = Infinity; -ctx.shadowOffsetY = Infinity; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = -Infinity; -ctx.shadowOffsetY = -Infinity; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -ctx.shadowOffsetX = NaN; -ctx.shadowOffsetY = NaN; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = Infinity; + ctx.shadowOffsetY = Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = -Infinity; + ctx.shadowOffsetY = -Infinity; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + ctx.shadowOffsetX = NaN; + ctx.shadowOffsetY = NaN; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html index 1ad622c468d..785966cb38e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.html @@ -17,30 +17,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.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 0.5; -ctx.shadowOffsetY = 0.25; -_assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5"); -_assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25"); -ctx.shadowOffsetX = -0.5; -ctx.shadowOffsetY = -0.25; -_assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5"); -_assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25"); -ctx.shadowOffsetX = 0; -ctx.shadowOffsetY = 0; -_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); -_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); -ctx.shadowOffsetX = 1e6; -ctx.shadowOffsetY = 1e6; -_assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6"); -_assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6"); -t.done(); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 0.5; + ctx.shadowOffsetY = 0.25; + _assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5"); + _assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25"); + ctx.shadowOffsetX = -0.5; + ctx.shadowOffsetY = -0.25; + _assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5"); + _assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25"); + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + ctx.shadowOffsetX = 1e6; + ctx.shadowOffsetY = 1e6; + _assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6"); + _assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.js index eed84b54e5b..a6e047ee2b7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.attributes.shadowOffset.valid.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.shadowOffsetX = 1; -ctx.shadowOffsetY = 2; -_assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); -_assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); -ctx.shadowOffsetX = 0.5; -ctx.shadowOffsetY = 0.25; -_assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5"); -_assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25"); -ctx.shadowOffsetX = -0.5; -ctx.shadowOffsetY = -0.25; -_assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5"); -_assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25"); -ctx.shadowOffsetX = 0; -ctx.shadowOffsetY = 0; -_assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); -_assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); -ctx.shadowOffsetX = 1e6; -ctx.shadowOffsetY = 1e6; -_assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6"); -_assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.shadowOffsetX = 1; + ctx.shadowOffsetY = 2; + _assertSame(ctx.shadowOffsetX, 1, "ctx.shadowOffsetX", "1"); + _assertSame(ctx.shadowOffsetY, 2, "ctx.shadowOffsetY", "2"); + ctx.shadowOffsetX = 0.5; + ctx.shadowOffsetY = 0.25; + _assertSame(ctx.shadowOffsetX, 0.5, "ctx.shadowOffsetX", "0.5"); + _assertSame(ctx.shadowOffsetY, 0.25, "ctx.shadowOffsetY", "0.25"); + ctx.shadowOffsetX = -0.5; + ctx.shadowOffsetY = -0.25; + _assertSame(ctx.shadowOffsetX, -0.5, "ctx.shadowOffsetX", "-0.5"); + _assertSame(ctx.shadowOffsetY, -0.25, "ctx.shadowOffsetY", "-0.25"); + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; + _assertSame(ctx.shadowOffsetX, 0, "ctx.shadowOffsetX", "0"); + _assertSame(ctx.shadowOffsetY, 0, "ctx.shadowOffsetY", "0"); + ctx.shadowOffsetX = 1e6; + ctx.shadowOffsetY = 1e6; + _assertSame(ctx.shadowOffsetX, 1e6, "ctx.shadowOffsetX", "1e6"); + _assertSame(ctx.shadowOffsetY, 1e6, "ctx.shadowOffsetY", "1e6"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.html index 5fea8a7cf3d..ae046cfe19d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.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'); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = 'rgba(255, 0, 0, 0.5)'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.drawImage(offscreenCanvas2, 0, -50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = 'rgba(255, 0, 0, 0.5)'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.drawImage(offscreenCanvas2, 0, -50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.js index 663e89f2843..21d6309c183 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.alpha.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 = 'rgba(255, 0, 0, 0.5)'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.drawImage(offscreenCanvas2, 0, -50); -_assertPixelApprox(canvas, 50,25, 127,0,127,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 = 'rgba(255, 0, 0, 0.5)'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.drawImage(offscreenCanvas2, 0, -50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.html index 2fc6b547d57..3ba1cf1fb06 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.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'); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.drawImage(offscreenCanvas2, 0, -50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.drawImage(offscreenCanvas2, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.js index 20c433b2f6a..8ec3f4acb3c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.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'); - -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.drawImage(offscreenCanvas2, 0, -50); -_assertPixel(canvas, 50,25, 0,255,0,255); -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 = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.drawImage(offscreenCanvas2, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.html index 1bfcb3bf3b7..960d870923d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.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'); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.drawImage(offscreenCanvas2, 0, -50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.drawImage(offscreenCanvas2, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.js index 413ba6b2438..7fd807bda4e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.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'); - -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.drawImage(offscreenCanvas2, 0, -50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.drawImage(offscreenCanvas2, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.html index 6d30dfcb85b..2f1d31d7066 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.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'); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.drawImage(offscreenCanvas2, 50, -50); -ctx.shadowColor = '#f00'; -ctx.drawImage(offscreenCanvas2, -50, -50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var ctx2 = offscreenCanvas2.getContext('2d'); + ctx2.fillStyle = '#f00'; + ctx2.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.drawImage(offscreenCanvas2, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(offscreenCanvas2, -50, -50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.js index d702ded7463..1347eb095fe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.canvas.transparent.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'); - -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var ctx2 = offscreenCanvas2.getContext('2d'); -ctx2.fillStyle = '#f00'; -ctx2.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.drawImage(offscreenCanvas2, 50, -50); -ctx.shadowColor = '#f00'; -ctx.drawImage(offscreenCanvas2, -50, -50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + 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, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.drawImage(offscreenCanvas2, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(offscreenCanvas2, -50, -50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.html index 4beb1214b24..a762ab5f9f1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.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 = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -ctx.save(); -ctx.beginPath(); -ctx.rect(50, 0, 50, 50); -ctx.clip(); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -ctx.restore(); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.save(); + ctx.beginPath(); + ctx.rect(50, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.js index 4fafad83307..2a6423a8b29 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.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 = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -ctx.save(); -ctx.beginPath(); -ctx.rect(50, 0, 50, 50); -ctx.clip(); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -ctx.restore(); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.save(); + ctx.beginPath(); + ctx.rect(50, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.html index bc3de09db7a..31055d7200d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.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, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.save(); -ctx.beginPath(); -ctx.rect(0, 0, 50, 50); -ctx.clip(); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -ctx.restore(); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.js index dd2712af40c..2c6b8deacd4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.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, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.save(); -ctx.beginPath(); -ctx.rect(0, 0, 50, 50); -ctx.clip(); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -ctx.restore(); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + ctx.restore(); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.html index 9656feb41fb..3b62b233d14 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.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.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.save(); -ctx.beginPath(); -ctx.rect(0, 0, 50, 50); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(-50, 0, 50, 50); -ctx.restore(); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(-50, 0, 50, 50); + ctx.restore(); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.js index ed4983ac8ca..c97f9e5c63a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.clip.3.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.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.save(); -ctx.beginPath(); -ctx.rect(0, 0, 50, 50); -ctx.clip(); -ctx.fillStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(-50, 0, 50, 50); -ctx.restore(); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.save(); + ctx.beginPath(); + ctx.rect(0, 0, 50, 50); + ctx.clip(); + ctx.fillStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(-50, 0, 50, 50); + ctx.restore(); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.html index 13e0daf3aa1..e9a400f1e10 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.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.globalCompositeOperation = 'xor'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.fillStyle = '#0f0'; -ctx.fillRect(-100, 0, 200, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, 0, 200, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.js index 04d4801db90..10baafad47e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.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.globalCompositeOperation = 'xor'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.fillStyle = '#0f0'; -ctx.fillRect(-100, 0, 200, 50); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-100, 0, 200, 50); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.html index aea36997b65..0a4c515bac2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.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.globalCompositeOperation = 'xor'; -ctx.shadowColor = '#f00'; -ctx.shadowBlur = 1; -ctx.fillStyle = '#0f0'; -ctx.fillRect(-10, -10, 120, 70); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 1; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-10, -10, 120, 70); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.js index 505e3d535fa..20c89c1390c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.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.globalCompositeOperation = 'xor'; -ctx.shadowColor = '#f00'; -ctx.shadowBlur = 1; -ctx.fillStyle = '#0f0'; -ctx.fillRect(-10, -10, 120, 70); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'xor'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 1; + ctx.fillStyle = '#0f0'; + ctx.fillRect(-10, -10, 120, 70); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.html index 2218602f38d..56218430ef4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.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.globalCompositeOperation = 'destination-out'; -ctx.shadowColor = '#f00'; -ctx.shadowBlur = 10; -ctx.fillStyle = '#f00'; -ctx.fillRect(200, 0, 100, 50); -_assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 10; + ctx.fillStyle = '#f00'; + ctx.fillRect(200, 0, 100, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.js index fd58d06192e..1257b3f5749 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.composite.3.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.globalCompositeOperation = 'destination-out'; -ctx.shadowColor = '#f00'; -ctx.shadowBlur = 10; -ctx.fillStyle = '#f00'; -ctx.fillRect(200, 0, 100, 50); -_assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); -_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.globalCompositeOperation = 'destination-out'; + ctx.shadowColor = '#f00'; + ctx.shadowBlur = 10; + ctx.fillStyle = '#f00'; + ctx.fillRect(200, 0, 100, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.html index edc4c527b21..a25be8ebcf7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.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.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowBlur = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.js index 85bf21a0861..859ae8b6124 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.blur.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.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowBlur = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowBlur = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html index f0c92820900..de85b7366b5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.html @@ -17,14 +17,14 @@ 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.shadowColor = '#f00'; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.shadowColor = '#f00'; + 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/shadows/2d.shadow.enable.off.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.worker.js index dae0ea648dd..7ccd1351fed 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.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.shadowColor = '#f00'; -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.shadowColor = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.html index 3c27b988c94..a57cb66afff 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.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'); -ctx.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#f00'; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.js index 2f1573ef3fe..e068a7ab54c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.off.2.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 = 'destination-atop'; -ctx.shadowColor = '#f00'; -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.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#f00'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.html index 9107ef25de0..70b0a84dcfe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.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.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.js index d8e7d5039bb..975c621ffa3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.x.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.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.html index 77a79d8457d..df8bcc2ba28 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.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.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.js index 53140b13a96..1dae1000a3d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.enable.y.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.globalCompositeOperation = 'destination-atop'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 0.1; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.globalCompositeOperation = 'destination-atop'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 0.1; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.html index d92a2484408..384838584e0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.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'); -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); -gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); + gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.js index b5b65a00563..65d582dd790 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.alpha.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 gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); -gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(255,0,0,0.5)'); + gradient.addColorStop(1, 'rgba(255,0,0,0.5)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.html index b88281be9a3..c411b64e843 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.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'); -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, '#f00'); -gradient.addColorStop(1, '#f00'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(1, '#f00'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.js index ef9ce712f2b..2630acc1a4c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.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'); - -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, '#f00'); -gradient.addColorStop(1, '#f00'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(1, '#f00'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.html index f71a8b4222a..852d4268fd5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.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'); -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, 'rgba(0,0,0,0)'); -gradient.addColorStop(1, 'rgba(0,0,0,0)'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.js index b60d6f7f593..b08401426af 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.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 gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, 'rgba(0,0,0,0)'); -gradient.addColorStop(1, 'rgba(0,0,0,0)'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.html index d7c560ec463..b2c7967d1a7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.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'); -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, '#f00'); -gradient.addColorStop(0.499, '#f00'); -gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); -gradient.addColorStop(1, 'rgba(0,0,0,0)'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(0.499, '#f00'); + gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.js index 7226b004b80..bc651c594ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.gradient.transparent.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'); - -var gradient = ctx.createLinearGradient(0, 0, 100, 0); -gradient.addColorStop(0, '#f00'); -gradient.addColorStop(0.499, '#f00'); -gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); -gradient.addColorStop(1, 'rgba(0,0,0,0)'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.fillStyle = gradient; -ctx.fillRect(0, -50, 100, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var gradient = ctx.createLinearGradient(0, 0, 100, 0); + gradient.addColorStop(0, '#f00'); + gradient.addColorStop(0.499, '#f00'); + gradient.addColorStop(0.5, 'rgba(0,0,0,0)'); + gradient.addColorStop(1, 'rgba(0,0,0,0)'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = gradient; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html index 5add7eae5ac..6a1372eef3f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.html @@ -17,28 +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.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent50.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, -50); - _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent50.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js index 7a1d99218f1..726c6d985e0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.alpha.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.shadowOffsetY = 50; -ctx.shadowColor = '#00f'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent50.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, -50); - _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent50.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixelApprox(canvas, 50,25, 127,0,127,255, 2); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html index 101cfbab0c1..043988187a8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.html @@ -17,28 +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.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -var promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, -50); - _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + var promise = 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); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js index f1d72def72b..cf8f072b79f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.basic.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.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -var promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, -50); - _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + var promise = 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); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html index c56a73f7366..b53bd89430b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.html @@ -17,30 +17,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.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - 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, -10, -50, 240, 50); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + 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, -10, -50, 240, 50); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js index a8c0ead903b..51db38d150d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.scale.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.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - 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, -10, -50, 240, 50); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + 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, -10, -50, 240, 50); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html index cd095034991..9b04130ae83 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.html @@ -17,30 +17,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.shadowOffsetY = 50; -ctx.shadowColor = '#f00'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#f00'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js index 60e32b48835..e5824d9761d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.section.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.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#f00'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#f00'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, 0, 50, 50, 0, -50, 50, 50); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html index 37844050a95..fef57110557 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.html @@ -17,28 +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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, -50); - _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js index 8e8ded8bd3d..a52914070d1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.1.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.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 0, -50); - _assertPixel(canvas, 50,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 0, -50); + _assertPixel(canvas, 50,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html index 996bce718a3..bdd5c12b59b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.html @@ -17,34 +17,34 @@ 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.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 50, -50); - ctx.shadowColor = '#f00'; - ctx.drawImage(bitmap, -50, -50); - _assertPixel(canvas, 25,25, 0,255,0,255); - _assertPixel(canvas, 50,25, 0,255,0,255); - _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(bitmap, -50, -50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js index 5075d6cfa7e..26e0afc10d3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.image.transparent.2.worker.js @@ -13,34 +13,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 = '#0f0'; -ctx.fillRect(0, 0, 50, 50); -ctx.fillStyle = '#f00'; -ctx.fillRect(50, 0, 50, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - ctx.drawImage(bitmap, 50, -50); - ctx.shadowColor = '#f00'; - ctx.drawImage(bitmap, -50, -50); - _assertPixel(canvas, 25,25, 0,255,0,255); - _assertPixel(canvas, 50,25, 0,255,0,255); - _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#f00'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + ctx.drawImage(bitmap, 50, -50); + ctx.shadowColor = '#f00'; + ctx.drawImage(bitmap, -50, -50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.html index 97c04018ac4..cc0d1adb973 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = -50; -ctx.fillRect(50, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = -50; + ctx.fillRect(50, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.js index 93c226570fb..14c709a2a02 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeX.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = -50; -ctx.fillRect(50, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = -50; + ctx.fillRect(50, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.html index 7f5d5ab9a89..82094cf2f90 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = -25; -ctx.fillRect(0, 25, 100, 25); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = -25; + ctx.fillRect(0, 25, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.js index 6ee0bcc7c5d..036c6154cbe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.negativeY.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = -25; -ctx.fillRect(0, 25, 100, 25); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = -25; + ctx.fillRect(0, 25, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.html index a745de88ab6..7094e98ecf6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.js index 241fbda8f31..176aca45f49 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveX.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 50; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 25,25, 0,255,0,255); -_assertPixel(canvas, 75,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 50; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.html index 168b1796884..75e9b0affad 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 25; -ctx.fillRect(0, 0, 100, 25); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 25; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.js index b3236d66a52..6b4d0c6a214 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.offset.positiveY.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.fillStyle = '#0f0'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 25; -ctx.fillRect(0, 0, 100, 25); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 25; + ctx.fillRect(0, 0, 100, 25); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.html index 207160d20f5..498051465be 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.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.shadowColor = '#0f0'; -ctx.shadowOffsetX = 100; -ctx.fillRect(-100, 0, 25, 50); -ctx.shadowOffsetX = -100; -ctx.fillRect(175, 0, 25, 50); -ctx.shadowOffsetX = 0; -ctx.shadowOffsetY = 100; -ctx.fillRect(25, -100, 50, 25); -ctx.shadowOffsetY = -100; -ctx.fillRect(25, 125, 50, 25); -_assertPixel(canvas, 12,25, 0,255,0,255); -_assertPixel(canvas, 87,25, 0,255,0,255); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.fillRect(-100, 0, 25, 50); + ctx.shadowOffsetX = -100; + ctx.fillRect(175, 0, 25, 50); + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 100; + ctx.fillRect(25, -100, 50, 25); + ctx.shadowOffsetY = -100; + ctx.fillRect(25, 125, 50, 25); + _assertPixel(canvas, 12,25, 0,255,0,255); + _assertPixel(canvas, 87,25, 0,255,0,255); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.worker.js index d0787d67a41..d2a071f4748 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.outside.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.shadowColor = '#0f0'; -ctx.shadowOffsetX = 100; -ctx.fillRect(-100, 0, 25, 50); -ctx.shadowOffsetX = -100; -ctx.fillRect(175, 0, 25, 50); -ctx.shadowOffsetX = 0; -ctx.shadowOffsetY = 100; -ctx.fillRect(25, -100, 50, 25); -ctx.shadowOffsetY = -100; -ctx.fillRect(25, 125, 50, 25); -_assertPixel(canvas, 12,25, 0,255,0,255); -_assertPixel(canvas, 87,25, 0,255,0,255); -_assertPixel(canvas, 50,12, 0,255,0,255); -_assertPixel(canvas, 50,37, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.fillRect(-100, 0, 25, 50); + ctx.shadowOffsetX = -100; + ctx.fillRect(175, 0, 25, 50); + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 100; + ctx.fillRect(25, -100, 50, 25); + ctx.shadowOffsetY = -100; + ctx.fillRect(25, 125, 50, 25); + _assertPixel(canvas, 12,25, 0,255,0,255); + _assertPixel(canvas, 87,25, 0,255,0,255); + _assertPixel(canvas, 50,12, 0,255,0,255); + _assertPixel(canvas, 50,37, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html index 48615eadcfe..f2aebf795e6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.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'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent50.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#00f'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - }, t_fail); -}).then(t_pass, t_fail); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent50.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js index 6a533845ab2..2dfa1040941 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.alpha.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 promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent50.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#00f'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent50.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#00f'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html index 586f7ef3360..b26e476ca03 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.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'); -var promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#0f0'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - }, t_fail); -}).then(t_pass, t_fail); + var promise = 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); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js index 6d2dce7c1b6..f972db853a5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.basic.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 promise = 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); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#0f0'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = 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); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html index 6d97b590afe..62dd7ad20f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.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'); -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#f00'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - }, t_fail); -}).then(t_pass, t_fail); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js index cda0aa956d5..120c5e4580f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.1.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 promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/transparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.shadowColor = '#f00'; - ctx.shadowOffsetY = 50; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/transparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html index 600fbd03ff7..423f0642d5e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.html @@ -17,34 +17,34 @@ 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 promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(50, 0, 50, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#0f0'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - _assertPixel(canvas, 25,25, 0,255,0,255); - _assertPixel(canvas, 50,25, 0,255,0,255); - _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js index 2aa31661469..ef8313a85c4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.pattern.transparent.2.worker.js @@ -13,34 +13,33 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -var promise = new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open("GET", '/images/redtransparent.png'); - xhr.responseType = 'blob'; - xhr.send(); - xhr.onload = function() { - resolve(xhr.response); - }; -}); -promise.then(function(response) { - createImageBitmap(response).then(bitmap => { - var pattern = ctx.createPattern(bitmap, 'repeat'); - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 50, 50); - ctx.fillStyle = '#0f0'; - ctx.fillRect(50, 0, 50, 50); - ctx.shadowOffsetY = 50; - ctx.shadowColor = '#0f0'; - ctx.fillStyle = pattern; - ctx.fillRect(0, -50, 100, 50); - _assertPixel(canvas, 25,25, 0,255,0,255); - _assertPixel(canvas, 50,25, 0,255,0,255); - _assertPixel(canvas, 75,25, 0,255,0,255); - }, t_fail); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var promise = new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open("GET", '/images/redtransparent.png'); + xhr.responseType = 'blob'; + xhr.send(); + xhr.onload = function() { + resolve(xhr.response); + }; + }); + promise.then(function(response) { + createImageBitmap(response).then(bitmap => { + var pattern = ctx.createPattern(bitmap, 'repeat'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.fillStyle = pattern; + ctx.fillRect(0, -50, 100, 50); + _assertPixel(canvas, 25,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 75,25, 0,255,0,255); + }, t_fail); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.html index 27110251346..27edc8750ba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.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 = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.moveTo(0, -25); -ctx.lineTo(100, -25); -ctx.stroke(); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.moveTo(0, -25); + ctx.lineTo(100, -25); + ctx.stroke(); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.js index 7ebbd8ec5b4..b62e6c75e56 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.basic.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 = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.moveTo(0, -25); -ctx.lineTo(100, -25); -ctx.stroke(); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.moveTo(0, -25); + ctx.lineTo(100, -25); + ctx.stroke(); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.html index 3854669bf0c..46f915b73e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.lineCap = 'butt'; -ctx.moveTo(-50, -25); -ctx.lineTo(0, -25); -ctx.moveTo(100, -25); -ctx.lineTo(150, -25); -ctx.stroke(); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'butt'; + ctx.moveTo(-50, -25); + ctx.lineTo(0, -25); + ctx.moveTo(100, -25); + ctx.lineTo(150, -25); + ctx.stroke(); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.js index 7ecd07b1cda..21c588ac299 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.1.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, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.lineCap = 'butt'; -ctx.moveTo(-50, -25); -ctx.lineTo(0, -25); -ctx.moveTo(100, -25); -ctx.lineTo(150, -25); -ctx.stroke(); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'butt'; + ctx.moveTo(-50, -25); + ctx.lineTo(0, -25); + ctx.moveTo(100, -25); + ctx.lineTo(150, -25); + ctx.stroke(); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.html index bd18ec6f8cb..91bfd80d2b1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.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.strokeStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.lineCap = 'square'; -ctx.moveTo(25, -25); -ctx.lineTo(75, -25); -ctx.stroke(); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'square'; + ctx.moveTo(25, -25); + ctx.lineTo(75, -25); + ctx.stroke(); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.js index 7c7dc26dd92..aa607cd6efc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.cap.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.strokeStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetY = 50; -ctx.beginPath(); -ctx.lineWidth = 50; -ctx.lineCap = 'square'; -ctx.moveTo(25, -25); -ctx.lineTo(75, -25); -ctx.stroke(); -_assertPixel(canvas, 1,25, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetY = 50; + ctx.beginPath(); + ctx.lineWidth = 50; + ctx.lineCap = 'square'; + ctx.moveTo(25, -25); + ctx.lineTo(75, -25); + ctx.stroke(); + _assertPixel(canvas, 1,25, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.html index 8faa2fef082..1a57acb5f37 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'bevel'; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); -ctx.stroke(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'bevel'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.js index e81a9b212d4..8628fd993bd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.1.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, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'bevel'; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); -ctx.stroke(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'bevel'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html index 7b52a7c9508..394226c0ed5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.html @@ -17,28 +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, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'miter'; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); -ctx.stroke(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.js index 269a49d76cd..06bcbd2c48a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.2.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, 50, 50); -ctx.fillStyle = '#0f0'; -ctx.fillRect(50, 0, 50, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#0f0'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'miter'; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); -ctx.stroke(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + ctx.fillStyle = '#0f0'; + ctx.fillRect(50, 0, 50, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#0f0'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html index 6110d3ae40c..2bf7d3dbc1b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.html @@ -17,27 +17,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 = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'miter'; -ctx.miterLimit = 0.1; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) -ctx.stroke(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 0.1; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.js index 43144b0fd9b..5c52537a31e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.stroke.join.3.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.strokeStyle = '#f00'; -ctx.shadowColor = '#f00'; -ctx.shadowOffsetX = 100; -ctx.lineWidth = 200; -ctx.lineJoin = 'miter'; -ctx.miterLimit = 0.1; -ctx.beginPath(); -ctx.moveTo(-200, -50); -ctx.lineTo(-150, -50); -ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) -ctx.stroke(); -_assertPixel(canvas, 1,1, 0,255,0,255); -_assertPixel(canvas, 48,48, 0,255,0,255); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 98,48, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#f00'; + ctx.shadowColor = '#f00'; + ctx.shadowOffsetX = 100; + ctx.lineWidth = 200; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 0.1; + ctx.beginPath(); + ctx.moveTo(-200, -50); + ctx.lineTo(-150, -50); + ctx.lineTo(-151, -100); // (not an exact right angle, to avoid some other bug in Firefox 3) + ctx.stroke(); + _assertPixel(canvas, 1,1, 0,255,0,255); + _assertPixel(canvas, 48,48, 0,255,0,255); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 98,48, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.html index d6c4e483ba5..3fefcfc087a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.translate(100, 100); -ctx.fillRect(-100, -150, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.translate(100, 100); + ctx.fillRect(-100, -150, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.js index 38cdf7eb7cf..6227d8487f6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.1.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); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.translate(100, 100); -ctx.fillRect(-100, -150, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.translate(100, 100); + ctx.fillRect(-100, -150, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.html index f0b1607262d..a4ba056c759 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.rotate(Math.PI) -ctx.fillRect(-100, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.rotate(Math.PI) + ctx.fillRect(-100, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.js index 9f204d24393..32c322af916 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/shadows/2d.shadow.transform.2.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); -ctx.shadowOffsetY = 50; -ctx.shadowColor = '#0f0'; -ctx.rotate(Math.PI) -ctx.fillRect(-100, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.shadowOffsetY = 50; + ctx.shadowColor = '#0f0'; + ctx.rotate(Math.PI) + ctx.fillRect(-100, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.default.html index fda5ee496d1..7af2c772f06 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.default.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.textAlign, 'start', "ctx.textAlign", "'start'"); -t.done(); + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.default.worker.js index b2c940fac61..adee16c0625 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.default.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.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.textAlign, 'start', "ctx.textAlign", "'start'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.html index 8b6f409a3dc..a7679d656ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.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.textAlign = 'start'; -ctx.textAlign = 'bogus'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'bogus'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'start'; -ctx.textAlign = 'END'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'END'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'start'; -ctx.textAlign = 'end '; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'end '; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'start'; -ctx.textAlign = 'end\0'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -t.done(); + ctx.textAlign = 'start'; + ctx.textAlign = 'end\0'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.worker.js index 60ad8faac95..dfd4c662568 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.invalid.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.textAlign = 'start'; -ctx.textAlign = 'bogus'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'bogus'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'start'; -ctx.textAlign = 'END'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'END'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'start'; -ctx.textAlign = 'end '; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); - -ctx.textAlign = 'start'; -ctx.textAlign = 'end\0'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -t.done(); + ctx.textAlign = 'start'; + ctx.textAlign = 'end '; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + ctx.textAlign = 'end\0'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.html index a78b58edaa5..eef6b29633d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.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.textAlign = 'start'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'end'; -_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'"); + ctx.textAlign = 'end'; + _assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'"); -ctx.textAlign = 'left'; -_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'"); + ctx.textAlign = 'left'; + _assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'"); -ctx.textAlign = 'right'; -_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'"); + ctx.textAlign = 'right'; + _assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'"); -ctx.textAlign = 'center'; -_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'"); -t.done(); + ctx.textAlign = 'center'; + _assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.worker.js index fdf1907585b..767d6425e72 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.align.valid.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.textAlign = 'start'; -_assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); + ctx.textAlign = 'start'; + _assertSame(ctx.textAlign, 'start', "ctx.textAlign", "'start'"); -ctx.textAlign = 'end'; -_assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'"); + ctx.textAlign = 'end'; + _assertSame(ctx.textAlign, 'end', "ctx.textAlign", "'end'"); -ctx.textAlign = 'left'; -_assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'"); + ctx.textAlign = 'left'; + _assertSame(ctx.textAlign, 'left', "ctx.textAlign", "'left'"); -ctx.textAlign = 'right'; -_assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'"); - -ctx.textAlign = 'center'; -_assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'"); -t.done(); + ctx.textAlign = 'right'; + _assertSame(ctx.textAlign, 'right', "ctx.textAlign", "'right'"); + ctx.textAlign = 'center'; + _assertSame(ctx.textAlign, 'center', "ctx.textAlign", "'center'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.default.html index 8bd20c6f84a..525a02ff9b0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.default.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.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); -t.done(); + _assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.default.worker.js index ea8693f0a06..667adb8c515 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.default.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.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.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.html index a850ac146f2..f30fad63b55 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.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.textBaseline = 'top'; -ctx.textBaseline = 'bogus'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'bogus'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'top'; -ctx.textBaseline = 'MIDDLE'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'MIDDLE'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'top'; -ctx.textBaseline = 'middle '; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle '; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'top'; -ctx.textBaseline = 'middle\0'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -t.done(); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle\0'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.worker.js index d4cdc858b2f..4310f81fba0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.invalid.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.textBaseline = 'top'; -ctx.textBaseline = 'bogus'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'bogus'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'top'; -ctx.textBaseline = 'MIDDLE'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'MIDDLE'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'top'; -ctx.textBaseline = 'middle '; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); - -ctx.textBaseline = 'top'; -ctx.textBaseline = 'middle\0'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -t.done(); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle '; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + ctx.textBaseline = 'middle\0'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.html index 8fdc0588448..9ff843c19fb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.html @@ -17,27 +17,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.textBaseline = 'top'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'hanging'; -_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'"); + ctx.textBaseline = 'hanging'; + _assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'"); -ctx.textBaseline = 'middle'; -_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'"); + ctx.textBaseline = 'middle'; + _assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'"); -ctx.textBaseline = 'alphabetic'; -_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); + ctx.textBaseline = 'alphabetic'; + _assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); -ctx.textBaseline = 'ideographic'; -_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'"); + ctx.textBaseline = 'ideographic'; + _assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'"); -ctx.textBaseline = 'bottom'; -_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'"); -t.done(); + ctx.textBaseline = 'bottom'; + _assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.worker.js index 62f6983ddb7..2f422f58a8c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.baseline.valid.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -ctx.textBaseline = 'top'; -_assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); + ctx.textBaseline = 'top'; + _assertSame(ctx.textBaseline, 'top', "ctx.textBaseline", "'top'"); -ctx.textBaseline = 'hanging'; -_assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'"); + ctx.textBaseline = 'hanging'; + _assertSame(ctx.textBaseline, 'hanging', "ctx.textBaseline", "'hanging'"); -ctx.textBaseline = 'middle'; -_assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'"); + ctx.textBaseline = 'middle'; + _assertSame(ctx.textBaseline, 'middle', "ctx.textBaseline", "'middle'"); -ctx.textBaseline = 'alphabetic'; -_assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); + ctx.textBaseline = 'alphabetic'; + _assertSame(ctx.textBaseline, 'alphabetic', "ctx.textBaseline", "'alphabetic'"); -ctx.textBaseline = 'ideographic'; -_assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'"); - -ctx.textBaseline = 'bottom'; -_assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'"); -t.done(); + ctx.textBaseline = 'ideographic'; + _assertSame(ctx.textBaseline, 'ideographic', "ctx.textBaseline", "'ideographic'"); + ctx.textBaseline = 'bottom'; + _assertSame(ctx.textBaseline, 'bottom', "ctx.textBaseline", "'bottom'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.html index 438e6756a06..f855930f302 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'center'; - ctx.fillText('DD', 50, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'center'; + ctx.fillText('DD', 50, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js index 9487e6ab8eb..a24b839d2f8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.center.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'center'; - ctx.fillText('DD', 50, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'center'; + ctx.fillText('DD', 50, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html index 6134042bdc9..ae69277be74 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.html @@ -17,28 +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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'end'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js index 2a7b9e9418c..64dc013b444 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.ltr.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'end'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html index a4b502480ae..cabc85e5594 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.html @@ -17,28 +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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'rtl'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'end'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'rtl'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js index deb8227ec43..b177d0e9617 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.end.rtl.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'rtl'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'end'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'rtl'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'end'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.html index 6e69a830a4c..0166b9b309d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'left'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'left'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js index 9c555126537..be8a4e188e2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.left.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'left'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'left'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.html index a56c7cab1d1..011f6dccd9c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'right'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js index f246963f606..43f00dcb95c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.right.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'right'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html index ba8c440c43b..b15fb4c0481 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.html @@ -17,28 +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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'start'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js index 2de9d50fabb..a3204938c0a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.ltr.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'start'; - ctx.fillText('DD', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html index 32f83430e09..c8a0de20b67 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.html @@ -17,28 +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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'rtl'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'start'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'rtl'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js index 41cb57b9587..ad03dd5c469 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.align.start.rtl.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'rtl'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'start'; - ctx.fillText('DD', 100, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'rtl'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'start'; + ctx.fillText('DD', 100, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html index bd6a1804a53..6cb550fde7a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'alphabetic'; - ctx.fillText('CC', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'alphabetic'; + ctx.fillText('CC', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js index 5b4fe08b130..ed2c3f88b02 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.alphabetic.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'alphabetic'; - ctx.fillText('CC', 0, 37.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'alphabetic'; + ctx.fillText('CC', 0, 37.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html index 4e5fc8e3464..398b4a9b0a5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'bottom'; - ctx.fillText('CC', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'bottom'; + ctx.fillText('CC', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js index 1c7cab3ef99..727376391f7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.bottom.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'bottom'; - ctx.fillText('CC', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'bottom'; + ctx.fillText('CC', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html index d0d573790db..0b822834328 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, 12.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'hanging'; + ctx.fillText('CC', 0, 12.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js index 79df7d8e484..fca74d69381 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.hanging.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'hanging'; - ctx.fillText('CC', 0, 12.5); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'hanging'; + ctx.fillText('CC', 0, 12.5); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html index 144d56f784d..c996444b860 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 31.25); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'ideographic'; + ctx.fillText('CC', 0, 31.25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js index ef7d0180cda..0ffa6fe299a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.ideographic.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'ideographic'; - ctx.fillText('CC', 0, 31.25); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'ideographic'; + ctx.fillText('CC', 0, 31.25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html index 3072264bb4a..911da8bef2c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'middle'; - ctx.fillText('CC', 0, 25); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'middle'; + ctx.fillText('CC', 0, 25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js index a0509b6711c..eeb32eafc11 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.middle.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'middle'; - ctx.fillText('CC', 0, 25); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'middle'; + ctx.fillText('CC', 0, 25); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html index a077aff348f..56b5bb7d83c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.html @@ -17,27 +17,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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'top'; - ctx.fillText('CC', 0, 0); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'top'; + ctx.fillText('CC', 0, 0); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js index bbc7fc06a31..d4341c6900a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.baseline.top.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textBaseline = 'top'; - ctx.fillText('CC', 0, 0); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textBaseline = 'top'; + ctx.fillText('CC', 0, 0); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 5,45, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,45, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.html index 5c364f58a66..af1cb9d94a3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.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 = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.strokeStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('PASS', 5, 35); -t.done(); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('PASS', 5, 35); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.worker.js index b75be08977d..ef00236fbb4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.basic-manual.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 = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.strokeStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('PASS', 5, 35); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('PASS', 5, 35); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.html index 4bef0e3d70a..8f22b9f0930 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.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.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, NaN); -_assertGreen(ctx, 100, 50); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, NaN); + _assertGreen(ctx, 100, 50); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.js index 32a673f4955..fd1dff136e9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.NaN.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.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, NaN); -_assertGreen(ctx, 100, 50); -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.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, NaN); + _assertGreen(ctx, 100, 50); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.html index 63b30966f4a..ae21607af95 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('DD', 0, 37.5, 100); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('DD', 0, 37.5, 100); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js index 092289baf4a..240bffeed41 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.bound.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('DD', 0, 37.5, 100); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('DD', 0, 37.5, 100); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.html index 9294bf99736..259fdc738ac 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#f00'; - ctx.fillText('EEEE', -50, 37.5, 40); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillText('EEEE', -50, 37.5, 40); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js index 99cc25e7aee..7aa3f470f5f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.fontface.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#0f0'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#f00'; - ctx.fillText('EEEE', -50, 37.5, 40); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.fillText('EEEE', -50, 37.5, 40); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.html index 838b3f83eea..7a0cf11b394 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.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'); -ctx.fillStyle = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('PASS', 5, 35, 200); -t.done(); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('PASS', 5, 35, 200); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.worker.js index e124b08ebce..3e200e89eda 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.large-manual.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 = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('PASS', 5, 35, 200); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('PASS', 5, 35, 200); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.html index 9d06556736c..4411fbfced6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.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'); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, -1); -_assertGreen(ctx, 100, 50); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, -1); + _assertGreen(ctx, 100, 50); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.js index bf852bc54d5..50076b524c1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.negative.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.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'); - -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, -1); -_assertGreen(ctx, 100, 50); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, -1); + _assertGreen(ctx, 100, 50); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.html index 37c137eab55..94988fc92eb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.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.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', -100, 35, 90); -_assertGreen(ctx, 100, 50); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', -100, 35, 90); + _assertGreen(ctx, 100, 50); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.js index 44cf210e1e5..5d5ef4e3917 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.small.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.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', -100, 35, 90); -_assertGreen(ctx, 100, 50); -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.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', -100, 35, 90); + _assertGreen(ctx, 100, 50); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html index c5bec91f9da..0056d75126c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.html @@ -18,16 +18,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.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, 0); -_assertGreen(ctx, 100, 50); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, 0); + _assertGreen(ctx, 100, 50); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js index 6701f5b8dc3..65e67cce2c7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.maxWidth.zero.worker.js @@ -14,16 +14,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.fillStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('fail fail fail fail fail', 5, 35, 0); -_assertGreen(ctx, 100, 50); -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.font = '35px Arial, sans-serif'; + ctx.fillText('fail fail fail fail fail', 5, 35, 0); + _assertGreen(ctx, 100, 50); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.html index 7363d734ccf..98e329b0546 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.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 = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.strokeStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35); -t.done(); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.worker.js index f52a0cc617e..ee24a0450fb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.rtl-manual.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 = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = '#0f0'; -ctx.strokeStyle = '#f00'; -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.strokeStyle = '#f00'; + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('\u202eFAIL \xa0 \xa0 SSAP', 5, 35); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.html index e620ae1a181..7124c6eafd2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.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.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); -ctx.moveTo(0, 0); -ctx.lineTo(100, 0); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('FAIL', 5, 35); + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('FAIL', 5, 35); -ctx.lineTo(100, 50); -ctx.lineTo(0, 50); -ctx.fillStyle = '#0f0'; -ctx.fill(); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 5,45, 0,255,0,255); -t.done(); + _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/text/2d.text.draw.fill.unaffected.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.worker.js index 9640bad6c9a..0e250286d49 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.unaffected.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fill.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'); + 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.moveTo(0, 0); -ctx.lineTo(100, 0); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); -ctx.font = '35px Arial, sans-serif'; -ctx.fillText('FAIL', 5, 35); + ctx.font = '35px Arial, sans-serif'; + ctx.fillText('FAIL', 5, 35); -ctx.lineTo(100, 50); -ctx.lineTo(0, 50); -ctx.fillStyle = '#0f0'; -ctx.fill(); - -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 5,45, 0,255,0,255); -t.done(); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.html index d2c65e8bb2b..f8d9085f55b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '67px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.html index f390700ea0c..da552d11cc9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '67px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js index 8efab418a87..3bfb0be8188 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.notinpage.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '67px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.html index 3766ab69890..3a14462bcd6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.font = '67px CanvasTest'; - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js index 756e844709b..f2210a3239e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.repeat.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.font = '67px CanvasTest'; - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js index 45f18317b09..1c7e727c5ea 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.fontface.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '67px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('AA', 0, 50); - _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '67px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('AA', 0, 50); + _assertPixelApprox(canvas, 5,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 95,5, 0,255,0,255, 2); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.html index e8ee39c655e..de456a2b961 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.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.fillStyle = '#f00'; -ctx.strokeStyle = '#0f0'; -ctx.lineWidth = 3; -ctx.font = '20px Arial, sans-serif'; -ctx.fillText('VAVAVAVAVAVAVA', -50, 25); -ctx.fillText('ToToToToToToTo', -50, 45); -ctx.strokeText('VAVAVAVAVAVAVA', -50, 25); -ctx.strokeText('ToToToToToToTo', -50, 45); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 3; + ctx.font = '20px Arial, sans-serif'; + ctx.fillText('VAVAVAVAVAVAVA', -50, 25); + ctx.fillText('ToToToToToToTo', -50, 45); + ctx.strokeText('VAVAVAVAVAVAVA', -50, 25); + ctx.strokeText('ToToToToToToTo', -50, 45); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.worker.js index 464cab3ea57..0d1c9470eee 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.kern.consistent-manual.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.fillStyle = '#f00'; -ctx.strokeStyle = '#0f0'; -ctx.lineWidth = 3; -ctx.font = '20px Arial, sans-serif'; -ctx.fillText('VAVAVAVAVAVAVA', -50, 25); -ctx.fillText('ToToToToToToTo', -50, 45); -ctx.strokeText('VAVAVAVAVAVAVA', -50, 25); -ctx.strokeText('ToToToToToToTo', -50, 45); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#f00'; + ctx.strokeStyle = '#0f0'; + ctx.lineWidth = 3; + ctx.font = '20px Arial, sans-serif'; + ctx.fillText('VAVAVAVAVAVAVA', -50, 25); + ctx.fillText('ToToToToToToTo', -50, 45); + ctx.strokeText('VAVAVAVAVAVAVA', -50, 25); + ctx.strokeText('ToToToToToToTo', -50, 45); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.html index 4bc03bb4adb..fa2fa86c36e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E EE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js index 39c00846e92..75cacf9ca28 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.basic.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E EE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.html index 58fb292e132..9215203eaa7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'right'; - ctx.fillText('EE ', 100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('EE ', 100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js index 81f85baff0b..f910b274bd4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.end.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'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.textAlign = 'right'; - ctx.fillText('EE ', 100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.textAlign = 'right'; + ctx.fillText('EE ', 100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.html index f018dc14658..18289e51edf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E\x0b EE', -150, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E\x0b EE', -150, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js index cbc98034878..2aa7f67a575 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.nonspace.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E\x0b EE', -150, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E\x0b EE', -150, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.html index 0a6bb09c07e..a0cc560f507 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js index e13b87a531f..12edf7f7e7f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.other.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dEE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.html index 3308cc75982..240ba7460c4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E EE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js index 4ea78a24664..3ce5ef88f73 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.space.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText('E EE', -100, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText('E EE', -100, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.html index 94b3f9ff0b0..43fa32f8aeb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText(' EE', 0, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText(' EE', 0, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js index 20bd10ae57f..2f742ac2b67 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.space.collapse.start.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.fillStyle = '#f00'; - ctx.fillRect(0, 0, 100, 50); - ctx.fillStyle = '#0f0'; - ctx.fillText(' EE', 0, 37.5); - _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); - _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); - }).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = '#0f0'; + ctx.fillText(' EE', 0, 37.5); + _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2); + _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.html index 5aee6afc0d0..62ac8884cb4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.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 = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#0f0'; -ctx.fillStyle = '#f00'; -ctx.lineWidth = 1; -ctx.font = '35px Arial, sans-serif'; -ctx.strokeText('PASS', 5, 35); -t.done(); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.fillStyle = '#f00'; + ctx.lineWidth = 1; + ctx.font = '35px Arial, sans-serif'; + ctx.strokeText('PASS', 5, 35); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.worker.js index 8806e011eab..33d6e32467e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.basic-manual.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 = '#000'; -ctx.fillRect(0, 0, 100, 50); -ctx.strokeStyle = '#0f0'; -ctx.fillStyle = '#f00'; -ctx.lineWidth = 1; -ctx.font = '35px Arial, sans-serif'; -ctx.strokeText('PASS', 5, 35); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#000'; + ctx.fillRect(0, 0, 100, 50); + ctx.strokeStyle = '#0f0'; + ctx.fillStyle = '#f00'; + ctx.lineWidth = 1; + ctx.font = '35px Arial, sans-serif'; + ctx.strokeText('PASS', 5, 35); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html index 7cad996cc04..76afc1b0063 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.html @@ -17,27 +17,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.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); -ctx.moveTo(0, 0); -ctx.lineTo(100, 0); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); -ctx.font = '35px Arial, sans-serif'; -ctx.strokeStyle = '#f00'; -ctx.strokeText('FAIL', 5, 35); + ctx.font = '35px Arial, sans-serif'; + ctx.strokeStyle = '#f00'; + ctx.strokeText('FAIL', 5, 35); -ctx.lineTo(100, 50); -ctx.lineTo(0, 50); -ctx.fillStyle = '#0f0'; -ctx.fill(); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 5,45, 0,255,0,255); -t.done(); + _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/text/2d.text.draw.stroke.unaffected.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.worker.js index 7ce3b1adc72..15c3b617004 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.draw.stroke.unaffected.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'); + 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.moveTo(0, 0); -ctx.lineTo(100, 0); + ctx.moveTo(0, 0); + ctx.lineTo(100, 0); -ctx.font = '35px Arial, sans-serif'; -ctx.strokeStyle = '#f00'; -ctx.strokeText('FAIL', 5, 35); + ctx.font = '35px Arial, sans-serif'; + ctx.strokeStyle = '#f00'; + ctx.strokeText('FAIL', 5, 35); -ctx.lineTo(100, 50); -ctx.lineTo(0, 50); -ctx.fillStyle = '#0f0'; -ctx.fill(); - -_assertPixel(canvas, 50,25, 0,255,0,255); -_assertPixel(canvas, 5,45, 0,255,0,255); -t.done(); + ctx.lineTo(100, 50); + ctx.lineTo(0, 50); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + _assertPixel(canvas, 5,45, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.html index 30e12f31bba..23f353513bf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.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'); -_assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); -ctx.fontKerning = "normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -width_normal = ctx.measureText("TAWATAVA").width; -ctx.fontKerning = "none"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -width_none = ctx.measureText("TAWATAVA").width; -_assert(width_normal < width_none, "width_normal < width_none"); -t.done(); + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + width_normal = ctx.measureText("TAWATAVA").width; + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + width_none = ctx.measureText("TAWATAVA").width; + _assert(width_normal < width_none, "width_normal < width_none"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html index a9a5ae23f5d..380d8e7212f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.html @@ -17,40 +17,40 @@ 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.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); -ctx.fontKerning = "Normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "noRmal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "NoRMal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "NORMAL"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "Normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "noRmal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NoRMal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NORMAL"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "None"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "none"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "nOne"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "nonE"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "NONE"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -t.done(); + ctx.fontKerning = "None"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "nOne"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "nonE"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NONE"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.js index a8837374e01..afce6c3955c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.with.uppercase.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -_assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); -ctx.fontKerning = "Normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "noRmal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "NoRMal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "NORMAL"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); - -ctx.fontKerning = "None"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "none"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "nOne"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "nonE"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -ctx.fontKerning = "auto"; -ctx.fontKerning = "NONE"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -t.done(); + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "Normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "noRmal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NoRMal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NORMAL"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + ctx.fontKerning = "None"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "nOne"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "nonE"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + ctx.fontKerning = "auto"; + ctx.fontKerning = "NONE"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.js index 9478eece85e..ec64214c7fe 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontKerning.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'); - -_assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); -ctx.fontKerning = "normal"; -_assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); -width_normal = ctx.measureText("TAWATAVA").width; -ctx.fontKerning = "none"; -_assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); -width_none = ctx.measureText("TAWATAVA").width; -_assert(width_normal < width_none, "width_normal < width_none"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.fontKerning, "auto", "ctx.fontKerning", "\"auto\""); + ctx.fontKerning = "normal"; + _assertSame(ctx.fontKerning, "normal", "ctx.fontKerning", "\"normal\""); + width_normal = ctx.measureText("TAWATAVA").width; + ctx.fontKerning = "none"; + _assertSame(ctx.fontKerning, "none", "ctx.fontKerning", "\"none\""); + width_none = ctx.measureText("TAWATAVA").width; + _assert(width_normal < width_none, "width_normal < width_none"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.html index 08c48f1bcda..5ed17baf956 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.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'); -// Setting fontVariantCaps with lower cases -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + // Setting fontVariantCaps with lower cases + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "normal"; -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + ctx.fontVariantCaps = "normal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "small-caps"; -_assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); + ctx.fontVariantCaps = "small-caps"; + _assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); -ctx.fontVariantCaps = "all-small-caps"; -_assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); + ctx.fontVariantCaps = "all-small-caps"; + _assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); -ctx.fontVariantCaps = "petite-caps"; -_assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); + ctx.fontVariantCaps = "petite-caps"; + _assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); -ctx.fontVariantCaps = "all-petite-caps"; -_assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); + ctx.fontVariantCaps = "all-petite-caps"; + _assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); -ctx.fontVariantCaps = "unicase"; -_assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); + ctx.fontVariantCaps = "unicase"; + _assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); -ctx.fontVariantCaps = "titling-caps"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + ctx.fontVariantCaps = "titling-caps"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); -// Setting fontVariantCaps with lower cases and upper cases word. -ctx.fontVariantCaps = "nORmal"; -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + // Setting fontVariantCaps with lower cases and upper cases word. + ctx.fontVariantCaps = "nORmal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "smaLL-caps"; -_assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); + ctx.fontVariantCaps = "smaLL-caps"; + _assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); -ctx.fontVariantCaps = "all-small-CAPS"; -_assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); + ctx.fontVariantCaps = "all-small-CAPS"; + _assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); -ctx.fontVariantCaps = "pEtitE-caps"; -_assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); + ctx.fontVariantCaps = "pEtitE-caps"; + _assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); -ctx.fontVariantCaps = "All-Petite-Caps"; -_assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); + ctx.fontVariantCaps = "All-Petite-Caps"; + _assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); -ctx.fontVariantCaps = "uNIcase"; -_assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); + ctx.fontVariantCaps = "uNIcase"; + _assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); -ctx.fontVariantCaps = "titling-CAPS"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + ctx.fontVariantCaps = "titling-CAPS"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); -// Setting fontVariantCaps with non-existing font variant. -ctx.fontVariantCaps = "abcd"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); -t.done(); + // Setting fontVariantCaps with non-existing font variant. + ctx.fontVariantCaps = "abcd"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.js index d4e9307bef0..9486b8ae1a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.fontVariant.settings.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -// Setting fontVariantCaps with lower cases -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + // Setting fontVariantCaps with lower cases + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "normal"; -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + ctx.fontVariantCaps = "normal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "small-caps"; -_assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); + ctx.fontVariantCaps = "small-caps"; + _assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); -ctx.fontVariantCaps = "all-small-caps"; -_assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); + ctx.fontVariantCaps = "all-small-caps"; + _assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); -ctx.fontVariantCaps = "petite-caps"; -_assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); + ctx.fontVariantCaps = "petite-caps"; + _assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); -ctx.fontVariantCaps = "all-petite-caps"; -_assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); + ctx.fontVariantCaps = "all-petite-caps"; + _assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); -ctx.fontVariantCaps = "unicase"; -_assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); + ctx.fontVariantCaps = "unicase"; + _assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); -ctx.fontVariantCaps = "titling-caps"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + ctx.fontVariantCaps = "titling-caps"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); -// Setting fontVariantCaps with lower cases and upper cases word. -ctx.fontVariantCaps = "nORmal"; -_assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); + // Setting fontVariantCaps with lower cases and upper cases word. + ctx.fontVariantCaps = "nORmal"; + _assertSame(ctx.fontVariantCaps, "normal", "ctx.fontVariantCaps", "\"normal\""); -ctx.fontVariantCaps = "smaLL-caps"; -_assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); + ctx.fontVariantCaps = "smaLL-caps"; + _assertSame(ctx.fontVariantCaps, "small-caps", "ctx.fontVariantCaps", "\"small-caps\""); -ctx.fontVariantCaps = "all-small-CAPS"; -_assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); + ctx.fontVariantCaps = "all-small-CAPS"; + _assertSame(ctx.fontVariantCaps, "all-small-caps", "ctx.fontVariantCaps", "\"all-small-caps\""); -ctx.fontVariantCaps = "pEtitE-caps"; -_assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); + ctx.fontVariantCaps = "pEtitE-caps"; + _assertSame(ctx.fontVariantCaps, "petite-caps", "ctx.fontVariantCaps", "\"petite-caps\""); -ctx.fontVariantCaps = "All-Petite-Caps"; -_assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); + ctx.fontVariantCaps = "All-Petite-Caps"; + _assertSame(ctx.fontVariantCaps, "all-petite-caps", "ctx.fontVariantCaps", "\"all-petite-caps\""); -ctx.fontVariantCaps = "uNIcase"; -_assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); + ctx.fontVariantCaps = "uNIcase"; + _assertSame(ctx.fontVariantCaps, "unicase", "ctx.fontVariantCaps", "\"unicase\""); -ctx.fontVariantCaps = "titling-CAPS"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); - -// Setting fontVariantCaps with non-existing font variant. -ctx.fontVariantCaps = "abcd"; -_assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); -t.done(); + ctx.fontVariantCaps = "titling-CAPS"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + // Setting fontVariantCaps with non-existing font variant. + ctx.fontVariantCaps = "abcd"; + _assertSame(ctx.fontVariantCaps, "titling-caps", "ctx.fontVariantCaps", "\"titling-caps\""); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html index 5030055567a..3a99352295c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.html @@ -17,28 +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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -function test_word_spacing(value) { - ctx.wordSpacing = value; - ctx.letterSpacing = value; - _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -} -test_word_spacing('0s'); -test_word_spacing('1min'); -test_word_spacing('1deg'); -test_word_spacing('1pp'); -test_word_spacing('initial'); -test_word_spacing('inherit'); -test_word_spacing('normal'); -test_word_spacing('none'); - -t.done(); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing('0s'); + test_word_spacing('1min'); + test_word_spacing('1deg'); + test_word_spacing('1pp'); + test_word_spacing('initial'); + test_word_spacing('inherit'); + test_word_spacing('normal'); + test_word_spacing('none'); + + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.js index e4b090cc765..271858500e9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.invalid.spacing.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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -function test_word_spacing(value) { - ctx.wordSpacing = value; - ctx.letterSpacing = value; - _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -} -test_word_spacing('0s'); -test_word_spacing('1min'); -test_word_spacing('1deg'); -test_word_spacing('1pp'); -test_word_spacing('initial'); -test_word_spacing('inherit'); -test_word_spacing('normal'); -test_word_spacing('none'); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -t.done(); + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing('0s'); + test_word_spacing('1min'); + test_word_spacing('1deg'); + test_word_spacing('1pp'); + test_word_spacing('initial'); + test_word_spacing('inherit'); + test_word_spacing('normal'); + test_word_spacing('none'); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html index ff84f4541b6..636f7199cb1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.html @@ -17,30 +17,30 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -// Get the width for 'Hello World' at default size, 10px. -var width_normal = ctx.measureText('Hello World').width; - -ctx.letterSpacing = '1em'; -_assertSame(ctx.letterSpacing, '1em', "ctx.letterSpacing", "'1em'"); -// 1em = 10px. Add 10px after each letter in "Hello World", -// makes it 110px longer. -var width_with_spacing = ctx.measureText('Hello World').width; -_assertSame(width_with_spacing, width_normal + 110, "width_with_spacing", "width_normal + 110"); - -// Changing font to 20px. Without resetting the spacing, 1em letterSpacing -// is now 20px, so it's suppose to be 220px longer without any letterSpacing set. -ctx.font = '20px serif'; -width_with_spacing = ctx.measureText('Hello World').width; -// Now calculate the reference spacing for "Hello World" with no spacing. -ctx.letterSpacing = '0em'; -width_normal = ctx.measureText('Hello World').width; -_assertSame(width_with_spacing, width_normal + 220, "width_with_spacing", "width_normal + 220"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World' at default size, 10px. + var width_normal = ctx.measureText('Hello World').width; + + ctx.letterSpacing = '1em'; + _assertSame(ctx.letterSpacing, '1em', "ctx.letterSpacing", "'1em'"); + // 1em = 10px. Add 10px after each letter in "Hello World", + // makes it 110px longer. + var width_with_spacing = ctx.measureText('Hello World').width; + _assertSame(width_with_spacing, width_normal + 110, "width_with_spacing", "width_normal + 110"); + + // Changing font to 20px. Without resetting the spacing, 1em letterSpacing + // is now 20px, so it's suppose to be 220px longer without any letterSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World').width; + // Now calculate the reference spacing for "Hello World" with no spacing. + ctx.letterSpacing = '0em'; + width_normal = ctx.measureText('Hello World').width; + _assertSame(width_with_spacing, width_normal + 220, "width_with_spacing", "width_normal + 220"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.js index 5a6bf6614de..22fb04f62f9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.change.font.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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -// Get the width for 'Hello World' at default size, 10px. -var width_normal = ctx.measureText('Hello World').width; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World' at default size, 10px. + var width_normal = ctx.measureText('Hello World').width; -ctx.letterSpacing = '1em'; -_assertSame(ctx.letterSpacing, '1em', "ctx.letterSpacing", "'1em'"); -// 1em = 10px. Add 10px after each letter in "Hello World", -// makes it 110px longer. -var width_with_spacing = ctx.measureText('Hello World').width; -_assertSame(width_with_spacing, width_normal + 110, "width_with_spacing", "width_normal + 110"); - -// Changing font to 20px. Without resetting the spacing, 1em letterSpacing -// is now 20px, so it's suppose to be 220px longer without any letterSpacing set. -ctx.font = '20px serif'; -width_with_spacing = ctx.measureText('Hello World').width; -// Now calculate the reference spacing for "Hello World" with no spacing. -ctx.letterSpacing = '0em'; -width_normal = ctx.measureText('Hello World').width; -_assertSame(width_with_spacing, width_normal + 220, "width_with_spacing", "width_normal + 220"); -t.done(); + ctx.letterSpacing = '1em'; + _assertSame(ctx.letterSpacing, '1em', "ctx.letterSpacing", "'1em'"); + // 1em = 10px. Add 10px after each letter in "Hello World", + // makes it 110px longer. + var width_with_spacing = ctx.measureText('Hello World').width; + _assertSame(width_with_spacing, width_normal + 110, "width_with_spacing", "width_normal + 110"); + // Changing font to 20px. Without resetting the spacing, 1em letterSpacing + // is now 20px, so it's suppose to be 220px longer without any letterSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World').width; + // Now calculate the reference spacing for "Hello World" with no spacing. + ctx.letterSpacing = '0em'; + width_normal = ctx.measureText('Hello World').width; + _assertSame(width_with_spacing, width_normal + 220, "width_with_spacing", "width_normal + 220"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.html index 5482c36b370..46cd55a5caf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.html @@ -17,37 +17,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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -var width_normal = ctx.measureText('Hello World').width; - -function test_letter_spacing(value, difference_spacing, epsilon) { - ctx.letterSpacing = value; - _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - width_with_letter_spacing = ctx.measureText('Hello World').width; - assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); -} - -// The first value is the letter Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 11 letters -// in 'hello world', so the length difference is always letterSpacing * 11. -// and the third value is the acceptable differencee for the length change, -// note that unit such as 1cm/1mm doesn't map to an exact pixel value. -test_cases = [['3px', 33, 0.1], - ['5px', 55, 0.1], - ['-2px', -22, 0.1], - ['1in', 1056, 0.1], - ['-0.1cm', -41.65, 0.2], - ['-0.6mm', -24,95, 0.2]] - -for (const test_case of test_cases) { - test_letter_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); + var width_normal = ctx.measureText('Hello World').width; + + function test_letter_spacing(value, difference_spacing, epsilon) { + ctx.letterSpacing = value; + _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + width_with_letter_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); + } + + // The first value is the letter Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 11 letters + // in 'hello world', so the length difference is always letterSpacing * 11. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 33, 0.1], + ['5px', 55, 0.1], + ['-2px', -22, 0.1], + ['1in', 1056, 0.1], + ['-0.1cm', -41.65, 0.2], + ['-0.6mm', -24,95, 0.2]] + + for (const test_case of test_cases) { + test_letter_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.worker.js index 22cab4cccd9..8c82aebb3c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.absolute.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -var width_normal = ctx.measureText('Hello World').width; - -function test_letter_spacing(value, difference_spacing, epsilon) { - ctx.letterSpacing = value; - _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - width_with_letter_spacing = ctx.measureText('Hello World').width; - assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); -} - -// The first value is the letter Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 11 letters -// in 'hello world', so the length difference is always letterSpacing * 11. -// and the third value is the acceptable differencee for the length change, -// note that unit such as 1cm/1mm doesn't map to an exact pixel value. -test_cases = [['3px', 33, 0.1], - ['5px', 55, 0.1], - ['-2px', -22, 0.1], - ['1in', 1056, 0.1], - ['-0.1cm', -41.65, 0.2], - ['-0.6mm', -24,95, 0.2]] - -for (const test_case of test_cases) { - test_letter_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); - + var width_normal = ctx.measureText('Hello World').width; + + function test_letter_spacing(value, difference_spacing, epsilon) { + ctx.letterSpacing = value; + _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + width_with_letter_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); + } + + // The first value is the letter Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 11 letters + // in 'hello world', so the length difference is always letterSpacing * 11. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 33, 0.1], + ['5px', 55, 0.1], + ['-2px', -22, 0.1], + ['1in', 1056, 0.1], + ['-0.1cm', -41.65, 0.2], + ['-0.6mm', -24,95, 0.2]] + + for (const test_case of test_cases) { + test_letter_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.html index fa5d2bce754..296c929dc31 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.html @@ -17,35 +17,35 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -ctx.font = "10px monospace"; -var width_normal = ctx.measureText('Hello World').width; -var ch_width = width_normal / 11; - -function test_letter_spacing(value, difference_spacing, epsilon) { - ctx.letterSpacing = value; - _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - width_with_letter_spacing = ctx.measureText('Hello World').width; - assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); -} - -// The first value is the letter Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 11 letters -// in 'hello world', so the length difference is always letterSpacing * 11. -// and the third value is the acceptable differencee for the length change. -test_cases = [['1em', 110, 0.1], - ['-0.1em', -11, 0.1], - ['1ch', 11 * ch_width, 0.1]] - -for (const test_case of test_cases) { - test_letter_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); + ctx.font = "10px monospace"; + var width_normal = ctx.measureText('Hello World').width; + var ch_width = width_normal / 11; + + function test_letter_spacing(value, difference_spacing, epsilon) { + ctx.letterSpacing = value; + _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + width_with_letter_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); + } + + // The first value is the letter Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 11 letters + // in 'hello world', so the length difference is always letterSpacing * 11. + // and the third value is the acceptable differencee for the length change. + test_cases = [['1em', 110, 0.1], + ['-0.1em', -11, 0.1], + ['1ch', 11 * ch_width, 0.1]] + + for (const test_case of test_cases) { + test_letter_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.worker.js index 59d17ef82cf..d6afa71abaf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.letterSpacing.measure.relative.worker.js @@ -13,35 +13,34 @@ 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.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -ctx.font = "10px monospace"; -var width_normal = ctx.measureText('Hello World').width; -var ch_width = width_normal / 11; - -function test_letter_spacing(value, difference_spacing, epsilon) { - ctx.letterSpacing = value; - _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - width_with_letter_spacing = ctx.measureText('Hello World').width; - assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); -} - -// The first value is the letter Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 11 letters -// in 'hello world', so the length difference is always letterSpacing * 11. -// and the third value is the acceptable differencee for the length change. -test_cases = [['1em', 110, 0.1], - ['-0.1em', -11, 0.1], - ['1ch', 11 * ch_width, 0.1]] - -for (const test_case of test_cases) { - test_letter_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); - + ctx.font = "10px monospace"; + var width_normal = ctx.measureText('Hello World').width; + var ch_width = width_normal / 11; + + function test_letter_spacing(value, difference_spacing, epsilon) { + ctx.letterSpacing = value; + _assertSame(ctx.letterSpacing, value, "ctx.letterSpacing", "value"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + width_with_letter_spacing = ctx.measureText('Hello World').width; + assert_approx_equals(width_with_letter_spacing, width_normal + difference_spacing, epsilon, "letter spacing doesn't work."); + } + + // The first value is the letter Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 11 letters + // in 'hello world', so the length difference is always letterSpacing * 11. + // and the third value is the acceptable differencee for the length change. + test_cases = [['1em', 110, 0.1], + ['-0.1em', -11, 0.1], + ['1ch', 11 * ch_width, 0.1]] + + for (const test_case of test_cases) { + test_letter_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.html index 04774a9d0f8..6c0b3756d38 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.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.direction = "ltr"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + ctx.direction = "ltr"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); -ctx.direction = "rtl"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); -t.done(); + ctx.direction = "rtl"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.js index 8f5585682b0..852f372101e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.direction.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.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.direction = "ltr"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); - -ctx.direction = "rtl"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); -t.done(); + ctx.direction = "ltr"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + ctx.direction = "rtl"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.html index 7eba676652b..335014cfd62 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.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'); -metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); -t.done(); + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.js index 585e6c0c741..09b0e9b8d0a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.rtl.text.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 canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); - -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); -t.done(); + metrics = ctx.measureText('اَلْعَرَبِيَّةُ'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.html index f784f569b2a..4c1ca193e5e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.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.textAlign = "right"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + ctx.textAlign = "right"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); -ctx.textAlign = "left" -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); -t.done(); + ctx.textAlign = "left" + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.js index 3af2f471434..bc6f167be5b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.measure.textAlign.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.textAlign = "right"; -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); - -ctx.textAlign = "left" -metrics = ctx.measureText('hello'); -_assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); -t.done(); + ctx.textAlign = "right"; + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft > metrics.actualBoundingBoxRight"); + ctx.textAlign = "left" + metrics = ctx.measureText('hello'); + _assert(metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight, "metrics.actualBoundingBoxLeft < metrics.actualBoundingBoxRight"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html index 8e80f9a3aba..ca50f13a69b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -function test_word_spacing(value) { - ctx.wordSpacing = value; - ctx.letterSpacing = value; - _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -} -test_word_spacing(NaN); -test_word_spacing(Infinity); -test_word_spacing(-Infinity); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -t.done(); + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing(NaN); + test_word_spacing(Infinity); + test_word_spacing(-Infinity); + + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js index adba2532829..801b8b5c73b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.nonfinite.spacing.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -function test_word_spacing(value) { - ctx.wordSpacing = value; - ctx.letterSpacing = value; - _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -} -test_word_spacing(NaN); -test_word_spacing(Infinity); -test_word_spacing(-Infinity); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -t.done(); + function test_word_spacing(value) { + ctx.wordSpacing = value; + ctx.letterSpacing = value; + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + } + test_word_spacing(NaN); + test_word_spacing(Infinity); + test_word_spacing(-Infinity); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html index ea480c4690e..aa2e7caa916 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.html @@ -17,30 +17,30 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -ctx.letterSpacing = '3px'; -_assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -ctx.wordSpacing = '5px'; -_assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); -_assertSame(ctx.wordSpacing, '5px', "ctx.wordSpacing", "'5px'"); - -ctx.letterSpacing = '-1px'; -ctx.wordSpacing = '-1px'; -_assertSame(ctx.letterSpacing, '-1px', "ctx.letterSpacing", "'-1px'"); -_assertSame(ctx.wordSpacing, '-1px', "ctx.wordSpacing", "'-1px'"); - -ctx.letterSpacing = '1PX'; -ctx.wordSpacing = '1EM'; -_assertSame(ctx.letterSpacing, '1px', "ctx.letterSpacing", "'1px'"); -_assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.letterSpacing = '3px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.wordSpacing = '5px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '5px', "ctx.wordSpacing", "'5px'"); + + ctx.letterSpacing = '-1px'; + ctx.wordSpacing = '-1px'; + _assertSame(ctx.letterSpacing, '-1px', "ctx.letterSpacing", "'-1px'"); + _assertSame(ctx.wordSpacing, '-1px', "ctx.wordSpacing", "'-1px'"); + + ctx.letterSpacing = '1PX'; + ctx.wordSpacing = '1EM'; + _assertSame(ctx.letterSpacing, '1px', "ctx.letterSpacing", "'1px'"); + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.js index a413f9270af..938ab966020 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.spacing.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'); - -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -ctx.letterSpacing = '3px'; -_assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); - -ctx.wordSpacing = '5px'; -_assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); -_assertSame(ctx.wordSpacing, '5px', "ctx.wordSpacing", "'5px'"); - -ctx.letterSpacing = '-1px'; -ctx.wordSpacing = '-1px'; -_assertSame(ctx.letterSpacing, '-1px', "ctx.letterSpacing", "'-1px'"); -_assertSame(ctx.wordSpacing, '-1px', "ctx.wordSpacing", "'-1px'"); - -ctx.letterSpacing = '1PX'; -ctx.wordSpacing = '1EM'; -_assertSame(ctx.letterSpacing, '1px', "ctx.letterSpacing", "'1px'"); -_assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); -t.done(); - + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.letterSpacing = '3px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + + ctx.wordSpacing = '5px'; + _assertSame(ctx.letterSpacing, '3px', "ctx.letterSpacing", "'3px'"); + _assertSame(ctx.wordSpacing, '5px', "ctx.wordSpacing", "'5px'"); + + ctx.letterSpacing = '-1px'; + ctx.wordSpacing = '-1px'; + _assertSame(ctx.letterSpacing, '-1px', "ctx.letterSpacing", "'-1px'"); + _assertSame(ctx.wordSpacing, '-1px', "ctx.wordSpacing", "'-1px'"); + + ctx.letterSpacing = '1PX'; + ctx.wordSpacing = '1EM'; + _assertSame(ctx.letterSpacing, '1px', "ctx.letterSpacing", "'1px'"); + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html index d0c7b88a0c2..47094dc91fa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.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'); -// Setting textRendering with lower cases -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with lower cases + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "auto"; -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "optimizespeed"; -_assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + ctx.textRendering = "optimizespeed"; + _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); -ctx.textRendering = "optimizelegibility"; -_assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + ctx.textRendering = "optimizelegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); -ctx.textRendering = "geometricprecision"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + ctx.textRendering = "geometricprecision"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); -// Setting textRendering with lower cases and upper cases word. -ctx.textRendering = "aUto"; -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with lower cases and upper cases word. + ctx.textRendering = "aUto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "OPtimizeSpeed"; -_assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + ctx.textRendering = "OPtimizeSpeed"; + _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); -ctx.textRendering = "OPtimizELEgibility"; -_assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + ctx.textRendering = "OPtimizELEgibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); -ctx.textRendering = "GeometricPrecision"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + ctx.textRendering = "GeometricPrecision"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); -// Setting textRendering with non-existing font variant. -ctx.textRendering = "abcd"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); -t.done(); + // Setting textRendering with non-existing font variant. + ctx.textRendering = "abcd"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js index e8402c2a088..ca5741de954 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.textRendering.settings.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -// Setting textRendering with lower cases -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with lower cases + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "auto"; -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + ctx.textRendering = "auto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "optimizespeed"; -_assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + ctx.textRendering = "optimizespeed"; + _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); -ctx.textRendering = "optimizelegibility"; -_assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + ctx.textRendering = "optimizelegibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); -ctx.textRendering = "geometricprecision"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + ctx.textRendering = "geometricprecision"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); -// Setting textRendering with lower cases and upper cases word. -ctx.textRendering = "aUto"; -_assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); + // Setting textRendering with lower cases and upper cases word. + ctx.textRendering = "aUto"; + _assertSame(ctx.textRendering, "auto", "ctx.textRendering", "\"auto\""); -ctx.textRendering = "OPtimizeSpeed"; -_assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); + ctx.textRendering = "OPtimizeSpeed"; + _assertSame(ctx.textRendering, "optimizeSpeed", "ctx.textRendering", "\"optimizeSpeed\""); -ctx.textRendering = "OPtimizELEgibility"; -_assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); + ctx.textRendering = "OPtimizELEgibility"; + _assertSame(ctx.textRendering, "optimizeLegibility", "ctx.textRendering", "\"optimizeLegibility\""); -ctx.textRendering = "GeometricPrecision"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); - -// Setting textRendering with non-existing font variant. -ctx.textRendering = "abcd"; -_assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); -t.done(); + ctx.textRendering = "GeometricPrecision"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + // Setting textRendering with non-existing font variant. + ctx.textRendering = "abcd"; + _assertSame(ctx.textRendering, "geometricPrecision", "ctx.textRendering", "\"geometricPrecision\""); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html index f8b72fbfab6..3df660ea3e5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.html @@ -17,30 +17,30 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -// Get the width for 'Hello World, again' at default size, 10px. -var width_normal = ctx.measureText('Hello World, again').width; - -ctx.wordSpacing = '1em'; -_assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); -// 1em = 10px. Add 10px after each word in "Hello World, again", -// makes it 20px longer. -var width_with_spacing = ctx.measureText('Hello World, again').width; -_assertSame(width_with_spacing, width_normal + 20, "width_with_spacing", "width_normal + 20"); - -// Changing font to 20px. Without resetting the spacing, 1em wordSpacing -// is now 20px, so it's suppose to be 40px longer without any wordSpacing set. -ctx.font = '20px serif'; -width_with_spacing = ctx.measureText('Hello World, again').width; -// Now calculate the reference spacing for "Hello World, again" with no spacing. -ctx.wordSpacing = '0em'; -width_normal = ctx.measureText('Hello World, again').width; -_assertSame(width_with_spacing, width_normal + 40, "width_with_spacing", "width_normal + 40"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World, again' at default size, 10px. + var width_normal = ctx.measureText('Hello World, again').width; + + ctx.wordSpacing = '1em'; + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); + // 1em = 10px. Add 10px after each word in "Hello World, again", + // makes it 20px longer. + var width_with_spacing = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 20, "width_with_spacing", "width_normal + 20"); + + // Changing font to 20px. Without resetting the spacing, 1em wordSpacing + // is now 20px, so it's suppose to be 40px longer without any wordSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World, again').width; + // Now calculate the reference spacing for "Hello World, again" with no spacing. + ctx.wordSpacing = '0em'; + width_normal = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 40, "width_with_spacing", "width_normal + 40"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.js index 993cd28501f..e1415ea2873 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.change.font.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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -// Get the width for 'Hello World, again' at default size, 10px. -var width_normal = ctx.measureText('Hello World, again').width; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + // Get the width for 'Hello World, again' at default size, 10px. + var width_normal = ctx.measureText('Hello World, again').width; -ctx.wordSpacing = '1em'; -_assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); -// 1em = 10px. Add 10px after each word in "Hello World, again", -// makes it 20px longer. -var width_with_spacing = ctx.measureText('Hello World, again').width; -_assertSame(width_with_spacing, width_normal + 20, "width_with_spacing", "width_normal + 20"); - -// Changing font to 20px. Without resetting the spacing, 1em wordSpacing -// is now 20px, so it's suppose to be 40px longer without any wordSpacing set. -ctx.font = '20px serif'; -width_with_spacing = ctx.measureText('Hello World, again').width; -// Now calculate the reference spacing for "Hello World, again" with no spacing. -ctx.wordSpacing = '0em'; -width_normal = ctx.measureText('Hello World, again').width; -_assertSame(width_with_spacing, width_normal + 40, "width_with_spacing", "width_normal + 40"); -t.done(); + ctx.wordSpacing = '1em'; + _assertSame(ctx.wordSpacing, '1em', "ctx.wordSpacing", "'1em'"); + // 1em = 10px. Add 10px after each word in "Hello World, again", + // makes it 20px longer. + var width_with_spacing = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 20, "width_with_spacing", "width_normal + 20"); + // Changing font to 20px. Without resetting the spacing, 1em wordSpacing + // is now 20px, so it's suppose to be 40px longer without any wordSpacing set. + ctx.font = '20px serif'; + width_with_spacing = ctx.measureText('Hello World, again').width; + // Now calculate the reference spacing for "Hello World, again" with no spacing. + ctx.wordSpacing = '0em'; + width_normal = ctx.measureText('Hello World, again').width; + _assertSame(width_with_spacing, width_normal + 40, "width_with_spacing", "width_normal + 40"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.html index 07ca896f975..458f12b008f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.html @@ -17,37 +17,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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -var width_normal = ctx.measureText('Hello World, again').width; - -function test_word_spacing(value, difference_spacing, epsilon) { - ctx.wordSpacing = value; _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); - _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); - width_with_word_spacing = ctx.measureText('Hello World, again').width; - assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); -} - -// The first value is the word Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 2 words -// in 'Hello World, again', so the length difference is always wordSpacing * 2. -// and the third value is the acceptable differencee for the length change, -// note that unit such as 1cm/1mm doesn't map to an exact pixel value. -test_cases = [['3px', 6, 0.1], - ['5px', 10, 0.1], - ['-2px', -4, 0.1], - ['1in', 192, 0.1], - ['-0.1cm', -7.57, 0.2], - ['-0.6mm', -4.54, 0.2]] - -for (const test_case of test_cases) { - test_word_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + var width_normal = ctx.measureText('Hello World, again').width; + + function test_word_spacing(value, difference_spacing, epsilon) { + ctx.wordSpacing = value; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); + width_with_word_spacing = ctx.measureText('Hello World, again').width; + assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); + } + + // The first value is the word Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 2 words + // in 'Hello World, again', so the length difference is always wordSpacing * 2. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 6, 0.1], + ['5px', 10, 0.1], + ['-2px', -4, 0.1], + ['1in', 192, 0.1], + ['-0.1cm', -7.57, 0.2], + ['-0.6mm', -4.54, 0.2]] + + for (const test_case of test_cases) { + test_word_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.worker.js index ebfc05644fc..36d1fefc23d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.absolute.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -var width_normal = ctx.measureText('Hello World, again').width; - -function test_word_spacing(value, difference_spacing, epsilon) { - ctx.wordSpacing = value; _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); - _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); - width_with_word_spacing = ctx.measureText('Hello World, again').width; - assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); -} - -// The first value is the word Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 2 words -// in 'Hello World, again', so the length difference is always wordSpacing * 2. -// and the third value is the acceptable differencee for the length change, -// note that unit such as 1cm/1mm doesn't map to an exact pixel value. -test_cases = [['3px', 6, 0.1], - ['5px', 10, 0.1], - ['-2px', -4, 0.1], - ['1in', 192, 0.1], - ['-0.1cm', -7.57, 0.2], - ['-0.6mm', -4.54, 0.2]] - -for (const test_case of test_cases) { - test_word_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); - + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + var width_normal = ctx.measureText('Hello World, again').width; + + function test_word_spacing(value, difference_spacing, epsilon) { + ctx.wordSpacing = value; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); + width_with_word_spacing = ctx.measureText('Hello World, again').width; + assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); + } + + // The first value is the word Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 2 words + // in 'Hello World, again', so the length difference is always wordSpacing * 2. + // and the third value is the acceptable differencee for the length change, + // note that unit such as 1cm/1mm doesn't map to an exact pixel value. + test_cases = [['3px', 6, 0.1], + ['5px', 10, 0.1], + ['-2px', -4, 0.1], + ['1in', 192, 0.1], + ['-0.1cm', -7.57, 0.2], + ['-0.6mm', -4.54, 0.2]] + + for (const test_case of test_cases) { + test_word_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.html index 95f87cb03d0..11988ae157d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.html @@ -17,35 +17,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'); -_assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -ctx.font = "10px monospace"; -var width_normal = ctx.measureText('Hello World, again').width; -var ch_width = width_normal / 18; - -function test_word_spacing(value, difference_spacing, epsilon) { - ctx.wordSpacing = value; _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); - _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); - width_with_word_spacing = ctx.measureText('Hello World, again').width; - assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); -} - -// The first value is the word Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 2 words -// in 'Hello World, again', so the length difference is always wordSpacing * 2. -// and the third value is the acceptable differencee for the length change. -test_cases = [['1em', 20, 0.1], - ['-0.5em', -10, 0.1], - ['1ch', 2 * ch_width, 0.1]] - -for (const test_case of test_cases) { - test_word_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + ctx.font = "10px monospace"; + var width_normal = ctx.measureText('Hello World, again').width; + var ch_width = width_normal / 18; + + function test_word_spacing(value, difference_spacing, epsilon) { + ctx.wordSpacing = value; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); + width_with_word_spacing = ctx.measureText('Hello World, again').width; + assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); + } + + // The first value is the word Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 2 words + // in 'Hello World, again', so the length difference is always wordSpacing * 2. + // and the third value is the acceptable differencee for the length change. + test_cases = [['1em', 20, 0.1], + ['-0.5em', -10, 0.1], + ['1ch', 2 * ch_width, 0.1]] + + for (const test_case of test_cases) { + test_word_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.worker.js index 2bded51edcb..f5295e915e8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.drawing.style.wordSpacing.measure.relative.worker.js @@ -13,35 +13,34 @@ 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.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); -_assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); -ctx.font = "10px monospace"; -var width_normal = ctx.measureText('Hello World, again').width; -var ch_width = width_normal / 18; - -function test_word_spacing(value, difference_spacing, epsilon) { - ctx.wordSpacing = value; _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); - _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); - width_with_word_spacing = ctx.measureText('Hello World, again').width; - assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); -} - -// The first value is the word Spacing to be set, the second value the -// change in length of string 'Hello World', note that there are 2 words -// in 'Hello World, again', so the length difference is always wordSpacing * 2. -// and the third value is the acceptable differencee for the length change. -test_cases = [['1em', 20, 0.1], - ['-0.5em', -10, 0.1], - ['1ch', 2 * ch_width, 0.1]] - -for (const test_case of test_cases) { - test_word_spacing(test_case[0], test_case[1], test_case[2]); -} -t.done(); - + _assertSame(ctx.wordSpacing, '0px', "ctx.wordSpacing", "'0px'"); + ctx.font = "10px monospace"; + var width_normal = ctx.measureText('Hello World, again').width; + var ch_width = width_normal / 18; + + function test_word_spacing(value, difference_spacing, epsilon) { + ctx.wordSpacing = value; + _assertSame(ctx.letterSpacing, '0px', "ctx.letterSpacing", "'0px'"); + _assertSame(ctx.wordSpacing, value, "ctx.wordSpacing", "value"); + width_with_word_spacing = ctx.measureText('Hello World, again').width; + assert_approx_equals(width_with_word_spacing, width_normal + difference_spacing, epsilon, "word spacing doesn't work."); + } + + // The first value is the word Spacing to be set, the second value the + // change in length of string 'Hello World', note that there are 2 words + // in 'Hello World, again', so the length difference is always wordSpacing * 2. + // and the third value is the acceptable differencee for the length change. + test_cases = [['1em', 20, 0.1], + ['-0.5em', -10, 0.1], + ['1ch', 2 * ch_width, 0.1]] + + for (const test_case of test_cases) { + test_word_spacing(test_case[0], test_case[1], test_case[2]); + } + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.default.html index 191c1a5c317..59828a5db4c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.default.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.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); -t.done(); + _assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.default.worker.js index dc620ed4398..fa51ffc8715 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.default.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.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.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.html index aee555656a9..bb39cc4a3c6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.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'); -ctx.font = '20px serif'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20PX SERIF'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -t.done(); + ctx.font = '20PX SERIF'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker.js index 0d8a4aad32a..3596aab66bc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.basic.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 canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -ctx.font = '20px serif'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); - -ctx.font = '20PX SERIF'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -t.done(); + ctx.font = '20px serif'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20PX SERIF'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html index 361b44de1c8..30e937804f2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.html @@ -17,12 +17,12 @@ 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.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; -_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'"); -t.done(); + ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; + _assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker.js index 3c05b6fb81c..28cb41c572a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.complex.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'); - -ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; -_assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.font = 'small-caps italic 400 12px/2 Unknown Font, sans-serif'; + _assertSame(ctx.font, 'italic small-caps 12px "Unknown Font", sans-serif', "ctx.font", "'italic small-caps 12px \"Unknown Font\", sans-serif'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.html index 70127ba67c4..989014fb37c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.html @@ -17,12 +17,12 @@ 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.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; -_assertSame(ctx.font, '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","', "ctx.font", "'20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, \"QuotedFont\\\\\\\\\\\\\",\"'"); -t.done(); + ctx.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; + _assertSame(ctx.font, '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","', "ctx.font", "'20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, \"QuotedFont\\\\\\\\\\\\\",\"'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker.js index 7640de2be0b..68aefdd0dfd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.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'); - -ctx.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; -_assertSame(ctx.font, '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","', "ctx.font", "'20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, \"QuotedFont\\\\\\\\\\\\\",\"'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.font = '20px cursive,fantasy,monospace,sans-serif,serif,UnquotedFont,"QuotedFont\\\\\\","'; + _assertSame(ctx.font, '20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, "QuotedFont\\\\\\","', "ctx.font", "'20px cursive, fantasy, monospace, sans-serif, serif, UnquotedFont, \"QuotedFont\\\\\\\\\\\\\",\"'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html index 483476bcfaa..8b4fd01d024 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.html @@ -17,56 +17,56 @@ 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.font = '20px serif'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = ''; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = ''; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'bogus'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'bogus'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'inherit'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'inherit'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px {bogus}'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px {bogus}'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px initial'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px initial'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px default'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px default'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px inherit'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px inherit'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px revert'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px revert'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'var(--x)'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'var(--x)'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'var(--x, 10px serif)'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'var(--x, 10px serif)'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '1em serif; background: green; margin: 10px'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -t.done(); + ctx.font = '20px serif'; + ctx.font = '1em serif; background: green; margin: 10px'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js index a4e19a6887c..31f374579e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.invalid.worker.js @@ -13,56 +13,55 @@ 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.font = '20px serif'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = ''; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = ''; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'bogus'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'bogus'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'inherit'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'inherit'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px {bogus}'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px {bogus}'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px initial'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px initial'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px default'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px default'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px inherit'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px inherit'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = '10px revert'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '10px revert'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'var(--x)'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = 'var(--x)'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -ctx.font = '20px serif'; -ctx.font = 'var(--x, 10px serif)'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); - -ctx.font = '20px serif'; -ctx.font = '1em serif; background: green; margin: 10px'; -_assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); -t.done(); + ctx.font = '20px serif'; + ctx.font = 'var(--x, 10px serif)'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + ctx.font = '20px serif'; + ctx.font = '1em serif; background: green; margin: 10px'; + _assertSame(ctx.font, '20px serif', "ctx.font", "'20px serif'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.html index 24cb730c225..79ae6a38e23 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.html @@ -17,12 +17,12 @@ 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.font = 'message-box'; -_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'"); -t.done(); + ctx.font = 'message-box'; + _assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.worker.js index 5c2a8b481a4..b965ea763a8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.system.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'); - -ctx.font = 'message-box'; -_assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.font = 'message-box'; + _assertDifferent(ctx.font, 'message-box', "ctx.font", "'message-box'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html index 6c17ad47b6b..89f8515967f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.html @@ -17,12 +17,12 @@ 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.font = '1px sans-serif'; -_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); -t.done(); + ctx.font = '1px sans-serif'; + _assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.js index 2171e2cdccc..aba023e3363 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.tiny.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'); - -ctx.font = '1px sans-serif'; -_assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.font = '1px sans-serif'; + _assertSame(ctx.font, '1px sans-serif', "ctx.font", "'1px sans-serif'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.html index eef3be79c79..a32be3d65c4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.html @@ -17,12 +17,12 @@ 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.font = '1em sans-serif'; -_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); -t.done(); + ctx.font = '1em sans-serif'; + _assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.worker.js index c4d78b8bcc0..9e1247cfe01 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.font.relative_size.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'); - -ctx.font = '1em sans-serif'; -_assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.font = '1em sans-serif'; + _assertSame(ctx.font, '10px sans-serif', "ctx.font", "'10px sans-serif'"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html index b7ce281b410..96b37702c48 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.html @@ -17,39 +17,39 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - ctx.baseline = 'alphabetic' - // Some platforms may return '-0'. - _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft)", "0"); - // Different platforms may render text slightly different. - _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50"); - _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35"); - _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxDescent), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent)", "0"); - - _assert(ctx.measureText('D').actualBoundingBoxLeft >= 48, "ctx.measureText('D').actualBoundingBoxLeft >= 48"); - _assert(ctx.measureText('D').actualBoundingBoxLeft <= 52, "ctx.measureText('D').actualBoundingBoxLeft <= 52"); - _assert(ctx.measureText('D').actualBoundingBoxRight >= 75, "ctx.measureText('D').actualBoundingBoxRight >= 75"); - _assert(ctx.measureText('D').actualBoundingBoxRight <= 80, "ctx.measureText('D').actualBoundingBoxRight <= 80"); - _assert(ctx.measureText('D').actualBoundingBoxAscent >= 35, "ctx.measureText('D').actualBoundingBoxAscent >= 35"); - _assert(ctx.measureText('D').actualBoundingBoxAscent <= 40, "ctx.measureText('D').actualBoundingBoxAscent <= 40"); - _assert(ctx.measureText('D').actualBoundingBoxDescent >= 12, "ctx.measureText('D').actualBoundingBoxDescent >= 12"); - _assert(ctx.measureText('D').actualBoundingBoxDescent <= 15, "ctx.measureText('D').actualBoundingBoxDescent <= 15"); - - _assertSame(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft)", "0"); - _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); - _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); - _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + ctx.baseline = 'alphabetic' + // Some platforms may return '-0'. + _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft)", "0"); + // Different platforms may render text slightly different. + _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50"); + _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35"); + _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxDescent), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent)", "0"); + + _assert(ctx.measureText('D').actualBoundingBoxLeft >= 48, "ctx.measureText('D').actualBoundingBoxLeft >= 48"); + _assert(ctx.measureText('D').actualBoundingBoxLeft <= 52, "ctx.measureText('D').actualBoundingBoxLeft <= 52"); + _assert(ctx.measureText('D').actualBoundingBoxRight >= 75, "ctx.measureText('D').actualBoundingBoxRight >= 75"); + _assert(ctx.measureText('D').actualBoundingBoxRight <= 80, "ctx.measureText('D').actualBoundingBoxRight <= 80"); + _assert(ctx.measureText('D').actualBoundingBoxAscent >= 35, "ctx.measureText('D').actualBoundingBoxAscent >= 35"); + _assert(ctx.measureText('D').actualBoundingBoxAscent <= 40, "ctx.measureText('D').actualBoundingBoxAscent <= 40"); + _assert(ctx.measureText('D').actualBoundingBoxDescent >= 12, "ctx.measureText('D').actualBoundingBoxDescent >= 12"); + _assert(ctx.measureText('D').actualBoundingBoxDescent <= 15, "ctx.measureText('D').actualBoundingBoxDescent <= 15"); + + _assertSame(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft)", "0"); + _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); + _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); + _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js index 4693bb69841..b16ed415ca8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.actualBoundingBox.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - ctx.baseline = 'alphabetic' - // Some platforms may return '-0'. - _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft)", "0"); - // Different platforms may render text slightly different. - _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50"); - _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35"); - _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxDescent), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent)", "0"); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + ctx.baseline = 'alphabetic' + // Some platforms may return '-0'. + _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxLeft)", "0"); + // Different platforms may render text slightly different. + _assert(ctx.measureText('A').actualBoundingBoxRight >= 50, "ctx.measureText('A').actualBoundingBoxRight >= 50"); + _assert(ctx.measureText('A').actualBoundingBoxAscent >= 35, "ctx.measureText('A').actualBoundingBoxAscent >= 35"); + _assertSame(Math.abs(ctx.measureText('A').actualBoundingBoxDescent), 0, "Math.abs(ctx.measureText('A').actualBoundingBoxDescent)", "0"); - _assert(ctx.measureText('D').actualBoundingBoxLeft >= 48, "ctx.measureText('D').actualBoundingBoxLeft >= 48"); - _assert(ctx.measureText('D').actualBoundingBoxLeft <= 52, "ctx.measureText('D').actualBoundingBoxLeft <= 52"); - _assert(ctx.measureText('D').actualBoundingBoxRight >= 75, "ctx.measureText('D').actualBoundingBoxRight >= 75"); - _assert(ctx.measureText('D').actualBoundingBoxRight <= 80, "ctx.measureText('D').actualBoundingBoxRight <= 80"); - _assert(ctx.measureText('D').actualBoundingBoxAscent >= 35, "ctx.measureText('D').actualBoundingBoxAscent >= 35"); - _assert(ctx.measureText('D').actualBoundingBoxAscent <= 40, "ctx.measureText('D').actualBoundingBoxAscent <= 40"); - _assert(ctx.measureText('D').actualBoundingBoxDescent >= 12, "ctx.measureText('D').actualBoundingBoxDescent >= 12"); - _assert(ctx.measureText('D').actualBoundingBoxDescent <= 15, "ctx.measureText('D').actualBoundingBoxDescent <= 15"); - - _assertSame(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft)", "0"); - _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); - _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); - _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); -}).then(t_pass, t_fail); + _assert(ctx.measureText('D').actualBoundingBoxLeft >= 48, "ctx.measureText('D').actualBoundingBoxLeft >= 48"); + _assert(ctx.measureText('D').actualBoundingBoxLeft <= 52, "ctx.measureText('D').actualBoundingBoxLeft <= 52"); + _assert(ctx.measureText('D').actualBoundingBoxRight >= 75, "ctx.measureText('D').actualBoundingBoxRight >= 75"); + _assert(ctx.measureText('D').actualBoundingBoxRight <= 80, "ctx.measureText('D').actualBoundingBoxRight <= 80"); + _assert(ctx.measureText('D').actualBoundingBoxAscent >= 35, "ctx.measureText('D').actualBoundingBoxAscent >= 35"); + _assert(ctx.measureText('D').actualBoundingBoxAscent <= 40, "ctx.measureText('D').actualBoundingBoxAscent <= 40"); + _assert(ctx.measureText('D').actualBoundingBoxDescent >= 12, "ctx.measureText('D').actualBoundingBoxDescent >= 12"); + _assert(ctx.measureText('D').actualBoundingBoxDescent <= 15, "ctx.measureText('D').actualBoundingBoxDescent <= 15"); + _assertSame(Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft), 0, "Math.abs(ctx.measureText('ABCD').actualBoundingBoxLeft)", "0"); + _assert(ctx.measureText('ABCD').actualBoundingBoxRight >= 200, "ctx.measureText('ABCD').actualBoundingBoxRight >= 200"); + _assert(ctx.measureText('ABCD').actualBoundingBoxAscent >= 85, "ctx.measureText('ABCD').actualBoundingBoxAscent >= 85"); + _assert(ctx.measureText('ABCD').actualBoundingBoxDescent >= 37, "ctx.measureText('ABCD').actualBoundingBoxDescent >= 37"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.html index ed3affcda59..f3bedd41ef5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - // Some platforms may return '-0'. - _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0"); - // Different platforms may render text slightly different. - _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36"); - _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58"); - _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70"); - _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80"); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + // Some platforms may return '-0'. + _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0"); + // Different platforms may render text slightly different. + _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36"); + _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58"); + _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70"); + _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80"); - var tm = ctx.measureText('Hello'); - _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); -}).then(t_pass, t_fail); + var tm = ctx.measureText('Hello'); + _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js index f1d4bb98f9b..55c744aaeb1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.advances.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - // Some platforms may return '-0'. - _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0"); - // Different platforms may render text slightly different. - _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36"); - _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58"); - _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70"); - _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80"); - - var tm = ctx.measureText('Hello'); - _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); - _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); -}).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + // Some platforms may return '-0'. + _assertSame(Math.abs(ctx.measureText('Hello').advances[0]), 0, "Math.abs(ctx.measureText('Hello').advances[\""+(0)+"\"])", "0"); + // Different platforms may render text slightly different. + _assert(ctx.measureText('Hello').advances[1] >= 36, "ctx.measureText('Hello').advances[\""+(1)+"\"] >= 36"); + _assert(ctx.measureText('Hello').advances[2] >= 58, "ctx.measureText('Hello').advances[\""+(2)+"\"] >= 58"); + _assert(ctx.measureText('Hello').advances[3] >= 70, "ctx.measureText('Hello').advances[\""+(3)+"\"] >= 70"); + _assert(ctx.measureText('Hello').advances[4] >= 80, "ctx.measureText('Hello').advances[\""+(4)+"\"] >= 80"); + var tm = ctx.measureText('Hello'); + _assertSame(ctx.measureText('Hello').advances[0], tm.advances[0], "ctx.measureText('Hello').advances[\""+(0)+"\"]", "tm.advances[\""+(0)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[1], tm.advances[1], "ctx.measureText('Hello').advances[\""+(1)+"\"]", "tm.advances[\""+(1)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[2], tm.advances[2], "ctx.measureText('Hello').advances[\""+(2)+"\"]", "tm.advances[\""+(2)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[3], tm.advances[3], "ctx.measureText('Hello').advances[\""+(3)+"\"]", "tm.advances[\""+(3)+"\"]"); + _assertSame(ctx.measureText('Hello').advances[4], tm.advances[4], "ctx.measureText('Hello').advances[\""+(4)+"\"]", "tm.advances[\""+(4)+"\"]"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.html index 993fbb08228..e58f9be455b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); + _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); + _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); - _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); -}).then(t_pass, t_fail); + _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); + _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); + _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js index 0c060169d3c..6f157f4e653 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.baselines.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); - - _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); - _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); - _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); -}).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(Math.abs(ctx.measureText('A').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('A').getBaselines().alphabetic)", "0"); + _assertSame(ctx.measureText('A').getBaselines().ideographic, -39, "ctx.measureText('A').getBaselines().ideographic", "-39"); + _assertSame(ctx.measureText('A').getBaselines().hanging, 68, "ctx.measureText('A').getBaselines().hanging", "68"); + _assertSame(Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic), 0, "Math.abs(ctx.measureText('ABCD').getBaselines().alphabetic)", "0"); + _assertSame(ctx.measureText('ABCD').getBaselines().ideographic, -39, "ctx.measureText('ABCD').getBaselines().ideographic", "-39"); + _assertSame(ctx.measureText('ABCD').getBaselines().hanging, 68, "ctx.measureText('ABCD').getBaselines().hanging", "68"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.html index cc91f4017ca..6a93bac04aa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(ctx.measureText('A').emHeightAscent, 37.5, "ctx.measureText('A').emHeightAscent", "37.5"); - _assertSame(ctx.measureText('A').emHeightDescent, 12.5, "ctx.measureText('A').emHeightDescent", "12.5"); - _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 50, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "50"); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').emHeightAscent, 37.5, "ctx.measureText('A').emHeightAscent", "37.5"); + _assertSame(ctx.measureText('A').emHeightDescent, 12.5, "ctx.measureText('A').emHeightDescent", "12.5"); + _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 50, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "50"); - _assertSame(ctx.measureText('ABCD').emHeightAscent, 37.5, "ctx.measureText('ABCD').emHeightAscent", "37.5"); - _assertSame(ctx.measureText('ABCD').emHeightDescent, 12.5, "ctx.measureText('ABCD').emHeightDescent", "12.5"); - _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 50, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "50"); -}).then(t_pass, t_fail); + _assertSame(ctx.measureText('ABCD').emHeightAscent, 37.5, "ctx.measureText('ABCD').emHeightAscent", "37.5"); + _assertSame(ctx.measureText('ABCD').emHeightDescent, 12.5, "ctx.measureText('ABCD').emHeightDescent", "12.5"); + _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 50, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "50"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js index 88432343d17..1dd5f7ce48c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.emHeights.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(ctx.measureText('A').emHeightAscent, 37.5, "ctx.measureText('A').emHeightAscent", "37.5"); - _assertSame(ctx.measureText('A').emHeightDescent, 12.5, "ctx.measureText('A').emHeightDescent", "12.5"); - _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 50, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "50"); - - _assertSame(ctx.measureText('ABCD').emHeightAscent, 37.5, "ctx.measureText('ABCD').emHeightAscent", "37.5"); - _assertSame(ctx.measureText('ABCD').emHeightDescent, 12.5, "ctx.measureText('ABCD').emHeightDescent", "12.5"); - _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 50, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "50"); -}).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').emHeightAscent, 37.5, "ctx.measureText('A').emHeightAscent", "37.5"); + _assertSame(ctx.measureText('A').emHeightDescent, 12.5, "ctx.measureText('A').emHeightDescent", "12.5"); + _assertSame(ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent, 50, "ctx.measureText('A').emHeightDescent + ctx.measureText('A').emHeightAscent", "50"); + _assertSame(ctx.measureText('ABCD').emHeightAscent, 37.5, "ctx.measureText('ABCD').emHeightAscent", "37.5"); + _assertSame(ctx.measureText('ABCD').emHeightDescent, 12.5, "ctx.measureText('ABCD').emHeightDescent", "12.5"); + _assertSame(ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent, 50, "ctx.measureText('ABCD').emHeightDescent + ctx.measureText('ABCD').emHeightAscent", "50"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.html index fca062b6498..03ee45bcef1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 85, "ctx.measureText('A').fontBoundingBoxAscent", "85"); - _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 39, "ctx.measureText('A').fontBoundingBoxDescent", "39"); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 85, "ctx.measureText('A').fontBoundingBoxAscent", "85"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 39, "ctx.measureText('A').fontBoundingBoxDescent", "39"); - _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 85, "ctx.measureText('ABCD').fontBoundingBoxAscent", "85"); - _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 39, "ctx.measureText('ABCD').fontBoundingBoxDescent", "39"); -}).then(t_pass, t_fail); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 85, "ctx.measureText('ABCD').fontBoundingBoxAscent", "85"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 39, "ctx.measureText('ABCD').fontBoundingBoxDescent", "39"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js index 2f4b64d37a6..65c5e9a9133 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.fontBoundingBox.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - ctx.direction = 'ltr'; - ctx.align = 'left' - _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 85, "ctx.measureText('A').fontBoundingBoxAscent", "85"); - _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 39, "ctx.measureText('A').fontBoundingBoxDescent", "39"); - - _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 85, "ctx.measureText('ABCD').fontBoundingBoxAscent", "85"); - _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 39, "ctx.measureText('ABCD').fontBoundingBoxDescent", "39"); -}).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + ctx.direction = 'ltr'; + ctx.align = 'left' + _assertSame(ctx.measureText('A').fontBoundingBoxAscent, 85, "ctx.measureText('A').fontBoundingBoxAscent", "85"); + _assertSame(ctx.measureText('A').fontBoundingBoxDescent, 39, "ctx.measureText('A').fontBoundingBoxDescent", "39"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxAscent, 85, "ctx.measureText('ABCD').fontBoundingBoxAscent", "85"); + _assertSame(ctx.measureText('ABCD').fontBoundingBoxDescent, 39, "ctx.measureText('ABCD').fontBoundingBoxDescent", "39"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html index 074d62eec96..fa47879836b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50"); - _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100"); - _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200"); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50"); + _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100"); + _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200"); - ctx.font = '100px CanvasTest'; - _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100"); -}).then(t_pass, t_fail); + ctx.font = '100px CanvasTest'; + _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js index a1933c82c24..265843ae66e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.basic.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50"); - _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100"); - _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200"); - - ctx.font = '100px CanvasTest'; - _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100"); -}).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText('A').width, 50, "ctx.measureText('A').width", "50"); + _assertSame(ctx.measureText('AA').width, 100, "ctx.measureText('AA').width", "100"); + _assertSame(ctx.measureText('ABCD').width, 200, "ctx.measureText('ABCD').width", "200"); + ctx.font = '100px CanvasTest'; + _assertSame(ctx.measureText('A').width, 100, "ctx.measureText('A').width", "100"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.html index 45792b41dde..7d412008b04 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); -}).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js index 8d806c16ccd..68bba39e9d2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.empty.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 f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); -}).then(t_pass, t_fail); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText("").width, 0, "ctx.measureText(\"\").width", "0"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html index 971a41e2936..bff53f4f0e4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.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'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150"); - _assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200"); - _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150"); - _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200"); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150"); + _assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200"); + _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150"); + _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200"); - _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100"); - _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100"); -}).then(t_pass, t_fail); + _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100"); + _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100"); + }).then(t_pass, t_fail); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js index a52c1d8367b..83020b34f58 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.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'); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); -var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); -let fonts = (self.fonts ? self.fonts : document.fonts); -f.load(); -fonts.add(f); -fonts.ready.then(function() { - ctx.font = '50px CanvasTest'; - _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150"); - _assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200"); - _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150"); - _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200"); - - _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100"); - _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100"); -}).then(t_pass, t_fail); + var f = new FontFace("CanvasTest", "url('/fonts/CanvasTest.ttf')"); + let fonts = (self.fonts ? self.fonts : document.fonts); + f.load(); + fonts.add(f); + fonts.ready.then(function() { + ctx.font = '50px CanvasTest'; + _assertSame(ctx.measureText('A B').width, 150, "ctx.measureText('A B').width", "150"); + _assertSame(ctx.measureText('A B').width, 200, "ctx.measureText('A B').width", "200"); + _assertSame(ctx.measureText('A \x09\x0a\x0c\x0d \x09\x0a\x0c\x0dB').width, 150, "ctx.measureText('A \\x09\\x0a\\x0c\\x0d \\x09\\x0a\\x0c\\x0dB').width", "150"); + _assert(ctx.measureText('A \x0b B').width >= 200, "ctx.measureText('A \\x0b B').width >= 200"); + _assertSame(ctx.measureText(' AB').width, 100, "ctx.measureText(' AB').width", "100"); + _assertSame(ctx.measureText('AB ').width, 100, "ctx.measureText('AB ').width", "100"); + }).then(t_pass, t_fail); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html index ed4752dfcb6..89d8fe3c7a8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.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'); -ctx.font = "math serif"; -t.done(); + ctx.font = "math serif"; + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.js index 39e3031ecf6..b756b45dc51 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/text/2d.text.setFont.mathFont.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'); - -ctx.font = "math serif"; -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.font = "math serif"; + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.html index 3a6e67b77e4..208043fbf6e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.save(); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -ctx.restore(); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.js index c602488d366..09c7dcca906 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.bitmap.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); -ctx.save(); -ctx.fillStyle = '#0f0'; -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 = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.restore(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.html index e96df9e2a4e..f4d6b6f6e1c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.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.save(); -ctx.rect(0, 0, 1, 1); -ctx.clip(); -ctx.restore(); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 1, 1); + ctx.clip(); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.js index 622d9416774..a7bc0615e50 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.clip.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.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 = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.save(); -ctx.rect(0, 0, 1, 1); -ctx.clip(); -ctx.restore(); -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.rect(0, 0, 1, 1); + ctx.clip(); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.html index 91b23bd47ac..789e1e8d2bc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.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'); -// Test that restore() undoes any modifications -var old = ctx.fillStyle; -ctx.save(); -ctx.fillStyle = "#ff0000"; -ctx.restore(); -_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + // Test that restore() undoes any modifications + var old = ctx.fillStyle; + ctx.save(); + ctx.fillStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); -// Also test that save() doesn't modify the values -ctx.fillStyle = "#ff0000"; -old = ctx.fillStyle; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.fillStyle = "#ff0000"; + old = ctx.fillStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.js index fa4d77328a6..46cf6d1daa0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.fillStyle.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'); -// Test that restore() undoes any modifications -var old = ctx.fillStyle; -ctx.save(); -ctx.fillStyle = "#ff0000"; -ctx.restore(); -_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); - -// Also test that save() doesn't modify the values -ctx.fillStyle = "#ff0000"; -old = ctx.fillStyle; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.fillStyle; + ctx.save(); + ctx.fillStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + // Also test that save() doesn't modify the values + ctx.fillStyle = "#ff0000"; + old = ctx.fillStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.fillStyle, old, "ctx.fillStyle", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.html index 01b9616bad7..15b59725ab9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.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'); -// Test that restore() undoes any modifications -var old = ctx.globalAlpha; -ctx.save(); -ctx.globalAlpha = 0.5; -ctx.restore(); -_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + // Test that restore() undoes any modifications + var old = ctx.globalAlpha; + ctx.save(); + ctx.globalAlpha = 0.5; + ctx.restore(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); -// Also test that save() doesn't modify the values -ctx.globalAlpha = 0.5; -old = ctx.globalAlpha; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.globalAlpha = 0.5; + old = ctx.globalAlpha; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.js index 8b11054673e..765f8b00a31 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalAlpha.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'); -// Test that restore() undoes any modifications -var old = ctx.globalAlpha; -ctx.save(); -ctx.globalAlpha = 0.5; -ctx.restore(); -_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); - -// Also test that save() doesn't modify the values -ctx.globalAlpha = 0.5; -old = ctx.globalAlpha; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.globalAlpha; + ctx.save(); + ctx.globalAlpha = 0.5; + ctx.restore(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + // Also test that save() doesn't modify the values + ctx.globalAlpha = 0.5; + old = ctx.globalAlpha; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.globalAlpha, old, "ctx.globalAlpha", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html index 557d3c074a8..1efb24aa9b6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.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'); -// Test that restore() undoes any modifications -var old = ctx.globalCompositeOperation; -ctx.save(); -ctx.globalCompositeOperation = "copy"; -ctx.restore(); -_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + // Test that restore() undoes any modifications + var old = ctx.globalCompositeOperation; + ctx.save(); + ctx.globalCompositeOperation = "copy"; + ctx.restore(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); -// Also test that save() doesn't modify the values -ctx.globalCompositeOperation = "copy"; -old = ctx.globalCompositeOperation; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "copy" -ctx.save(); -_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.globalCompositeOperation = "copy"; + old = ctx.globalCompositeOperation; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "copy" + ctx.save(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.js index 3534147b926..cd38d56c51f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.globalCompositeOperation.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'); -// Test that restore() undoes any modifications -var old = ctx.globalCompositeOperation; -ctx.save(); -ctx.globalCompositeOperation = "copy"; -ctx.restore(); -_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); - -// Also test that save() doesn't modify the values -ctx.globalCompositeOperation = "copy"; -old = ctx.globalCompositeOperation; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "copy" -ctx.save(); -_assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.globalCompositeOperation; + ctx.save(); + ctx.globalCompositeOperation = "copy"; + ctx.restore(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + // Also test that save() doesn't modify the values + ctx.globalCompositeOperation = "copy"; + old = ctx.globalCompositeOperation; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "copy" + ctx.save(); + _assertSame(ctx.globalCompositeOperation, old, "ctx.globalCompositeOperation", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.html index e02cbd46dda..5e651d0c7b1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.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'); -// Test that restore() undoes any modifications -var old = ctx.lineCap; -ctx.save(); -ctx.lineCap = "round"; -ctx.restore(); -_assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + // Test that restore() undoes any modifications + var old = ctx.lineCap; + ctx.save(); + ctx.lineCap = "round"; + ctx.restore(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); -// Also test that save() doesn't modify the values -ctx.lineCap = "round"; -old = ctx.lineCap; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "round" -ctx.save(); -_assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.lineCap = "round"; + old = ctx.lineCap; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.js index 70de46a6042..9895b44b003 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineCap.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'); -// Test that restore() undoes any modifications -var old = ctx.lineCap; -ctx.save(); -ctx.lineCap = "round"; -ctx.restore(); -_assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); - -// Also test that save() doesn't modify the values -ctx.lineCap = "round"; -old = ctx.lineCap; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "round" -ctx.save(); -_assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.lineCap; + ctx.save(); + ctx.lineCap = "round"; + ctx.restore(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + // Also test that save() doesn't modify the values + ctx.lineCap = "round"; + old = ctx.lineCap; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineCap, old, "ctx.lineCap", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.html index 92100e9d1fe..20f53fec50a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.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'); -// Test that restore() undoes any modifications -var old = ctx.lineJoin; -ctx.save(); -ctx.lineJoin = "round"; -ctx.restore(); -_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + // Test that restore() undoes any modifications + var old = ctx.lineJoin; + ctx.save(); + ctx.lineJoin = "round"; + ctx.restore(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); -// Also test that save() doesn't modify the values -ctx.lineJoin = "round"; -old = ctx.lineJoin; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "round" -ctx.save(); -_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.lineJoin = "round"; + old = ctx.lineJoin; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.js index 1da6db86be5..e8c85825f17 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineJoin.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'); -// Test that restore() undoes any modifications -var old = ctx.lineJoin; -ctx.save(); -ctx.lineJoin = "round"; -ctx.restore(); -_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); - -// Also test that save() doesn't modify the values -ctx.lineJoin = "round"; -old = ctx.lineJoin; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "round" -ctx.save(); -_assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.lineJoin; + ctx.save(); + ctx.lineJoin = "round"; + ctx.restore(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + // Also test that save() doesn't modify the values + ctx.lineJoin = "round"; + old = ctx.lineJoin; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "round" + ctx.save(); + _assertSame(ctx.lineJoin, old, "ctx.lineJoin", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.html index 24f9550792a..e234e3efc25 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.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'); -// Test that restore() undoes any modifications -var old = ctx.lineWidth; -ctx.save(); -ctx.lineWidth = 0.5; -ctx.restore(); -_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + // Test that restore() undoes any modifications + var old = ctx.lineWidth; + ctx.save(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); -// Also test that save() doesn't modify the values -ctx.lineWidth = 0.5; -old = ctx.lineWidth; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.lineWidth = 0.5; + old = ctx.lineWidth; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.js index 657ded5b76d..997748c3774 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.lineWidth.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'); -// Test that restore() undoes any modifications -var old = ctx.lineWidth; -ctx.save(); -ctx.lineWidth = 0.5; -ctx.restore(); -_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); - -// Also test that save() doesn't modify the values -ctx.lineWidth = 0.5; -old = ctx.lineWidth; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.lineWidth; + ctx.save(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + // Also test that save() doesn't modify the values + ctx.lineWidth = 0.5; + old = ctx.lineWidth; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.lineWidth, old, "ctx.lineWidth", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.html index b674467115b..1df2b2420f5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.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'); -// Test that restore() undoes any modifications -var old = ctx.miterLimit; -ctx.save(); -ctx.miterLimit = 0.5; -ctx.restore(); -_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + // Test that restore() undoes any modifications + var old = ctx.miterLimit; + ctx.save(); + ctx.miterLimit = 0.5; + ctx.restore(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); -// Also test that save() doesn't modify the values -ctx.miterLimit = 0.5; -old = ctx.miterLimit; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.miterLimit = 0.5; + old = ctx.miterLimit; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.js index 745f2919a08..eb5adffe06a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.miterLimit.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'); -// Test that restore() undoes any modifications -var old = ctx.miterLimit; -ctx.save(); -ctx.miterLimit = 0.5; -ctx.restore(); -_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); - -// Also test that save() doesn't modify the values -ctx.miterLimit = 0.5; -old = ctx.miterLimit; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 0.5 -ctx.save(); -_assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.miterLimit; + ctx.save(); + ctx.miterLimit = 0.5; + ctx.restore(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + // Also test that save() doesn't modify the values + ctx.miterLimit = 0.5; + old = ctx.miterLimit; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 0.5 + ctx.save(); + _assertSame(ctx.miterLimit, old, "ctx.miterLimit", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.html index 34c0b1e6d70..a86851af68c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.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.save(); -ctx.rect(0, 0, 100, 50); -ctx.restore(); -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.save(); + ctx.rect(0, 0, 100, 50); + ctx.restore(); + 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/the-canvas-state/2d.state.saverestore.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.worker.js index 24cec15972c..d174de5a508 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.path.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.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.save(); -ctx.rect(0, 0, 100, 50); -ctx.restore(); -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.save(); + ctx.rect(0, 0, 100, 50); + ctx.restore(); + ctx.fillStyle = '#0f0'; + ctx.fill(); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.html index af2ee91307f..044ee1b4bbb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowBlur; -ctx.save(); -ctx.shadowBlur = 5; -ctx.restore(); -_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + // Test that restore() undoes any modifications + var old = ctx.shadowBlur; + ctx.save(); + ctx.shadowBlur = 5; + ctx.restore(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); -// Also test that save() doesn't modify the values -ctx.shadowBlur = 5; -old = ctx.shadowBlur; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.shadowBlur = 5; + old = ctx.shadowBlur; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.js index 12acd3d294d..00cd6f8317b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowBlur.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowBlur; -ctx.save(); -ctx.shadowBlur = 5; -ctx.restore(); -_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowBlur = 5; -old = ctx.shadowBlur; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.shadowBlur; + ctx.save(); + ctx.shadowBlur = 5; + ctx.restore(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + // Also test that save() doesn't modify the values + ctx.shadowBlur = 5; + old = ctx.shadowBlur; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowBlur, old, "ctx.shadowBlur", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.html index 5aa01941009..0e8b4293e04 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowColor; -ctx.save(); -ctx.shadowColor = "#ff0000"; -ctx.restore(); -_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + // Test that restore() undoes any modifications + var old = ctx.shadowColor; + ctx.save(); + ctx.shadowColor = "#ff0000"; + ctx.restore(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); -// Also test that save() doesn't modify the values -ctx.shadowColor = "#ff0000"; -old = ctx.shadowColor; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.shadowColor = "#ff0000"; + old = ctx.shadowColor; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.js index b2f9fb92658..13c033f3968 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowColor.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowColor; -ctx.save(); -ctx.shadowColor = "#ff0000"; -ctx.restore(); -_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowColor = "#ff0000"; -old = ctx.shadowColor; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.shadowColor; + ctx.save(); + ctx.shadowColor = "#ff0000"; + ctx.restore(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + // Also test that save() doesn't modify the values + ctx.shadowColor = "#ff0000"; + old = ctx.shadowColor; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.shadowColor, old, "ctx.shadowColor", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.html index f281234801f..11aa658f3e7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowOffsetX; -ctx.save(); -ctx.shadowOffsetX = 5; -ctx.restore(); -_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetX; + ctx.save(); + ctx.shadowOffsetX = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); -// Also test that save() doesn't modify the values -ctx.shadowOffsetX = 5; -old = ctx.shadowOffsetX; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.shadowOffsetX = 5; + old = ctx.shadowOffsetX; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.js index 27118177557..a6ad9226474 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetX.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowOffsetX; -ctx.save(); -ctx.shadowOffsetX = 5; -ctx.restore(); -_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowOffsetX = 5; -old = ctx.shadowOffsetX; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetX; + ctx.save(); + ctx.shadowOffsetX = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + // Also test that save() doesn't modify the values + ctx.shadowOffsetX = 5; + old = ctx.shadowOffsetX; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetX, old, "ctx.shadowOffsetX", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.html index 643ce99a245..c238f0ec94d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowOffsetY; -ctx.save(); -ctx.shadowOffsetY = 5; -ctx.restore(); -_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetY; + ctx.save(); + ctx.shadowOffsetY = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); -// Also test that save() doesn't modify the values -ctx.shadowOffsetY = 5; -old = ctx.shadowOffsetY; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.shadowOffsetY = 5; + old = ctx.shadowOffsetY; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.js index aaa572a4d1d..323fcd14349 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.shadowOffsetY.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'); -// Test that restore() undoes any modifications -var old = ctx.shadowOffsetY; -ctx.save(); -ctx.shadowOffsetY = 5; -ctx.restore(); -_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); - -// Also test that save() doesn't modify the values -ctx.shadowOffsetY = 5; -old = ctx.shadowOffsetY; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against 5 -ctx.save(); -_assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.shadowOffsetY; + ctx.save(); + ctx.shadowOffsetY = 5; + ctx.restore(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + // Also test that save() doesn't modify the values + ctx.shadowOffsetY = 5; + old = ctx.shadowOffsetY; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against 5 + ctx.save(); + _assertSame(ctx.shadowOffsetY, old, "ctx.shadowOffsetY", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.html index 979176804b8..4a8750867fb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.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.lineWidth = 1; -ctx.save(); -ctx.lineWidth = 2; -ctx.save(); -ctx.lineWidth = 3; -_assertSame(ctx.lineWidth, 3, "ctx.lineWidth", "3"); -ctx.restore(); -_assertSame(ctx.lineWidth, 2, "ctx.lineWidth", "2"); -ctx.restore(); -_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); -t.done(); + ctx.lineWidth = 1; + ctx.save(); + ctx.lineWidth = 2; + ctx.save(); + ctx.lineWidth = 3; + _assertSame(ctx.lineWidth, 3, "ctx.lineWidth", "3"); + ctx.restore(); + _assertSame(ctx.lineWidth, 2, "ctx.lineWidth", "2"); + ctx.restore(); + _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.js index e1f078e90d1..460df4ec83a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stack.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.lineWidth = 1; -ctx.save(); -ctx.lineWidth = 2; -ctx.save(); -ctx.lineWidth = 3; -_assertSame(ctx.lineWidth, 3, "ctx.lineWidth", "3"); -ctx.restore(); -_assertSame(ctx.lineWidth, 2, "ctx.lineWidth", "2"); -ctx.restore(); -_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.lineWidth = 1; + ctx.save(); + ctx.lineWidth = 2; + ctx.save(); + ctx.lineWidth = 3; + _assertSame(ctx.lineWidth, 3, "ctx.lineWidth", "3"); + ctx.restore(); + _assertSame(ctx.lineWidth, 2, "ctx.lineWidth", "2"); + ctx.restore(); + _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html index 53dbc63c2ba..d536155e642 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.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'); -var limit = 512; -for (var i = 1; i < limit; ++i) -{ - ctx.save(); - ctx.lineWidth = i; -} -for (var i = limit-1; i > 0; --i) -{ - _assertSame(ctx.lineWidth, i, "ctx.lineWidth", "i"); - ctx.restore(); -} -t.done(); + var limit = 512; + for (var i = 1; i < limit; ++i) + { + ctx.save(); + ctx.lineWidth = i; + } + for (var i = limit-1; i > 0; --i) + { + _assertSame(ctx.lineWidth, i, "ctx.lineWidth", "i"); + ctx.restore(); + } + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.js index a485c194716..c494d9ddf88 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.stackdepth.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 limit = 512; -for (var i = 1; i < limit; ++i) -{ - ctx.save(); - ctx.lineWidth = i; -} -for (var i = limit-1; i > 0; --i) -{ - _assertSame(ctx.lineWidth, i, "ctx.lineWidth", "i"); - ctx.restore(); -} -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var limit = 512; + for (var i = 1; i < limit; ++i) + { + ctx.save(); + ctx.lineWidth = i; + } + for (var i = limit-1; i > 0; --i) + { + _assertSame(ctx.lineWidth, i, "ctx.lineWidth", "i"); + ctx.restore(); + } + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.html index 60963729f47..561205acd98 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.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'); -// Test that restore() undoes any modifications -var old = ctx.strokeStyle; -ctx.save(); -ctx.strokeStyle = "#ff0000"; -ctx.restore(); -_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + // Test that restore() undoes any modifications + var old = ctx.strokeStyle; + ctx.save(); + ctx.strokeStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); -// Also test that save() doesn't modify the values -ctx.strokeStyle = "#ff0000"; -old = ctx.strokeStyle; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); -ctx.restore(); -t.done(); + // Also test that save() doesn't modify the values + ctx.strokeStyle = "#ff0000"; + old = ctx.strokeStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + ctx.restore(); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.js index 275ba9e0725..878a6d68cb5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.strokeStyle.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'); -// Test that restore() undoes any modifications -var old = ctx.strokeStyle; -ctx.save(); -ctx.strokeStyle = "#ff0000"; -ctx.restore(); -_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); - -// Also test that save() doesn't modify the values -ctx.strokeStyle = "#ff0000"; -old = ctx.strokeStyle; - // we're not interested in failures caused by get(set(x)) != x (e.g. - // from rounding), so compare against 'old' instead of against "#ff0000" -ctx.save(); -_assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); -ctx.restore(); -t.done(); + // Test that restore() undoes any modifications + var old = ctx.strokeStyle; + ctx.save(); + ctx.strokeStyle = "#ff0000"; + ctx.restore(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + // Also test that save() doesn't modify the values + ctx.strokeStyle = "#ff0000"; + old = ctx.strokeStyle; + // we're not interested in failures caused by get(set(x)) != x (e.g. + // from rounding), so compare against 'old' instead of against "#ff0000" + ctx.save(); + _assertSame(ctx.strokeStyle, old, "ctx.strokeStyle", "old"); + ctx.restore(); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.html index fff2ead7036..79ecdece53b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.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.save(); -ctx.translate(200, 0); -ctx.restore(); -ctx.fillStyle = '#f00'; -ctx.fillRect(-200, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.translate(200, 0); + ctx.restore(); + ctx.fillStyle = '#f00'; + ctx.fillRect(-200, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.js index 64fb4c47347..1647dfb7900 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.transformation.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.save(); -ctx.translate(200, 0); -ctx.restore(); -ctx.fillStyle = '#f00'; -ctx.fillRect(-200, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + ctx.save(); + ctx.translate(200, 0); + ctx.restore(); + ctx.fillStyle = '#f00'; + ctx.fillRect(-200, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.html index 986d9668858..a6713adde2d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.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 i = 0; i < 16; ++i) - ctx.restore(); -ctx.lineWidth = 0.5; -ctx.restore(); -_assertSame(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5"); -t.done(); + for (var i = 0; i < 16; ++i) + ctx.restore(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.js index d38cf97417b..8ed4bcbc10a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-canvas-state/2d.state.saverestore.underflow.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 i = 0; i < 16; ++i) - ctx.restore(); -ctx.lineWidth = 0.5; -ctx.restore(); -_assertSame(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + for (var i = 0; i < 16; ++i) + ctx.restore(); + ctx.lineWidth = 0.5; + ctx.restore(); + _assertSame(ctx.lineWidth, 0.5, "ctx.lineWidth", "0.5"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.html index ec6ffe52926..6bc6eef2efa 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.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'); -var offscreenCanvas2 = new OffscreenCanvas(100, 50); -var d = ctx.canvas; -_assertDifferent(offscreenCanvas2, d, "offscreenCanvas2", "d"); -ctx.canvas = offscreenCanvas2; -_assertSame(ctx.canvas, d, "ctx.canvas", "d"); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var d = ctx.canvas; + _assertDifferent(offscreenCanvas2, d, "offscreenCanvas2", "d"); + ctx.canvas = offscreenCanvas2; + _assertSame(ctx.canvas, d, "ctx.canvas", "d"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.worker.js index 8f88efd6dc3..068c2c2019d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.readonly.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -var d = ctx.canvas; -_assertDifferent(offscreenCanvas2, d, "offscreenCanvas2", "d"); -ctx.canvas = offscreenCanvas2; -_assertSame(ctx.canvas, d, "ctx.canvas", "d"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + var d = ctx.canvas; + _assertDifferent(offscreenCanvas2, d, "offscreenCanvas2", "d"); + ctx.canvas = offscreenCanvas2; + _assertSame(ctx.canvas, d, "ctx.canvas", "d"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.html index 024b1fe7d55..c43afd816ae 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.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.canvas, canvas, "ctx.canvas", "canvas"); -t.done(); + _assertSame(ctx.canvas, canvas, "ctx.canvas", "canvas"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.worker.js index a80e5590535..a1578af07c0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.canvas.reference.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.canvas, canvas, "ctx.canvas", "canvas"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(ctx.canvas, canvas, "ctx.canvas", "canvas"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.html index 55bdf1cc191..73fc45c3096 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.html @@ -17,12 +17,12 @@ 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(100, 50); -_assertDifferent(offscreenCanvas2.getContext('2d'), null, "offscreenCanvas2.getContext('2d')", "null"); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + _assertDifferent(offscreenCanvas2.getContext('2d'), null, "offscreenCanvas2.getContext('2d')", "null"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.worker.js index 97f8cc745bb..0ed6f242484 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.exists.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -_assertDifferent(offscreenCanvas2.getContext('2d'), null, "offscreenCanvas2.getContext('2d')", "null"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + _assertDifferent(offscreenCanvas2.getContext('2d'), null, "offscreenCanvas2.getContext('2d')", "null"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.html index a57dbcb655a..2f57050a4d5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.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'); -_assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null"); -_assertDifferent(canvas.getContext('2d', 123), null, "canvas.getContext('2d', 123)", "null"); -_assertDifferent(canvas.getContext('2d', "test"), null, "canvas.getContext('2d', \"test\")", "null"); -_assertDifferent(canvas.getContext('2d', undefined), null, "canvas.getContext('2d', undefined)", "null"); -_assertDifferent(canvas.getContext('2d', null), null, "canvas.getContext('2d', null)", "null"); -_assertDifferent(canvas.getContext('2d', Symbol.hasInstance), null, "canvas.getContext('2d', Symbol.hasInstance)", "null"); -t.done(); + _assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent(canvas.getContext('2d', 123), null, "canvas.getContext('2d', 123)", "null"); + _assertDifferent(canvas.getContext('2d', "test"), null, "canvas.getContext('2d', \"test\")", "null"); + _assertDifferent(canvas.getContext('2d', undefined), null, "canvas.getContext('2d', undefined)", "null"); + _assertDifferent(canvas.getContext('2d', null), null, "canvas.getContext('2d', null)", "null"); + _assertDifferent(canvas.getContext('2d', Symbol.hasInstance), null, "canvas.getContext('2d', Symbol.hasInstance)", "null"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.worker.js index df330e301b7..88540513ab3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.cache.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'); - -_assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null"); -_assertDifferent(canvas.getContext('2d', 123), null, "canvas.getContext('2d', 123)", "null"); -_assertDifferent(canvas.getContext('2d', "test"), null, "canvas.getContext('2d', \"test\")", "null"); -_assertDifferent(canvas.getContext('2d', undefined), null, "canvas.getContext('2d', undefined)", "null"); -_assertDifferent(canvas.getContext('2d', null), null, "canvas.getContext('2d', null)", "null"); -_assertDifferent(canvas.getContext('2d', Symbol.hasInstance), null, "canvas.getContext('2d', Symbol.hasInstance)", "null"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent(canvas.getContext('2d', 123), null, "canvas.getContext('2d', 123)", "null"); + _assertDifferent(canvas.getContext('2d', "test"), null, "canvas.getContext('2d', \"test\")", "null"); + _assertDifferent(canvas.getContext('2d', undefined), null, "canvas.getContext('2d', undefined)", "null"); + _assertDifferent(canvas.getContext('2d', null), null, "canvas.getContext('2d', null)", "null"); + _assertDifferent(canvas.getContext('2d', Symbol.hasInstance), null, "canvas.getContext('2d', Symbol.hasInstance)", "null"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.html index a626318791f..a2869c45f6a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.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'); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, "2"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, \"2\")", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', 123), null, "(new OffscreenCanvas(100, 50)).getContext('2d', 123)", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', "test"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', \"test\")", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', undefined), null, "(new OffscreenCanvas(100, 50)).getContext('2d', undefined)", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', null), null, "(new OffscreenCanvas(100, 50)).getContext('2d', null)", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance), null, "(new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance)", "null"); -t.done(); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, "2"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', 123), null, "(new OffscreenCanvas(100, 50)).getContext('2d', 123)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', "test"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', \"test\")", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', undefined), null, "(new OffscreenCanvas(100, 50)).getContext('2d', undefined)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', null), null, "(new OffscreenCanvas(100, 50)).getContext('2d', null)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance), null, "(new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance)", "null"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.worker.js index f34c5a1d0e1..21d4f8ce6dd 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.extraargs.create.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'); - -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, "2"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, \"2\")", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', 123), null, "(new OffscreenCanvas(100, 50)).getContext('2d', 123)", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', "test"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', \"test\")", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', undefined), null, "(new OffscreenCanvas(100, 50)).getContext('2d', undefined)", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', null), null, "(new OffscreenCanvas(100, 50)).getContext('2d', null)", "null"); -_assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance), null, "(new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance)", "null"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, "2"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', 123), null, "(new OffscreenCanvas(100, 50)).getContext('2d', 123)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', "test"), null, "(new OffscreenCanvas(100, 50)).getContext('2d', \"test\")", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', undefined), null, "(new OffscreenCanvas(100, 50)).getContext('2d', undefined)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', null), null, "(new OffscreenCanvas(100, 50)).getContext('2d', null)", "null"); + _assertDifferent((new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance), null, "(new OffscreenCanvas(100, 50)).getContext('2d', Symbol.hasInstance)", "null"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.html index 6d6162528a8..c37664f9d37 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.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'); -var ctx2 = canvas.getContext('2d'); -ctx.fillStyle = '#f00'; -ctx2.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var ctx2 = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx2.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.worker.js index 4b8dd52e61d..936ca03c27b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.shared.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 ctx2 = canvas.getContext('2d'); -ctx.fillStyle = '#f00'; -ctx2.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var ctx2 = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx2.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.html index c7e71da63ab..945526c5d18 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.html @@ -17,12 +17,12 @@ 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(100, 50); -_assertSame(offscreenCanvas2.getContext('2d'), offscreenCanvas2.getContext('2d'), "offscreenCanvas2.getContext('2d')", "offscreenCanvas2.getContext('2d')"); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + _assertSame(offscreenCanvas2.getContext('2d'), offscreenCanvas2.getContext('2d'), "offscreenCanvas2.getContext('2d')", "offscreenCanvas2.getContext('2d')"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.worker.js index a2a744df61e..fbf8e3c68d2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/2d.getcontext.unique.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -_assertSame(offscreenCanvas2.getContext('2d'), offscreenCanvas2.getContext('2d'), "offscreenCanvas2.getContext('2d')", "offscreenCanvas2.getContext('2d')"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + _assertSame(offscreenCanvas2.getContext('2d'), offscreenCanvas2.getContext('2d'), "offscreenCanvas2.getContext('2d')", "offscreenCanvas2.getContext('2d')"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.html index b69f63cdfb2..4d5478e893a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.html @@ -17,12 +17,12 @@ 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(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(); }); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.worker.js index f03ca52328c..f20db3ad753 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.arguments.missing.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.html index e7ee0c63ba8..6183607aac5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.html @@ -17,12 +17,12 @@ 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(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('2D'); }); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('2D'); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.worker.js index 265fe959d24..a834a3e13f9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.casesensitive.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('2D'); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('2D'); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.html index c8f8943d9ed..b898698bb7e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.html @@ -17,12 +17,12 @@ 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(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(""); }); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(""); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.worker.js index 45612d386ca..df7d06df0c7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.emptystring.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(""); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext(""); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.html index d1b0f2fd179..5460fe10796 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.html @@ -17,12 +17,12 @@ 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(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('This is not an implemented context in any real browser'); }); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('This is not an implemented context in any real browser'); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.worker.js index cc50c2bdbd4..8dfee549820 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badname.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('This is not an implemented context in any real browser'); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext('This is not an implemented context in any real browser'); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.html index 30178af9279..72624be12cb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.html @@ -17,12 +17,12 @@ 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(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d#"); }); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d#"); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.worker.js index 7b3d8a09c8d..6cfcbc3c81b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.badsuffix.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d#"); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d#"); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.html index 2a22549baad..f36f7583fb9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.html @@ -17,12 +17,12 @@ 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(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d\0"); }); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d\0"); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.worker.js index b6594100f60..d9b563db61d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.nullsuffix.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d\0"); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2d\0"); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.html index 0c826595fe6..f8176f58dfb 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.html @@ -17,12 +17,12 @@ 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(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2\uFF44"); }); -t.done(); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2\uFF44"); }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.worker.js index cade5a20b53..2d02a794563 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/context.unrecognised.unicode.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 offscreenCanvas2 = new OffscreenCanvas(100, 50); -assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2\uFF44"); }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var offscreenCanvas2 = new OffscreenCanvas(100, 50); + assert_throws_js(TypeError, function() { offscreenCanvas2.getContext("2\uFF44"); }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.html index bfdcef7c4f9..d89b01df668 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.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'); -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.worker.js index 2a6e6e576c1..c9705727d99 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.color.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'); - -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.html index 76b76070d45..55954fc421a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.html @@ -17,72 +17,73 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -canvas.width = 100; -var default_val; - -default_val = ctx.strokeStyle; -ctx.strokeStyle = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); - -default_val = ctx.fillStyle; -ctx.fillStyle = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); - -default_val = ctx.globalAlpha; -ctx.globalAlpha = 0.5; -canvas.width = 100; -_assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); - -default_val = ctx.lineWidth; -ctx.lineWidth = 0.5; -canvas.width = 100; -_assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); - -default_val = ctx.lineCap; -ctx.lineCap = "round"; -canvas.width = 100; -_assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); - -default_val = ctx.lineJoin; -ctx.lineJoin = "round"; -canvas.width = 100; -_assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); - -default_val = ctx.miterLimit; -ctx.miterLimit = 0.5; -canvas.width = 100; -_assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); - -default_val = ctx.shadowOffsetX; -ctx.shadowOffsetX = 5; -canvas.width = 100; -_assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); - -default_val = ctx.shadowOffsetY; -ctx.shadowOffsetY = 5; -canvas.width = 100; -_assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); - -default_val = ctx.shadowBlur; -ctx.shadowBlur = 5; -canvas.width = 100; -_assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); - -default_val = ctx.shadowColor; -ctx.shadowColor = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); - -default_val = ctx.globalCompositeOperation; -ctx.globalCompositeOperation = "copy"; -canvas.width = 100; -_assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); - -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 100; + var default_val; + + default_val = ctx.strokeStyle; + ctx.strokeStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); + + default_val = ctx.fillStyle; + ctx.fillStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); + + default_val = ctx.globalAlpha; + ctx.globalAlpha = 0.5; + canvas.width = 100; + _assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); + + default_val = ctx.lineWidth; + ctx.lineWidth = 0.5; + canvas.width = 100; + _assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); + + default_val = ctx.lineCap; + ctx.lineCap = "round"; + canvas.width = 100; + _assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); + + default_val = ctx.lineJoin; + ctx.lineJoin = "round"; + canvas.width = 100; + _assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); + + default_val = ctx.miterLimit; + ctx.miterLimit = 0.5; + canvas.width = 100; + _assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); + + default_val = ctx.shadowOffsetX; + ctx.shadowOffsetX = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); + + default_val = ctx.shadowOffsetY; + ctx.shadowOffsetY = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); + + default_val = ctx.shadowBlur; + ctx.shadowBlur = 5; + canvas.width = 100; + _assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); + + default_val = ctx.shadowColor; + ctx.shadowColor = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); + + default_val = ctx.globalCompositeOperation; + ctx.globalCompositeOperation = "copy"; + canvas.width = 100; + _assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); + + t.done(); + }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.worker.js index 273c5f0bd68..dc0d6ea00b7 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.2dstate.worker.js @@ -13,72 +13,72 @@ var t_fail = t.step_func(function(reason) { }); t.step(function() { -var canvas = new OffscreenCanvas(100, 50); -var ctx = canvas.getContext('2d'); - -canvas.width = 100; -var default_val; - -default_val = ctx.strokeStyle; -ctx.strokeStyle = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); - -default_val = ctx.fillStyle; -ctx.fillStyle = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); - -default_val = ctx.globalAlpha; -ctx.globalAlpha = 0.5; -canvas.width = 100; -_assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); - -default_val = ctx.lineWidth; -ctx.lineWidth = 0.5; -canvas.width = 100; -_assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); - -default_val = ctx.lineCap; -ctx.lineCap = "round"; -canvas.width = 100; -_assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); - -default_val = ctx.lineJoin; -ctx.lineJoin = "round"; -canvas.width = 100; -_assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); - -default_val = ctx.miterLimit; -ctx.miterLimit = 0.5; -canvas.width = 100; -_assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); - -default_val = ctx.shadowOffsetX; -ctx.shadowOffsetX = 5; -canvas.width = 100; -_assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); - -default_val = ctx.shadowOffsetY; -ctx.shadowOffsetY = 5; -canvas.width = 100; -_assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); - -default_val = ctx.shadowBlur; -ctx.shadowBlur = 5; -canvas.width = 100; -_assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); - -default_val = ctx.shadowColor; -ctx.shadowColor = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); - -default_val = ctx.globalCompositeOperation; -ctx.globalCompositeOperation = "copy"; -canvas.width = 100; -_assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); - -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + + canvas.width = 100; + var default_val; + + default_val = ctx.strokeStyle; + ctx.strokeStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); + + default_val = ctx.fillStyle; + ctx.fillStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); + + default_val = ctx.globalAlpha; + ctx.globalAlpha = 0.5; + canvas.width = 100; + _assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); + + default_val = ctx.lineWidth; + ctx.lineWidth = 0.5; + canvas.width = 100; + _assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); + + default_val = ctx.lineCap; + ctx.lineCap = "round"; + canvas.width = 100; + _assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); + + default_val = ctx.lineJoin; + ctx.lineJoin = "round"; + canvas.width = 100; + _assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); + + default_val = ctx.miterLimit; + ctx.miterLimit = 0.5; + canvas.width = 100; + _assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); + + default_val = ctx.shadowOffsetX; + ctx.shadowOffsetX = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); + + default_val = ctx.shadowOffsetY; + ctx.shadowOffsetY = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); + + default_val = ctx.shadowBlur; + ctx.shadowBlur = 5; + canvas.width = 100; + _assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); + + default_val = ctx.shadowColor; + ctx.shadowColor = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); + + default_val = ctx.globalCompositeOperation; + ctx.globalCompositeOperation = "copy"; + canvas.width = 100; + _assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); + + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.html index 87a3e43be46..9b1354bdabf 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.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'); -canvas.width = 100; -ctx.rect(0, 0, 1, 1); -ctx.clip(); -canvas.width = 100; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 20,20, 0,255,0,255); -t.done(); + canvas.width = 100; + ctx.rect(0, 0, 1, 1); + ctx.clip(); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 20,20, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.worker.js index 45ee30d0809..d774aad6c81 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.clip.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'); - -canvas.width = 100; -ctx.rect(0, 0, 1, 1); -ctx.clip(); -canvas.width = 100; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 20,20, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 100; + ctx.rect(0, 0, 1, 1); + ctx.clip(); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 20,20, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.html index 632bc2fd69f..a5c891ff144 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.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'); -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 20,20, 255,0,0,255); -canvas.width = 50; -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 20,20, 255,0,0,255); + canvas.width = 50; + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.worker.js index 9d840a59632..dc8f4bd146d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.different.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, 50, 50); -_assertPixel(canvas, 20,20, 255,0,0,255); -canvas.width = 50; -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 20,20, 255,0,0,255); + canvas.width = 50; + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.html index 96819a07d3d..8b734d19b4b 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.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'); -canvas.width = 50; -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + canvas.width = 50; + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.worker.js index a18d11e86a0..dabc013fed6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.gradient.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'); - -canvas.width = 50; -var g = ctx.createLinearGradient(0, 0, 100, 0); -g.addColorStop(0, '#0f0'); -g.addColorStop(1, '#0f0'); -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = g; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 50; + var g = ctx.createLinearGradient(0, 0, 100, 0); + g.addColorStop(0, '#0f0'); + g.addColorStop(1, '#0f0'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.html index 3c9667ca5cb..24b7ff22fb9 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.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'); -canvas.width = 100; -ctx.rect(0, 0, 100, 50); -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fill(); -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + canvas.width = 100; + ctx.rect(0, 0, 100, 50); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fill(); + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.worker.js index 9f34734a58e..65352324149 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.path.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.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'); - -canvas.width = 100; -ctx.rect(0, 0, 100, 50); -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fill(); -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 100; + ctx.rect(0, 0, 100, 50); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fill(); + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.html index 3766795ba95..2742d8fb5ff 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.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'); -canvas.width = 30; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 30, 50); -var p = ctx.createPattern(canvas, 'repeat-x'); -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = p; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + canvas.width = 30; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 30, 50); + var p = ctx.createPattern(canvas, 'repeat-x'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = p; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.worker.js index 1fe6c01e2d3..a69f36e8736 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.pattern.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'); - -canvas.width = 30; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 30, 50); -var p = ctx.createPattern(canvas, 'repeat-x'); -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -ctx.fillStyle = p; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 30; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 30, 50); + var p = ctx.createPattern(canvas, 'repeat-x'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + ctx.fillStyle = p; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.html index bfcf05013ef..137dcbd556e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.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'); -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 20,20, 255,0,0,255); -canvas.width = 100; -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 20,20, 255,0,0,255); + canvas.width = 100; + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.worker.js index 00db682f70a..fd3c46482ba 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.same.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'); - -canvas.width = 100; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 50, 50); -_assertPixel(canvas, 20,20, 255,0,0,255); -canvas.width = 100; -_assertPixel(canvas, 20,20, 0,0,0,0); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 100; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 50, 50); + _assertPixel(canvas, 20,20, 255,0,0,255); + canvas.width = 100; + _assertPixel(canvas, 20,20, 0,0,0,0); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.html index 402b34f9c5c..d09f8f928f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.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'); -canvas.width = 100; -ctx.scale(0.1, 0.1); -canvas.width = 100; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 20,20, 0,255,0,255); -t.done(); + canvas.width = 100; + ctx.scale(0.1, 0.1); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 20,20, 0,255,0,255); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.worker.js index 3fb80d061ff..564a3bd82f4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.transform.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/initial.reset.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'); - -canvas.width = 100; -ctx.scale(0.1, 0.1); -canvas.width = 100; -ctx.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 20,20, 0,255,0,255); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 100; + ctx.scale(0.1, 0.1); + canvas.width = 100; + ctx.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 20,20, 0,255,0,255); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.html index 6ebd35fbd07..52ddf116e61 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.html @@ -17,12 +17,12 @@ 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(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 50, "canvas.height", "50"); -t.done(); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 50, "canvas.height", "50"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.worker.js index c77b8a49296..83e0271f1ab 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.default.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'); - -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 50, "canvas.height", "50"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 50, "canvas.height", "50"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.html index fda4e92603b..a815a7beb49 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.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'); -canvas.width = "100"; -canvas.height = "100"; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -canvas.width = "+1.5e2"; -canvas.height = "0x96"; -_assertSame(canvas.width, 150, "canvas.width", "150"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -canvas.width = 301.999; -canvas.height = 301.001; -_assertSame(canvas.width, 301, "canvas.width", "301"); -_assertSame(canvas.height, 301, "canvas.height", "301"); -assert_throws_js(TypeError, function() { canvas.width = "400x"; }); -assert_throws_js(TypeError, function() { canvas.height = "foo"; }); -_assertSame(canvas.width, 301, "canvas.width", "301"); -_assertSame(canvas.height, 301, "canvas.height", "301"); -t.done(); + canvas.width = "100"; + canvas.height = "100"; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + canvas.width = "+1.5e2"; + canvas.height = "0x96"; + _assertSame(canvas.width, 150, "canvas.width", "150"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + canvas.width = 301.999; + canvas.height = 301.001; + _assertSame(canvas.width, 301, "canvas.width", "301"); + _assertSame(canvas.height, 301, "canvas.height", "301"); + assert_throws_js(TypeError, function() { canvas.width = "400x"; }); + assert_throws_js(TypeError, function() { canvas.height = "foo"; }); + _assertSame(canvas.width, 301, "canvas.width", "301"); + _assertSame(canvas.height, 301, "canvas.height", "301"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.html index 4bf7b9c41b0..5a069f3c014 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.html @@ -17,14 +17,14 @@ 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'); -canvas.width = 0; -canvas.height = 0; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.worker.js index 2ecf19974ec..d51258ac2a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.set.zero.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'); - -canvas.width = 0; -canvas.height = 0; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.worker.js index 16350aeacd9..931b95cb65c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.idl.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'); - -canvas.width = "100"; -canvas.height = "100"; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -canvas.width = "+1.5e2"; -canvas.height = "0x96"; -_assertSame(canvas.width, 150, "canvas.width", "150"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -canvas.width = 301.999; -canvas.height = 301.001; -_assertSame(canvas.width, 301, "canvas.width", "301"); -_assertSame(canvas.height, 301, "canvas.height", "301"); -assert_throws_js(TypeError, function() { canvas.width = "400x"; }); -assert_throws_js(TypeError, function() { canvas.height = "foo"; }); -_assertSame(canvas.width, 301, "canvas.width", "301"); -_assertSame(canvas.height, 301, "canvas.height", "301"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = "100"; + canvas.height = "100"; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + canvas.width = "+1.5e2"; + canvas.height = "0x96"; + _assertSame(canvas.width, 150, "canvas.width", "150"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + canvas.width = 301.999; + canvas.height = 301.001; + _assertSame(canvas.width, 301, "canvas.width", "301"); + _assertSame(canvas.height, 301, "canvas.height", "301"); + assert_throws_js(TypeError, function() { canvas.width = "400x"; }); + assert_throws_js(TypeError, function() { canvas.height = "foo"; }); + _assertSame(canvas.width, 301, "canvas.width", "301"); + _assertSame(canvas.height, 301, "canvas.height", "301"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.html index a74fe158993..688d80b2fa6 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.html @@ -17,14 +17,14 @@ 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'); -canvas.width = '100.999'; -canvas.height = '100.999'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + canvas.width = '100.999'; + canvas.height = '100.999'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.worker.js index 7b982e8d877..157bd613bbc 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.decimal.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'); - -canvas.width = '100.999'; -canvas.height = '100.999'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = '100.999'; + canvas.height = '100.999'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.html index 5a8eee2c8ec..2e5056aad0d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.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(TypeError, function() { canvas.width = '100em'; }); -t.done(); + assert_throws_js(TypeError, function() { canvas.width = '100em'; }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.worker.js index a0248d4efcd..b939765ee4e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.em.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() { canvas.width = '100em'; }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { canvas.width = '100em'; }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.html index eab54b013f3..7755f9d0db2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.html @@ -17,14 +17,14 @@ 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'); -canvas.width = ''; -canvas.height = ''; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + canvas.width = ''; + canvas.height = ''; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.worker.js index 93b6cd6fc28..72fcd9f6e5a 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.empty.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'); - -canvas.width = ''; -canvas.height = ''; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = ''; + canvas.height = ''; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.html index abfddf18582..0a2f0125834 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.html @@ -17,14 +17,14 @@ 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'); -canvas.width = '100e1'; -canvas.height = '100e1'; -_assertSame(canvas.width, 1000.0, "canvas.width", "1000.0"); -_assertSame(canvas.height, 1000.0, "canvas.height", "1000.0"); -t.done(); + canvas.width = '100e1'; + canvas.height = '100e1'; + _assertSame(canvas.width, 1000.0, "canvas.width", "1000.0"); + _assertSame(canvas.height, 1000.0, "canvas.height", "1000.0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.worker.js index 79fb413f372..0b7d5f2b975 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.exp.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'); - -canvas.width = '100e1'; -canvas.height = '100e1'; -_assertSame(canvas.width, 1000.0, "canvas.width", "1000.0"); -_assertSame(canvas.height, 1000.0, "canvas.height", "1000.0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = '100e1'; + canvas.height = '100e1'; + _assertSame(canvas.width, 1000.0, "canvas.width", "1000.0"); + _assertSame(canvas.height, 1000.0, "canvas.height", "1000.0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.html index fba289087f3..5a8990183a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.html @@ -17,14 +17,14 @@ 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'); -canvas.width = '0x100'; -canvas.height = '0x100'; -_assertSame(canvas.width, 256, "canvas.width", "256"); -_assertSame(canvas.height, 256, "canvas.height", "256"); -t.done(); + canvas.width = '0x100'; + canvas.height = '0x100'; + _assertSame(canvas.width, 256, "canvas.width", "256"); + _assertSame(canvas.height, 256, "canvas.height", "256"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.worker.js index b178c556463..1edd0edee65 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.hex.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'); - -canvas.width = '0x100'; -canvas.height = '0x100'; -_assertSame(canvas.width, 256, "canvas.width", "256"); -_assertSame(canvas.height, 256, "canvas.height", "256"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = '0x100'; + canvas.height = '0x100'; + _assertSame(canvas.width, 256, "canvas.width", "256"); + _assertSame(canvas.height, 256, "canvas.height", "256"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.html index 3ffb674b9e6..10d2e20388f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.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(TypeError, function() { canvas.width = '#!?'; }); -t.done(); + assert_throws_js(TypeError, function() { canvas.width = '#!?'; }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.worker.js index 6efd3ae5c23..c7e18d12cb5 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.junk.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() { canvas.width = '#!?'; }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { canvas.width = '#!?'; }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.html index 56435547ca1..2a7d5d12968 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.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(TypeError, function() { canvas.width = '-100'; }); -t.done(); + assert_throws_js(TypeError, function() { canvas.width = '-100'; }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.worker.js index a5837528ef7..9680f907766 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.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() { canvas.width = '-100'; }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { canvas.width = '-100'; }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.html index d452217015f..3d9c2fb0443 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.html @@ -17,14 +17,14 @@ 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'); -canvas.width = '0100'; -canvas.height = '0100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + canvas.width = '0100'; + canvas.height = '0100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.worker.js index 23f228e368c..2925361e3b3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.octal.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'); - -canvas.width = '0100'; -canvas.height = '0100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = '0100'; + canvas.height = '0100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.html index 4164123fd1c..821de438aa4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.html @@ -17,14 +17,14 @@ 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'); -canvas.width = ' '; -canvas.height = ' '; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + canvas.width = ' '; + canvas.height = ' '; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.worker.js index a4b86624f7f..e5fadf13c8e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.onlyspace.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'); - -canvas.width = ' '; -canvas.height = ' '; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = ' '; + canvas.height = ' '; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.html index d6288e996ed..58748103a4f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.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(TypeError, function() { canvas.width = '100%'; }); -t.done(); + assert_throws_js(TypeError, function() { canvas.width = '100%'; }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.worker.js index e07fa60407a..acbd2a13548 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.percent.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() { canvas.width = '100%'; }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { canvas.width = '100%'; }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.html index 79d531f06e1..45558293b62 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.html @@ -17,14 +17,14 @@ 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'); -canvas.width = '+100'; -canvas.height = '+100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + canvas.width = '+100'; + canvas.height = '+100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.worker.js index 240a6bd7855..ecf67976769 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.plus.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'); - -canvas.width = '+100'; -canvas.height = '+100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = '+100'; + canvas.height = '+100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.html index 695afa54071..b0d63a4694f 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.html @@ -17,14 +17,14 @@ 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'); -canvas.width = ' 100'; -canvas.height = ' 100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + canvas.width = ' 100'; + canvas.height = ' 100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.worker.js index 29930209bf8..11ac398b0d4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.space.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'); - -canvas.width = ' 100'; -canvas.height = ' 100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = ' 100'; + canvas.height = ' 100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.html index fff231fda7b..536ea901d0e 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.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(TypeError, function() { canvas.width = '100#!?'; }); -t.done(); + assert_throws_js(TypeError, function() { canvas.width = '100#!?'; }); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.worker.js index f8d916c853d..1d1c5e7f28d 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.trailingjunk.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() { canvas.width = '100#!?'; }); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + assert_throws_js(TypeError, function() { canvas.width = '100#!?'; }); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.html index b7f0c4b9317..53a3a2e6055 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.html @@ -17,14 +17,14 @@ 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'); -canvas.width = ' 100'; -canvas.height = ' 100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + canvas.width = ' 100'; + canvas.height = ' 100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.worker.js index ea383981453..26296e10234 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.whitespace.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'); - -canvas.width = ' 100'; -canvas.height = ' 100'; -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = ' 100'; + canvas.height = ' 100'; + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.html index 9a84c955980..1af0d2a61e2 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.html @@ -17,14 +17,14 @@ 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'); -canvas.width = '0'; -canvas.height = '0'; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + canvas.width = '0'; + canvas.height = '0'; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.worker.js index 4d97a96b42e..5348bf6a83c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.zero.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'); - -canvas.width = '0'; -canvas.height = '0'; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = '0'; + canvas.height = '0'; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.html index 968dad9dda1..997bf974ad8 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.html @@ -17,14 +17,14 @@ 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'); -canvas.width = 120; -canvas.height = 60; -_assertSame(canvas.width, 120, "canvas.width", "120"); -_assertSame(canvas.height, 60, "canvas.height", "60"); -t.done(); + canvas.width = 120; + canvas.height = 60; + _assertSame(canvas.width, 120, "canvas.width", "120"); + _assertSame(canvas.height, 60, "canvas.height", "60"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.worker.js index 3f8050d549c..9555f665ab3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidl.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'); - -canvas.width = 120; -canvas.height = 60; -_assertSame(canvas.width, 120, "canvas.width", "120"); -_assertSame(canvas.height, 60, "canvas.height", "60"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 120; + canvas.height = 60; + _assertSame(canvas.width, 120, "canvas.width", "120"); + _assertSame(canvas.height, 60, "canvas.height", "60"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.html index 5f31f696cff..50e9096fdd4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.html @@ -17,14 +17,14 @@ 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'); -canvas.width = 0; -canvas.height = 0; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.worker.js index 4ace1f5edbe..e412b7a5142 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.attributes.reflect.setidlzero.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'); - -canvas.width = 0; -canvas.height = 0; -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + canvas.width = 0; + canvas.height = 0; + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.html index 9f41e2e23a2..46b8a055bb3 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.html +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.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'); -var n = 2147483647; // 2^31 - 1, which should be supported by any sensible definition of "long" -canvas.width = n; -canvas.height = n; -_assertSame(canvas.width, n, "canvas.width", "n"); -_assertSame(canvas.height, n, "canvas.height", "n"); -t.done(); + var n = 2147483647; // 2^31 - 1, which should be supported by any sensible definition of "long" + canvas.width = n; + canvas.height = n; + _assertSame(canvas.width, n, "canvas.width", "n"); + _assertSame(canvas.height, n, "canvas.height", "n"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.worker.js index b20ff54969c..6a5bb5ee7e0 100644 --- a/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.worker.js +++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/the-offscreen-canvas/size.large.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 n = 2147483647; // 2^31 - 1, which should be supported by any sensible definition of "long" -canvas.width = n; -canvas.height = n; -_assertSame(canvas.width, n, "canvas.width", "n"); -_assertSame(canvas.height, n, "canvas.height", "n"); -t.done(); + var canvas = new OffscreenCanvas(100, 50); + var ctx = canvas.getContext('2d'); + var n = 2147483647; // 2^31 - 1, which should be supported by any sensible definition of "long" + canvas.width = n; + canvas.height = n; + _assertSame(canvas.width, n, "canvas.width", "n"); + _assertSame(canvas.height, n, "canvas.height", "n"); + t.done(); }); done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/gentest.py b/tests/wpt/web-platform-tests/html/canvas/tools/gentest.py index bca7b9ecfcb..6574ff53238 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/gentest.py +++ b/tests/wpt/web-platform-tests/html/canvas/tools/gentest.py @@ -5,4 +5,4 @@ genTestUtils('../element', '../element', 'templates.yaml', 'name2dir-canvas.yaml', False) genTestUtils('../offscreen', '../offscreen', 'templates.yaml', 'name2dir-offscreen.yaml', True) -genTestUtils_union('templates-new.yaml', 'name2dir.yaml') +genTestUtils_union('name2dir.yaml') diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/gentest_union.py b/tests/wpt/web-platform-tests/html/canvas/tools/gentest_union.py index 62c1cde6a11..bde7c1bc061 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/gentest_union.py +++ b/tests/wpt/web-platform-tests/html/canvas/tools/gentest_union.py @@ -1,3 +1,3 @@ from gentestutilsunion import genTestUtils_union -genTestUtils_union('templates-new.yaml', 'name2dir-canvas.yaml') +genTestUtils_union('name2dir-canvas.yaml') diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/gentestutils.py b/tests/wpt/web-platform-tests/html/canvas/tools/gentestutils.py index 27412e40df5..8fa33e3975c 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/gentestutils.py +++ b/tests/wpt/web-platform-tests/html/canvas/tools/gentestutils.py @@ -35,6 +35,7 @@ import importlib import os import pathlib import sys +import textwrap try: import cairocffi as cairo # type: ignore @@ -199,7 +200,8 @@ def _generate_test(test: Mapping[str, str], templates: Mapping[str, str], r'@assert pixel .* 0,0,0,0;', test['code']): print('Probable incorrect pixel test in %s' % name) - code = _expand_test_code(test['code']) + code = _expand_test_code(test['code'].strip()) + code = textwrap.indent(code, ' ') expectation_html = '' if 'expected' in test and test['expected'] is not None: 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 bf5fdeee506..cf154c41894 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py +++ b/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py @@ -28,7 +28,7 @@ # # * Test the tests, add new ones to Git, remove deleted ones from Git, etc. -from typing import Any, List, Mapping, MutableMapping, Optional, Tuple +from typing import Any, List, Mapping, MutableMapping, Optional, Set, Tuple import re import collections @@ -36,6 +36,7 @@ import dataclasses import enum import importlib import itertools +import jinja2 import os import pathlib import sys @@ -61,12 +62,12 @@ class InvalidTestDefinitionError(Error): """Raised on invalid test definition.""" -def _simpleEscapeJS(string: str) -> str: +def _doubleQuoteEscape(string: str) -> str: return string.replace('\\', '\\\\').replace('"', '\\"') def _escapeJS(string: str) -> str: - string = _simpleEscapeJS(string) + string = _doubleQuoteEscape(string) # Kind of an ugly hack, for nicer failure-message output. string = re.sub(r'\[(\w+)\]', r'[\\""+(\1)+"\\"]', string) return string @@ -87,7 +88,10 @@ def _unroll(text: str) -> str: f = {b: 3}; """ patterns = [] # type: List[Tuple[str, List[str]]] - while match := re.search(r'<([^>]+)>', text): + while True: + match = re.search(r'<([^>]+)>', text) + if not match: + break key = f'@unroll_pattern_{len(patterns)}' values = text[match.start(1):match.end(1)] text = text[:match.start(0)] + key + text[match.end(0):] @@ -232,20 +236,20 @@ def _expand_test_code(code: str) -> str: return code -class CanvasType(str, enum.Enum): +class TestType(str, enum.Enum): HTML_CANVAS = 'htmlcanvas' OFFSCREEN_CANVAS = 'offscreencanvas' + WORKER = 'worker' -def _get_enabled_canvas_types(test: Mapping[str, Any]) -> List[CanvasType]: - return [CanvasType(t.lower()) for t in test.get('canvasType', CanvasType)] +def _get_enabled_test_types(test: Mapping[str, Any]) -> Set[TestType]: + return {TestType(t.lower()) for t in test.get('canvasType', TestType)} @dataclasses.dataclass class TestConfig: out_dir: str image_out_dir: str - enabled: bool _CANVAS_SIZE_REGEX = re.compile(r'(?P<width>.*), (?P<height>.*)', @@ -263,112 +267,78 @@ def _get_canvas_size(test: Mapping[str, Any]): return match.group('width'), match.group('height') -def _write_reference_test(is_js_ref: bool, templates: Mapping[str, str], - template_params: MutableMapping[str, str], - ref_code: str, canvas_path: Optional[str], - offscreen_path: Optional[str]): - ref_code = ref_code.strip() - ref_code = textwrap.indent(ref_code, ' ') if is_js_ref else ref_code - ref_template_name = 'element_ref_test' if is_js_ref else 'html_ref_test' +def _write_reference_test(test: Mapping[str, Any], + jinja_env: jinja2.Environment, + template_params: MutableMapping[str, Any], + enabled_tests: Set[TestType], + canvas_path: str, offscreen_path: str): + name = template_params["name"] + js_ref = test.get('reference') + html_ref = test.get('html_reference') + if js_ref is not None and html_ref is not None: + raise InvalidTestDefinitionError( + f'Test {name} is invalid, "reference" and "html_reference" can\'t ' + 'both be specified at the same time.') - code = template_params['code'] - template_params['code'] = textwrap.indent(code, ' ') - if canvas_path: + ref_params = template_params.copy() + ref_params.update({'code': js_ref or html_ref}) + ref_template_name = 'reftest_element.html' if js_ref else 'reftest.html' + if TestType.HTML_CANVAS in enabled_tests: + pathlib.Path(f'{canvas_path}-expected.html').write_text( + jinja_env.get_template(ref_template_name).render(ref_params), + 'utf-8') + if {TestType.OFFSCREEN_CANVAS, TestType.WORKER} & enabled_tests: + pathlib.Path(f'{offscreen_path}-expected.html').write_text( + jinja_env.get_template(ref_template_name).render(ref_params), + 'utf-8') + + params = template_params.copy() + params.update({ + 'ref_link': f'{name}-expected.html', + 'fuzzy': test.get('fuzzy') + }) + if TestType.HTML_CANVAS in enabled_tests: pathlib.Path(f'{canvas_path}.html').write_text( - templates['element_ref_test'] % template_params, 'utf-8') - if offscreen_path: + jinja_env.get_template("reftest_element.html").render(params), + 'utf-8') + if TestType.OFFSCREEN_CANVAS in enabled_tests: pathlib.Path(f'{offscreen_path}.html').write_text( - templates['offscreen_ref_test'] % template_params, 'utf-8') - template_params['code'] = textwrap.indent(code, ' ') + jinja_env.get_template("reftest_offscreen.html").render(params), + 'utf-8') + if TestType.WORKER in enabled_tests: pathlib.Path(f'{offscreen_path}.w.html').write_text( - templates['worker_ref_test'] % template_params, 'utf-8') - - template_params['code'] = ref_code - template_params['links'] = '' - template_params['fuzzy'] = '' - if canvas_path: - pathlib.Path(f'{canvas_path}-expected.html').write_text( - templates[ref_template_name] % template_params, 'utf-8') - if offscreen_path: - pathlib.Path(f'{offscreen_path}-expected.html').write_text( - templates[ref_template_name] % template_params, 'utf-8') + jinja_env.get_template("reftest_worker.html").render(params), + 'utf-8') -def _write_testharness_test(templates: Mapping[str, str], - template_params: MutableMapping[str, str], - canvas_path: Optional[str], - offscreen_path: Optional[str]): +def _write_testharness_test(jinja_env: jinja2.Environment, + template_params: MutableMapping[str, Any], + enabled_tests: Set[TestType], + canvas_path: str, + offscreen_path: str): # Create test cases for canvas and offscreencanvas. - code = template_params['code'] - template_params['code'] = textwrap.indent(code, ' ') - if canvas_path: + if TestType.HTML_CANVAS in enabled_tests: pathlib.Path(f'{canvas_path}.html').write_text( - templates['element'] % template_params, 'utf-8') - - if offscreen_path: - offscreen_template = templates['offscreen'] - worker_template = templates['worker'] + jinja_env.get_template("testharness_element.html").render( + template_params), 'utf-8') - if ('then(t_pass, t_fail);' in code): - offscreen_template = offscreen_template.replace('t.done();\n', '') - worker_template = worker_template.replace('t.done();\n', '') + template_params['done_needed'] = ('then(t_pass, t_fail);' + not in template_params['code']) + if TestType.OFFSCREEN_CANVAS in enabled_tests: pathlib.Path(f'{offscreen_path}.html').write_text( - offscreen_template % template_params, 'utf-8') + jinja_env.get_template("testharness_offscreen.html").render( + template_params), 'utf-8') + + if TestType.WORKER in enabled_tests: pathlib.Path(f'{offscreen_path}.worker.js').write_text( - worker_template % template_params, 'utf-8') - - -def _expand_template(template: str, template_params: Mapping[str, str]) -> str: - # Remove whole line comments. - template = re.sub(r'^ *#.*?\n', '', template, flags=re.MULTILINE) - # Remove trailing line comments. - template = re.sub(r' *#.*?$', '', template, flags=re.MULTILINE) - - # Unwrap lines ending with a backslash. - template = _remove_extra_newlines(template) - - content_without_nested_if = r'((?:(?!{%\s*(?:if|else|endif)[^%]*%}).)*?)' - - # Resolve {% if <cond> %}<content>{% else %}<alternate content>{% endif %} - if_else_regex = re.compile( - r'{%\s*if\s*([^\s%]+)\s*%}' + # {% if <cond> %} - content_without_nested_if + # content - r'{%\s*else\s*%}' + # {% else %} - content_without_nested_if + # alternate - r'{%\s*endif\s*%}', # {% endif %} - flags=re.MULTILINE | re.DOTALL) - while match := if_else_regex.search(template): - condition, content, alternate = match.groups() - substitution = content if template_params[condition] else alternate - template = ( - template[:match.start(0)] + substitution + template[match.end(0):]) - - # Resolve {% if <cond> %}<content>{% endif %} - if_regex = re.compile( - r'{%\s*if\s*([^\s%]+)\s*%}' + # {% if <cond> %} - content_without_nested_if + # content - r'{%\s*endif\s*%}', # {% endif %} - flags=re.MULTILINE | re.DOTALL) - while match := if_regex.search(template): - condition, content = match.groups() - substitution = content if template_params[condition] else '' - template = ( - template[:match.start(0)] + substitution + template[match.end(0):]) - - return template - - -def _expand_templates(templates: Mapping[str, str], - params: Mapping[str, str]) -> Mapping[str, str]: - return { - name: _expand_template(template, params) - for name, template in templates.items() - } + jinja_env.get_template("testharness_worker.js").render( + template_params), 'utf-8') -def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str], - sub_dir: str, html_canvas_cfg: TestConfig, +def _generate_test(test: Mapping[str, Any], jinja_env: jinja2.Environment, + sub_dir: str, enabled_tests: Set[TestType], + html_canvas_cfg: TestConfig, offscreen_canvas_cfg: TestConfig) -> None: name = test['name'] @@ -376,8 +346,6 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str], r'@assert pixel .* 0,0,0,0;', test['code']): print('Probable incorrect pixel test in %s' % name) - code_canvas = _expand_test_code(test['code']).strip() - expectation_html = '' if 'expected' in test and test['expected'] is not None: expected = test['expected'] @@ -394,17 +362,20 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str], r'surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, \1, \2)' r'\ncr = cairo.Context(surface)', expected) - expected_canvas = ( - expected + "\nsurface.write_to_png('%s.png')\n" % - os.path.join(html_canvas_cfg.image_out_dir, sub_dir, name)) - eval(compile(expected_canvas, '<test %s>' % name, 'exec'), {}, - {'cairo': cairo}) - - expected_offscreencanvas = ( - expected + "\nsurface.write_to_png('%s.png')\n" % os.path.join( - offscreen_canvas_cfg.image_out_dir, sub_dir, name)) - eval(compile(expected_offscreencanvas, '<test %s>' % name, 'exec'), - {}, {'cairo': cairo}) + if TestType.HTML_CANVAS in enabled_tests: + expected_canvas = ( + expected + "\nsurface.write_to_png('%s.png')\n" % + os.path.join(html_canvas_cfg.image_out_dir, sub_dir, name)) + eval(compile(expected_canvas, '<test %s>' % name, 'exec'), {}, + {'cairo': cairo}) + + if {TestType.OFFSCREEN_CANVAS, TestType.WORKER} & enabled_tests: + expected_offscreen = ( + expected + + "\nsurface.write_to_png('%s.png')\n" % os.path.join( + offscreen_canvas_cfg.image_out_dir, sub_dir, name)) + eval(compile(expected_offscreen, '<test %s>' % name, 'exec'), + {}, {'cairo': cairo}) expected_img = '%s.png' % name @@ -414,19 +385,8 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str], '<img src="%s" class="output expected" id="expected" ' 'alt="">' % expected_img) - canvas = ' ' + test['canvas'] if 'canvas' in test else '' width, height = _get_canvas_size(test) - notes = '<p class="notes">%s' % test['notes'] if 'notes' in test else '' - - links = f'<link rel="match" href="{name}-expected.html">\n' - fuzzy = ('<meta name=fuzzy content="%s">\n' % - test['fuzzy'] if 'fuzzy' in test else '') - timeout = ('<meta name="timeout" content="%s">\n' % - test['timeout'] if 'timeout' in test else '') - timeout_js = ('// META: timeout=%s\n' % test['timeout'] - if 'timeout' in test else '') - images = '' for src in test.get('images', []): img_id = src.split('/')[-1] @@ -441,31 +401,6 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str], '</svg>\n' % (src, img_id)) images = images.replace('../images/', '/images/') - fonts = '' - fonthack = '' - for font in test.get('fonts', []): - fonts += ('@font-face {\n font-family: %s;\n' - ' src: url("/fonts/%s.ttf");\n}\n' % (font, font)) - # Browsers require the font to actually be used in the page. - if test.get('fonthack', 1): - fonthack += ('<span style="font-family: %s; position: ' - 'absolute; visibility: hidden">A</span>\n' % font) - if fonts: - fonts = '<style>\n%s</style>\n' % fonts - - fallback = test.get('fallback', - '<p class="fallback">FAIL (fallback content)</p>') - - desc = test.get('desc', '') - escaped_desc = _simpleEscapeJS(desc) - - attributes = test.get('attributes', '') - if attributes: - context_args = "'2d', %s" % attributes.strip() - attributes = ', ' + attributes.strip() - else: - context_args = "'2d'" - is_promise_test = False if 'test_type' in test: if test['test_type'] == 'promise': @@ -478,24 +413,16 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str], template_params = { 'name': name, - 'desc': desc, - 'escaped_desc': escaped_desc, - 'notes': notes, + 'desc': test.get('desc', ''), + 'notes': test.get('notes', ''), 'images': images, - 'fonts': fonts, - 'fonthack': fonthack, - 'timeout': timeout, - 'timeout_js': timeout_js, - 'fuzzy': fuzzy, - 'links': links, - 'canvas': canvas, + 'timeout': test.get('timeout'), + 'canvas': test.get('canvas', ''), 'width': width, 'height': height, 'expected': expectation_html, - 'code': code_canvas, - 'fallback': fallback, - 'attributes': attributes, - 'context_args': context_args, + 'code': _expand_test_code(test['code']), + 'attributes': test.get('attributes', ''), 'promise_test': is_promise_test } @@ -505,41 +432,34 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str], canvas_path += '-manual' offscreen_path += '-manual' - js_reference = test.get('reference') - html_reference = test.get('html_reference') - if js_reference is not None and html_reference is not None: - raise InvalidTestDefinitionError( - f'Test {name} is invalid, "reference" and "html_reference" can\'t ' - 'both be specified at the same time.') - - templates = _expand_templates(templates, template_params) - - ref_code = js_reference or html_reference - if ref_code is not None: - _write_reference_test( - js_reference is not None, templates, template_params, ref_code, - canvas_path if html_canvas_cfg.enabled else None, - offscreen_path if offscreen_canvas_cfg.enabled else None) + if 'reference' in test or 'html_reference' in test: + _write_reference_test(test, jinja_env, template_params, enabled_tests, + canvas_path, offscreen_path) else: - _write_testharness_test( - templates, template_params, - canvas_path if html_canvas_cfg.enabled else None, - offscreen_path if offscreen_canvas_cfg.enabled else None) + _write_testharness_test(jinja_env, template_params, enabled_tests, + canvas_path, offscreen_path) -def genTestUtils_union(TEMPLATEFILE: str, NAME2DIRFILE: str) -> None: +def genTestUtils_union(NAME2DIRFILE: str) -> None: CANVASOUTPUTDIR = '../element' CANVASIMAGEOUTPUTDIR = '../element' OFFSCREENCANVASOUTPUTDIR = '../offscreen' OFFSCREENCANVASIMAGEOUTPUTDIR = '../offscreen' + jinja_env = jinja2.Environment( + loader=jinja2.PackageLoader("gentestutilsunion"), + keep_trailing_newline=True, + trim_blocks=True, + lstrip_blocks=True) + + jinja_env.filters['double_quote_escape'] = _doubleQuoteEscape + # Run with --test argument to run unit tests. if len(sys.argv) > 1 and sys.argv[1] == '--test': doctest = importlib.import_module('doctest') doctest.testmod() sys.exit() - templates = yaml.safe_load(pathlib.Path(TEMPLATEFILE).read_text()) name_to_sub_dir = yaml.safe_load(pathlib.Path(NAME2DIRFILE).read_text()) tests = [] @@ -590,28 +510,26 @@ def genTestUtils_union(TEMPLATEFILE: str, NAME2DIRFILE: str) -> None: name = test['name'] print('\r(%s)' % name, ' ' * 32, '\t') - enabled_canvas_types = _get_enabled_canvas_types(test) + enabled_test_types = _get_enabled_test_types(test) already_tested = used_tests[name].intersection( - enabled_canvas_types) + enabled_test_types) if already_tested: raise InvalidTestDefinitionError( f'Test {name} is defined twice for types {already_tested}') - used_tests[name].update(enabled_canvas_types) + used_tests[name].update(enabled_test_types) sub_dir = _get_test_sub_dir(name, name_to_sub_dir) _generate_test( test, - templates, + jinja_env, sub_dir, + enabled_test_types, html_canvas_cfg=TestConfig( out_dir=CANVASOUTPUTDIR, - image_out_dir=CANVASIMAGEOUTPUTDIR, - enabled=CanvasType.HTML_CANVAS in enabled_canvas_types), + image_out_dir=CANVASIMAGEOUTPUTDIR), offscreen_canvas_cfg=TestConfig( out_dir=OFFSCREENCANVASOUTPUTDIR, - image_out_dir=OFFSCREENCANVASIMAGEOUTPUTDIR, - enabled=CanvasType.OFFSCREEN_CANVAS in - enabled_canvas_types)) + image_out_dir=OFFSCREENCANVASIMAGEOUTPUTDIR)) print() 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 deleted file mode 100644 index 7d8ebfccf56..00000000000 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates-new.yaml +++ /dev/null @@ -1,237 +0,0 @@ -offscreen: | - <!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 vs. async test header: - {% if promise_test %}\ - promise_test(async t => { - {% else %}\ - var t = async_test("%(escaped_desc)s"); - var t_pass = t.done.bind(t); - var t_fail = t.step_func(function(reason) { - throw reason; - }); - t.step(function() { - {% endif %}\ - - ## Test body: - var canvas = new OffscreenCanvas(%(width)s, %(height)s); - var ctx = canvas.getContext(%(context_args)s); - - %(code)s\ - - ## Promise vs. async test footer: - {% if promise_test %}\ - - }, "%(desc)s"); - {% else %}\ - t.done(); - - }); - {% endif %}\ - </script> - -worker: | - %(timeout_js)s\ - // DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. - // OffscreenCanvas test in a worker:%(name)s - // Description:%(desc)s - // Note:%(notes)s - - importScripts("/resources/testharness.js"); - importScripts("/html/canvas/resources/canvas-tests.js"); - - ## Promise vs. async test header: - {% if promise_test %}\ - promise_test(async t => { - {% else %}\ - var t = async_test("%(escaped_desc)s"); - var t_pass = t.done.bind(t); - var t_fail = t.step_func(function(reason) { - throw reason; - }); - t.step(function() { - {% endif %}\ - - ## Test body: - var canvas = new OffscreenCanvas(%(width)s, %(height)s); - var ctx = canvas.getContext(%(context_args)s); - - %(code)s - t.done();\ - - ## Promise vs. async test footer: - {% if promise_test %}\ - }, "%(desc)s"); - {% else %}\ - }); - {% endif %}\ - done(); - -element: | - <!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 vs. async test header: - {% if promise_test %}\ - promise_test(async t => { - - var canvas = document.getElementById('c'); - var ctx = canvas.getContext('2d'%(attributes)s); - {% else %}\ - var t = async_test("%(escaped_desc)s"); - _addTest(function(canvas, ctx) { - {% endif %}\ - - ## Test body: - %(code)s - - ## Promise vs. async test footer: - {% if promise_test %}\ - }, "%(desc)s"); - {% else %}\ - }%(attributes)s); - {% endif %}\ - \ - </script> - %(images)s - -offscreen_ref_test: |- - <!DOCTYPE html> - <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> - {% if promise_test %}\ - <html class="reftest-wait"> - {% endif %}\ - %(links)s\ - %(fuzzy)s\ - %(timeout)s\ - <title>Canvas test: %(name)s</title> - <h1>%(name)s</h1> - <p class="desc">%(desc)s</p> - %(fonts)s%(fonthack)s%(notes)s<canvas id="canvas" width="%(width)s" height="%(height)s"%(canvas)s> - %(fallback)s - </canvas> - <script{% if promise_test %} type="module"{% endif %}> - const canvas = new OffscreenCanvas(%(width)s, %(height)s); - const ctx = canvas.getContext(%(context_args)s); - - %(code)s - - const outputCanvas = document.getElementById("canvas"); - outputCanvas.getContext(%(context_args)s).drawImage(canvas, 0, 0); - {% if promise_test %}\ - document.documentElement.classList.remove("reftest-wait"); - {% endif %}\ - </script> - %(images)s\ - {% if promise_test %}</html>{% endif %} - -worker_ref_test: | - <!DOCTYPE html> - <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> - <html class="reftest-wait"> - %(links)s\ - %(fuzzy)s\ - %(timeout)s\ - <title>Canvas test: %(name)s</title> - <h1>%(name)s</h1> - <p class="desc">%(desc)s</p> - %(fonts)s%(fonthack)s%(notes)s<canvas id="canvas" width="%(width)s" height="%(height)s"%(canvas)s> - %(fallback)s - </canvas> - <script id='myWorker' type='text/worker'> - self.onmessage = {% if promise_test %}async {% endif %}function(e) { - const canvas = new OffscreenCanvas(%(width)s, %(height)s); - const ctx = canvas.getContext('2d'); - - %(code)s - - const bitmap = canvas.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> - %(images)s\ - </html> - -element_ref_test: |- - <!DOCTYPE html> - <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> - {% if promise_test %}\ - <html class="reftest-wait"> - {% endif %}\ - %(links)s\ - %(fuzzy)s\ - %(timeout)s\ - <title>Canvas test: %(name)s</title> - <h1>%(name)s</h1> - <p class="desc">%(desc)s</p> - %(fonts)s%(fonthack)s%(notes)s<canvas id="canvas" width="%(width)s" height="%(height)s"%(canvas)s> - %(fallback)s - </canvas> - <script{% if promise_test %} type="module"{% endif %}> - const canvas = document.getElementById("canvas"); - const ctx = canvas.getContext(%(context_args)s); - - %(code)s - {% if promise_test %}\ - document.documentElement.classList.remove("reftest-wait"); - {% endif %}\ - </script> - %(images)s\ - {% if promise_test %}</html>{% endif %} - - -html_ref_test: |- - <!DOCTYPE html> - <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> - %(links)s\ - %(fuzzy)s\ - %(timeout)s\ - <title>Canvas test: %(name)s</title> - <h1>%(name)s</h1> - <p class="desc">%(desc)s</p> - %(fonts)s%(fonthack)s%(notes)s - %(code)s - %(images)s diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml index cb11f76db62..0806872cbd1 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates.yaml @@ -18,10 +18,11 @@ offscreen: | }); 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 + }); </script> @@ -42,8 +43,8 @@ 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 }); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest.html new file mode 100644 index 00000000000..8f98e164845 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +{% if ref_link %}<link rel="match" href="{{ ref_link }}"> +{% endif %} +{% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> +{% endif %} +{% if timeout %}<meta name="timeout" content="{{ timeout }}"> +{% endif %} +<title>Canvas test: {{ name }}</title> +<h1>{{ name }}</h1> +<p class="desc">{{ desc }}</p> +{% if notes %}<p class="notes">{{ notes }}{% endif %} + +{{ code | trim }} +{{ images -}} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_element.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_element.html new file mode 100644 index 00000000000..25445af6a4f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_element.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +{% if promise_test %}<html class="reftest-wait"> +{% endif %} +{% if ref_link %}<link rel="match" href="{{ ref_link }}"> +{% endif %} +{% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> +{% endif %} +{% if timeout %}<meta name="timeout" content="{{ timeout }}"> +{% endif %} +<title>Canvas test: {{ name }}</title> +<h1>{{ name }}</h1> +<p class="desc">{{ desc }}</p> +{% if notes %}<p class="notes">{{ notes }}{% endif %} +<canvas id="canvas" width="{{ width }}" height="{{ height }}"{{ canvas }}> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script{% if promise_test %} type="module"{% endif %}> + const canvas = document.getElementById("canvas"); + const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(2) }} + {% if promise_test %} + document.documentElement.classList.remove("reftest-wait"); + {% endif %} +</script> +{{ images -}} +{% if promise_test %}</html>{% endif %} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_offscreen.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_offscreen.html new file mode 100644 index 00000000000..4d8b7c9de54 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_offscreen.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +{% if promise_test %}<html class="reftest-wait"> +{% endif %} +{% if ref_link %}<link rel="match" href="{{ ref_link }}"> +{% endif %} +{% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> +{% endif %} +{% if timeout %}<meta name="timeout" content="{{ timeout }}"> +{% endif %} +<title>Canvas test: {{ name }}</title> +<h1>{{ name }}</h1> +<p class="desc">{{ desc }}</p> +{% if notes %}<p class="notes">{{ notes }}{% endif %} +<canvas id="canvas" width="{{ width }}" height="{{ height }}"{{ canvas }}> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script{% if promise_test %} type="module"{% endif %}> + const canvas = new OffscreenCanvas({{ width }}, {{ height }}); + const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(2) }} + + const outputCanvas = document.getElementById("canvas"); + outputCanvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}).drawImage(canvas, 0, 0); + {% if promise_test %} + document.documentElement.classList.remove("reftest-wait"); + {% endif %} +</script> +{{ images -}} +{% if promise_test %}</html>{% endif %} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_worker.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_worker.html new file mode 100644 index 00000000000..7ce9ca5b159 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/reftest_worker.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<html class="reftest-wait"> +{% if ref_link %}<link rel="match" href="{{ ref_link }}"> +{% endif %} +{% if fuzzy %}<meta name=fuzzy content="{{ fuzzy }}"> +{% endif %} +{% if timeout %}<meta name="timeout" content="{{ timeout }}"> +{% endif %} +<title>Canvas test: {{ name }}</title> +<h1>{{ name }}</h1> +<p class="desc">{{ desc }}</p> +{% if notes %}<p class="notes">{{ notes }}{% endif %} +<canvas id="canvas" width="{{ width }}" height="{{ height }}"{{ canvas }}> + <p class="fallback">FAIL (fallback content)</p> +</canvas> +<script id='myWorker' type='text/worker'> + self.onmessage = {% if promise_test %}async {% endif %}function(e) { + const canvas = new OffscreenCanvas({{ width }}, {{ height }}); + const ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(4) }} + + const bitmap = canvas.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'{% if attributes %}, {{ attributes }}{% endif %}); + outputCtx.drawImage(msg.data, 0, 0); + document.documentElement.classList.remove("reftest-wait"); + }); + worker.postMessage(null); +</script> +{{ images -}} +</html> diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_element.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_element.html new file mode 100644 index 00000000000..521fece50c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_element.html @@ -0,0 +1,46 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>Canvas test: {{ name }}</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>{{ name }}</h1> +<p class="desc">{{ desc }}</p> + +{% if notes %}<p class="notes">{{ notes }} +{% else %} + +{% endif %} +<p class="output">Actual output:</p> +<canvas id="c" class="output" width="{{ width }}" height="{{ height }}" + {{- canvas}}><p class="fallback">FAIL (fallback content)</p></canvas> +{{ expected }} +<ul id="d"></ul> +<script> + +{#- Promise vs. async test header: +#} +{% if promise_test %} +promise_test(async t => { + + var canvas = document.getElementById('c'); + var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); +{% else %} +var t = async_test("{{ desc | double_quote_escape }}"); +_addTest(function(canvas, ctx) { +{% endif %} + + {# Test body: #} + {{ code | trim | indent(2) }} + +{# Promise vs. async test footer: #} +{% if promise_test %} +}, "{{ desc }}"); +{% else %} +}{% if attributes %}, {{ attributes }}{% endif %}); +{% endif -%} + +</script> +{{ images }} diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_offscreen.html b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_offscreen.html new file mode 100644 index 00000000000..a6de83c4195 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_offscreen.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> +<title>OffscreenCanvas test: {{ name }}</title> +{% if timeout %}<meta name="timeout" content="{{ timeout }}">{% endif %} +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/html/canvas/resources/canvas-tests.js"></script> + +<h1>{{ name }}</h1> +<p class="desc">{{ desc }}</p> + +{% if notes %}<p class="notes">{{ notes }}{% endif +%} +<script> + +{#- Promise vs. async test header: +#} +{% if promise_test %} +promise_test(async t => { +{% else %} +var t = async_test("{{ desc | double_quote_escape }}"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { +{% endif %} + +{# Test body: #} + var canvas = new OffscreenCanvas({{ width }}, {{ height }}); + var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(2)}} + +{#- Promise vs. async test footer: +#} +{% if promise_test %} + +}, "{{ desc }}"); +{% else %} + t.done(); + +}); +{% endif %} +</script> diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_worker.js b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_worker.js new file mode 100644 index 00000000000..b6575b95a67 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates/testharness_worker.js @@ -0,0 +1,35 @@ +{% if timeout %}// META: timeout={{ timeout }}{% endif %} +// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. +// OffscreenCanvas test in a worker:{{ name }} +// Description:{{ desc }} +// Note:{% if notes %}<p class="notes">{{ notes }}{% endif +%} + +importScripts("/resources/testharness.js"); +importScripts("/html/canvas/resources/canvas-tests.js"); + +{# Promise vs. async test header: #} +{% if promise_test %} +promise_test(async t => { +{% else %} +var t = async_test("{{ desc | double_quote_escape }}"); +var t_pass = t.done.bind(t); +var t_fail = t.step_func(function(reason) { + throw reason; +}); +t.step(function() { +{% endif %} + +{# Test body: #} + var canvas = new OffscreenCanvas({{ width }}, {{ height }}); + var ctx = canvas.getContext('2d'{% if attributes %}, {{ attributes }}{% endif %}); + + {{ code | trim | indent(2)}} + t.done(); + +{#- Promise vs. async test footer: +#} +{% if promise_test %} +}, "{{ desc }}"); +{% else %} +}); +{% endif %} +done(); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/color_space.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/color_space.yaml index ba5d93e0b02..39556caf0a4 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/color_space.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/color_space.yaml @@ -1,7 +1,6 @@ - name: 2d.color.space.p3.to.p3 desc: test getImageData with display-p3 and uint8 from display p3 uint8 canvas - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' code: | var color_style = 'rgb(50, 100, 150)'; // [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255] @@ -19,8 +18,7 @@ - name: 2d.color.space.p3.to.srgb desc: test getImageData with srsb and uint8 from display p3 uint8 canvas - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' code: | var color_style = 'rgb(50, 100, 150)'; var pixel_expected = [50, 100, 150, 255]; @@ -37,8 +35,7 @@ - name: 2d.color.space.p3.toBlob.p3.canvas desc: test if toblob returns p3 data from p3 color space canvas - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | @@ -70,8 +67,7 @@ - name: 2d.color.space.p3.toDataURL.p3.canvas desc: test if toDataURL returns p3 data from canvas with p3 color space - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | @@ -99,8 +95,7 @@ - name: 2d.color.space.p3.toDataURL.jpeg.p3.canvas desc: test if toDataURL('image/jpeg') returns p3 data from canvas with p3 color space - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | @@ -128,8 +123,7 @@ - name: 2d.color.space.p3.toBlob.with.putImageData desc: Use putImageData to put some p3 data in canvas and test if toBlob returns the same data - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | @@ -167,8 +161,7 @@ - name: 2d.color.space.p3.toDataURL.with.putImageData desc: Use putImageData to put some p3 data in canvas and test if toDataURL returns the same data - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | @@ -203,8 +196,7 @@ - name: 2d.color.space.p3.fillText desc: Test if fillText can be used with a solid display-p3 color - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | deferTest(); @@ -243,8 +235,7 @@ - name: 2d.color.space.p3.strokeText desc: Test if strokeText can be used with a solid display-p3 color - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | @@ -285,8 +276,7 @@ - name: 2d.color.space.p3.fillText.shadow desc: Test if fillText can be used with a display-p3 shadow color - attributes: | - {colorSpace: "display-p3"} + attributes: '{colorSpace: "display-p3"}' canvasType: ['HTMLCanvas'] code: | 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 0051f07db23..bd7fae1d629 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 @@ -173,7 +173,7 @@ expected: green - name: 2d.composite.globalAlpha.canvas - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | var offscreenCanvas2 = new OffscreenCanvas(100, 50); var ctx2 = offscreenCanvas2.getContext('2d'); @@ -203,7 +203,7 @@ expected: green - name: 2d.composite.globalAlpha.canvaspattern - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | var offscreenCanvas2 = new OffscreenCanvas(100, 50); var ctx2 = offscreenCanvas2.getContext('2d'); @@ -218,7 +218,7 @@ @assert pixel 50,25 ==~ 2,253,0,255; - name: 2d.composite.globalAlpha.canvascopy - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | var offscreenCanvas2 = new OffscreenCanvas(100, 50); var ctx2 = offscreenCanvas2.getContext('2d'); 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 e1837342e6a..91b92b0092f 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 @@ -343,7 +343,7 @@ @assert pixel 99,49 ==~ 0,255,0,255; - name: 2d.drawImage.canvas - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | var offscreenCanvas2 = new OffscreenCanvas(100, 50); var ctx2 = offscreenCanvas2.getContext('2d'); @@ -357,7 +357,7 @@ @assert pixel 99,49 ==~ 0,255,0,255; - name: 2d.drawImage.zerocanvas - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | var offscreenCanvas2 = new OffscreenCanvas(0, 10); @assert throws INVALID_STATE_ERR ctx.drawImage(offscreenCanvas2, 0, 0); @@ -424,25 +424,15 @@ - name: 2d.drawImage.zerosource.image desc: drawImage with zero-sized source rectangle from image draws nothing without exception test_type: promise - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | 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); - }); - }); + const response = await fetch('/images/red-zerowidth.svg'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); expected: green - name: 2d.drawImage.negativesource @@ -519,7 +509,7 @@ - name: 2d.drawImage.outsidesource DISABLED: fix this to match the current spec (transparent black outside source) - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | const response_red = await fetch('/images/red.png'); const blob_red = await response_red.blob(); @@ -572,23 +562,13 @@ - name: 2d.drawImage.svg desc: drawImage() of an SVG image 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); - }); - }); + canvasType: ['OffscreenCanvas', 'Worker'] + code: | + const response = await fetch('/images/green.svg'); + const blob = await response.blob(); + const bitmap = await createImageBitmap(blob); + ctx.drawImage(bitmap, 0, 0); + _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2); expected: green - name: 2d.drawImage.animated.poster diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml index dd84f913f9b..9a90bed2482 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/filters.yaml @@ -61,7 +61,7 @@ - name: 2d.filter.canvasFilterObject.tentative desc: Test CanvasFilter() object - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | @assert ctx.filter == 'none'; ctx.filter = 'blur(5px)'; 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 fe1902c61b7..e0d2b3d793b 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 @@ -317,7 +317,7 @@ variants: convertToBlob: test_type: "promise" - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] flush_canvas: |- await canvas.convertToBlob(); createImageBitmap: @@ -352,7 +352,7 @@ - name: 2d.layer.render-opportunities.transferToImageBitmap desc: Checks that transferToImageBitmap flushes and rebuilds the state stack. size: 200, 200 - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | ctx.fillStyle = 'purple'; ctx.fillRect(60, 60, 75, 50); diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml index b9bdf3d2bdb..0643b047b17 100644 --- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml +++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/pixel-manipulation.yaml @@ -818,7 +818,7 @@ - name: 2d.imageData.put.cross desc: putImageData() accepts image data got from a different canvas - canvasType: ['OffscreenCanvas'] + canvasType: ['OffscreenCanvas', 'Worker'] code: | var offscreenCanvas2 = new OffscreenCanvas(100, 50); var ctx2 = offscreenCanvas2.getContext('2d'); diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.js b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.js index 0bfa72e2e54..5e259a5acc9 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.js +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/credentialless/shared-worker.https.window.js @@ -1,16 +1,60 @@ +// META: variant=?request_origin=same_origin&worker_coep=none&window_coep=none +// META: variant=?request_origin=same_origin&worker_coep=none&window_coep=credentialless +// META: variant=?request_origin=same_origin&worker_coep=credentialless&window_coep=none +// META: variant=?request_origin=same_origin&worker_coep=credentialless&window_coep=credentialless +// META: variant=?request_origin=cross_origin&worker_coep=none&window_coep=none +// META: variant=?request_origin=cross_origin&worker_coep=none&window_coep=credentialless +// META: variant=?request_origin=cross_origin&worker_coep=credentialless&window_coep=none +// META: variant=?request_origin=cross_origin&worker_coep=credentialless&window_coep=credentialless // META: timeout=long // META: script=/common/get-host-info.sub.js // META: script=/common/utils.js // META: script=/common/dispatcher/dispatcher.js // META: script=./resources/common.js +// Test description: +// Request a resource from a SharedWorker. Check the request's cookies. +// +// Variant: +// - The Window COEP policy: none or credentialless. +// - The SharedWorker COEP policy: none or credentialless. +// - The SharedWorker's request URL origin: same-origin or cross-origin. + const same_origin = get_host_info().HTTPS_ORIGIN; const cross_origin = get_host_info().HTTPS_REMOTE_ORIGIN; -const cookie_key = "credentialless_shared_worker"; +const cookie_key = token(); const cookie_same_origin = "same_origin"; const cookie_cross_origin = "cross_origin"; +const variants = new URLSearchParams(window.location.search); +const window_coep = variants.get('window_coep') == 'none' + ? coep_none + : coep_credentialless; +const worker_coep = variants.get('worker_coep') == 'none' + ? coep_none + : coep_credentialless; +const request_origin = variants.get('request_origin') == 'same-origin' + ? same_origin + : cross_origin; + +// When using COEP:credentialless: cross-origin no-cors request do not include +// credentials. Note: This must not depend on the window's COEP policy. +const worker_expected_cookie = + request_origin == same_origin + ? cookie_same_origin + : (worker_coep == coep_credentialless + ? undefined + : cookie_cross_origin); + +// From a JSON representing the `response` HTTP headers key-values, return the +// cookie corresponding to the `cookie_key`. +const get_cookie = (response) => { + const headers_credentialless = JSON.parse(response); + return parseCookies(headers_credentialless)[cookie_key]; +} + promise_test(async test => { + // 0. Populate cookies for the two origins. await Promise.all([ setCookie(same_origin, cookie_key, cookie_same_origin + cookie_same_site_none), @@ -18,102 +62,32 @@ promise_test(async test => { cookie_same_site_none), ]); - // One window with COEP:none. (control) - const w_control_token = token(); - const w_control_url = same_origin + executor_path + - coep_none + `&uuid=${w_control_token}` - const w_control = window.open(w_control_url); - add_completion_callback(() => w_control.close()); - - // One window with COEP:credentialless. (experiment) - const w_credentialless_token = token(); - const w_credentialless_url = same_origin + executor_path + - coep_credentialless + `&uuid=${w_credentialless_token}`; - const w_credentialless = window.open(w_credentialless_url); - add_completion_callback(() => w_credentialless.close()); - - let GetCookie = (response) => { - const headers_credentialless = JSON.parse(response); - return parseCookies(headers_credentialless)[cookie_key]; - } - - const sharedWorkerTest = function( - description, origin, coep_for_worker, - expected_cookies_control, - expected_cookies_credentialless) - { - promise_test_parallel(async t => { - // Create workers for both window. - const worker_token_1 = token(); - const worker_token_2 = token(); - - // Used to check for errors creating the DedicatedWorker. - const worker_error_1 = token(); - const worker_error_2 = token(); - - const w_worker_src_1 = same_origin + executor_worker_path + - coep_for_worker + `&uuid=${worker_token_1}`; - send(w_control_token, ` - let worker = new SharedWorker("${w_worker_src_1}", {}); - worker.onerror = () => { - send("${worker_error_1}", "Worker blocked"); - } - `); - - const w_worker_src_2 = same_origin + executor_worker_path + - coep_for_worker + `&uuid=${worker_token_2}`; - send(w_credentialless_token, ` - let worker = new SharedWorker("${w_worker_src_2}", {}); - worker.onerror = () => { - send("${worker_error_2}", "Worker blocked"); - } - `); - - // Fetch resources with the workers. - const request_token_1 = token(); - const request_token_2 = token(); - const request_url_1 = showRequestHeaders(origin, request_token_1); - const request_url_2 = showRequestHeaders(origin, request_token_2); - send(worker_token_1, - `fetch("${request_url_1}", {mode: 'no-cors', credentials: 'include'})`); - send(worker_token_2, - `fetch("${request_url_2}", {mode: 'no-cors', credentials: 'include'})`); - - const response_control = await Promise.race([ - receive(worker_error_1), - receive(request_token_1).then(GetCookie) - ]); - assert_equals(response_control, - expected_cookies_control, - "coep:none => "); - - const response_credentialless = await Promise.race([ - receive(worker_error_2), - receive(request_token_2).then(GetCookie) - ]); - assert_equals(response_credentialless, - expected_cookies_credentialless, - "coep:credentialless => "); - }, `fetch ${description}`) - }; - - sharedWorkerTest("same-origin", - same_origin, coep_none, - cookie_same_origin, - cookie_same_origin); - - sharedWorkerTest("same-origin + credentialless worker", - same_origin, coep_credentialless, - cookie_same_origin, - cookie_same_origin); - - sharedWorkerTest("cross-origin", - cross_origin, coep_none, - cookie_cross_origin, - cookie_cross_origin); + // 1. Create the popup with the `window_coep` COEP policy: + const popup = environments.document(window_coep)[0]; + + // 2. Create the worker with the `worker_coep` COEP policy: + const worker_token = token(); + const worker_error = token(); + const worker_src = same_origin + executor_worker_path + worker_coep + + `&uuid=${worker_token}`; + send(popup, ` + let worker = new SharedWorker("${worker_src}", {}); + worker.onerror = () => { + send("${worker_error}", "Worker blocked"); + } + `); + + // 3. Request the resource from the worker, with the `request_origin` origin. + const request_token = token(); + const request_url = showRequestHeaders(request_origin, request_token); + send(worker_token, `fetch("${request_url}", { + mode: 'no-cors', + credentials: 'include', + })`); + const request_cookie = await Promise.race([ + receive(worker_error), + receive(request_token).then(get_cookie) + ]); - sharedWorkerTest("cross-origin + credentialless worker", - cross_origin, coep_credentialless, - undefined, - undefined); + assert_equals(request_cookie, worker_expected_cookie); }) diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp-ro.https.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp-ro.https.html index b1da8cf77ce..b89030f218f 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp-ro.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp-ro.https.html @@ -23,21 +23,7 @@ let tests = [ "", "", "", - [ - { - "endpoint": reportOnlyEndpoint, - "report": { - "body": { - "disposition": "reporting", - "effectivePolicy": "restrict-properties", - "nextResponseURL": /uuid=EXECUTOR_UUID$/, // next document URL - "type": "navigation-from-response" - }, - "url": `${location.href}`, - "type": "coop" - } - } - ] + [] ], // Open a cross-origin popup with COOP unsafe-none, which mismatches with the @@ -48,21 +34,7 @@ let tests = [ "", "", "", - [ - { - "endpoint": reportOnlyEndpoint, - "report": { - "body": { - "disposition": "reporting", - "effectivePolicy": "restrict-properties", - "nextResponseURL": /uuid=EXECUTOR_UUID$/, // next document URL - "type": "navigation-from-response" - }, - "url": `${location.href}`, - "type": "coop" - } - } - ] + [] ], // Open a same-origin popup with COOP restrict-properties, which matches with diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp.https.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp.https.html index a8c11d7a4a8..6b31f7e0098 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-from-rp.https.html @@ -23,21 +23,7 @@ let tests = [ "", "", "", - [ - { - "endpoint": reportEndpoint, - "report": { - "body": { - "disposition": "enforce", - "effectivePolicy": "restrict-properties", - "nextResponseURL": /uuid=EXECUTOR_UUID$/, // next document URL - "type": "navigation-from-response" - }, - "url": `${location.href}`, - "type": "coop" - } - } - ] + [] ], // Open a cross-origin popup with COOP unsafe-none, which mismatches @@ -48,21 +34,7 @@ let tests = [ "", "", "", - [ - { - "endpoint": reportEndpoint, - "report": { - "body": { - "disposition": "enforce", - "effectivePolicy": "restrict-properties", - "nextResponseURL": /uuid=EXECUTOR_UUID$/, // next document URL - "type": "navigation-from-response" - }, - "url": `${location.href}`, - "type": "coop" - } - } - ] + [] ], // Open a same-origin popup with COOP restrict-properties, which matches with diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp-ro.https.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp-ro.https.html index eb808428634..c47e59cd8f1 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp-ro.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp-ro.https.html @@ -22,22 +22,7 @@ let tests = [ "", `restrict-properties; report-to="${popupReportOnlyEndpoint.name}"`, "", - [ - { - "endpoint": popupReportOnlyEndpoint, - "report": { - "body": { - "disposition": "reporting", - "effectivePolicy": "restrict-properties", - "previousResponseURL": `${location.href}`, - "referrer": `${location.origin}/`, - "type": "navigation-to-response" - }, - "url": /uuid=EXECUTOR_UUID$/, - "type": "coop" - } - } - ] + [] ], // Open a cross-origin popup with COOP report-only restrict-properties, which @@ -48,22 +33,7 @@ let tests = [ "", `restrict-properties; report-to="${popupReportOnlyEndpoint.name}"`, "", - [ - { - "endpoint": popupReportOnlyEndpoint, - "report": { - "body": { - "disposition": "reporting", - "effectivePolicy": "restrict-properties", - "previousResponseURL": "", - "referrer": `${location.origin}/`, - "type": "navigation-to-response" - }, - "url": /uuid=EXECUTOR_UUID$/, - "type": "coop" - } - } - ] + [] ], ]; diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp.https.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp.https.html index ad57afccf8f..ff60e8c5afd 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp.https.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/tentative/restrict-properties/reporting-to-rp.https.html @@ -22,22 +22,7 @@ let tests = [ "", "", "", - [ - { - "endpoint": popupReportEndpoint, - "report": { - "body": { - "disposition": "enforce", - "effectivePolicy": "restrict-properties", - "previousResponseURL": `${location.href}`, - "referrer": `${location.origin}/`, - "type": "navigation-to-response" - }, - "url": /uuid=EXECUTOR_UUID$/, - "type": "coop" - } - } - ] + [] ], // Open a cross-origin popup with COOP report-only restrict-properties, which @@ -48,22 +33,7 @@ let tests = [ "", "", "", - [ - { - "endpoint": popupReportEndpoint, - "report": { - "body": { - "disposition": "enforce", - "effectivePolicy": "restrict-properties", - "previousResponseURL": "", - "referrer": `${location.origin}/`, - "type": "navigation-to-response" - }, - "url": /uuid=EXECUTOR_UUID$/, - "type": "coop" - } - } - ] + [] ], ]; diff --git a/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs.html b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs.html index ddae91054ae..b5850e1c3c9 100644 --- a/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs.html +++ b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs.html @@ -12,7 +12,7 @@ When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level. - If there is no strong character, as in this test, the direction defaults to LTR." /> + If there is no strong character, the direction defaults to LTR." /> <style> body, textarea { font-size:18px; diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001-ref.html new file mode 100644 index 00000000000..1b128e61715 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001-ref.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Reference case for table bordercolor attribute behaving like border-color property</title> +<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<style> + table { margin: 5px } +</style> +<table> + <td>I should not have a border.</td> +</table> +<table> + <td>I should not have a border.</td> +</table> +<table> + <td>I should not have a border.</td> +</table> +<table> + <td>I should not have a border.</td> +</table> +<table style="border-color: lime; border-style: solid"> + <td>I should have a border.</td> +</table> +<table style="border-color: lime; border-style: solid"> + <td>I should have a border.</td> +</table> diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001.html new file mode 100644 index 00000000000..014abe3567a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-bordercolor-001.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test for table bordercolor attribute behaving like border-color property</title> +<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#tables-2"> +<link rel="match" href="table-bordercolor-001-ref.html"> +<meta name="assert" content="bordercolor is treated as a presentation hint, equivalent to setting the border-color property"> +<style> + table { margin: 5px } +</style> +<table bordercolor="red"> + <td>I should not have a border.</td> +</table> +<table style="border-color: red"> + <td>I should not have a border.</td> +</table> +<table bordercolor="red" style="border-width: 10px"> + <td>I should not have a border.</td> +</table> +<table style="border-color: red; border-width: 10px"> + <td>I should not have a border.</td> +</table> +<table bordercolor="lime" style="border-style: solid"> + <td>I should have a border.</td> +</table> +<table style="border-color: lime; border-style: solid"> + <td>I should have a border.</td> +</table> diff --git a/tests/wpt/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html b/tests/wpt/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html index ad5b69db21e..74989be5213 100644 --- a/tests/wpt/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html +++ b/tests/wpt/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-intrinsic-width-height.html @@ -5,7 +5,7 @@ <link rel="author" title="Sammy Gill" href="sammy.gill@apple.com" /> <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/7524" /> <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#replaced-elements" /> - <link rel="help" href="https://w3c.github.io/csswg-drafts/css-sizing-4/#aspect-ratio" /> + <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> </head> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_loadstart.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_loadstart.html index e0e1f510190..8570bfd111d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_loadstart.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/networkState_during_loadstart.html @@ -30,7 +30,7 @@ var tv = async_test("videoElement.networkState should be NETWORK_LOADING during var v = document.getElementById("v"); v.addEventListener("loadstart", function() { tv.step(function() { - assert_equals(a.networkState, + assert_equals(v.networkState, v.NETWORK_LOADING); }); tv.done(); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.context.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.context.html index b9d26011e28..51cf0a2ec6d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.context.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.context.html @@ -19,10 +19,9 @@ var t = async_test("checks CanvasRenderingContext2D prototype"); _addTest(function(canvas, ctx) { -_assertSame(Object.getPrototypeOf(CanvasRenderingContext2D.prototype), Object.prototype, "Object.getPrototypeOf(CanvasRenderingContext2D.prototype)", "Object.prototype"); -_assertSame(Object.getPrototypeOf(ctx), CanvasRenderingContext2D.prototype, "Object.getPrototypeOf(ctx)", "CanvasRenderingContext2D.prototype"); -t.done(); - + _assertSame(Object.getPrototypeOf(CanvasRenderingContext2D.prototype), Object.prototype, "Object.getPrototypeOf(CanvasRenderingContext2D.prototype)", "Object.prototype"); + _assertSame(Object.getPrototypeOf(ctx), CanvasRenderingContext2D.prototype, "Object.getPrototypeOf(ctx)", "CanvasRenderingContext2D.prototype"); + t.done(); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.readonly.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.readonly.html index 7f735b9413a..4b9e68108fe 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.readonly.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.readonly.html @@ -19,12 +19,11 @@ var t = async_test("CanvasRenderingContext2D.canvas is readonly"); _addTest(function(canvas, ctx) { -var c = document.createElement('canvas'); -var d = ctx.canvas; -_assertDifferent(c, d, "c", "d"); -ctx.canvas = c; -_assertSame(ctx.canvas, d, "ctx.canvas", "d"); - + var c = document.createElement('canvas'); + var d = ctx.canvas; + _assertDifferent(c, d, "c", "d"); + ctx.canvas = c; + _assertSame(ctx.canvas, d, "ctx.canvas", "d"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.reference.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.reference.html index dc841121a9c..182a0170a67 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.reference.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.canvas.reference.html @@ -19,8 +19,7 @@ var t = async_test("CanvasRenderingContext2D.canvas refers back to its canvas"); _addTest(function(canvas, ctx) { -_assertSame(ctx.canvas, canvas, "ctx.canvas", "canvas"); - + _assertSame(ctx.canvas, canvas, "ctx.canvas", "canvas"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.exists.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.exists.html index 30032a99300..a26bc4040c7 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.exists.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.exists.html @@ -19,8 +19,7 @@ var t = async_test("The 2D context is implemented"); _addTest(function(canvas, ctx) { -_assertDifferent(canvas.getContext('2d'), null, "canvas.getContext('2d')", "null"); - + _assertDifferent(canvas.getContext('2d'), null, "canvas.getContext('2d')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.cache.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.cache.html index 18d70064516..eb47929a09f 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.cache.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.cache.html @@ -19,13 +19,12 @@ var t = async_test("The 2D context doesn't throw with extra getContext arguments (cached)"); _addTest(function(canvas, ctx) { -_assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null"); -_assertDifferent(canvas.getContext('2d', 123), null, "canvas.getContext('2d', 123)", "null"); -_assertDifferent(canvas.getContext('2d', "test"), null, "canvas.getContext('2d', \"test\")", "null"); -_assertDifferent(canvas.getContext('2d', undefined), null, "canvas.getContext('2d', undefined)", "null"); -_assertDifferent(canvas.getContext('2d', null), null, "canvas.getContext('2d', null)", "null"); -_assertDifferent(canvas.getContext('2d', Symbol.hasInstance), null, "canvas.getContext('2d', Symbol.hasInstance)", "null"); - + _assertDifferent(canvas.getContext('2d', false, {}, [], 1, "2"), null, "canvas.getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent(canvas.getContext('2d', 123), null, "canvas.getContext('2d', 123)", "null"); + _assertDifferent(canvas.getContext('2d', "test"), null, "canvas.getContext('2d', \"test\")", "null"); + _assertDifferent(canvas.getContext('2d', undefined), null, "canvas.getContext('2d', undefined)", "null"); + _assertDifferent(canvas.getContext('2d', null), null, "canvas.getContext('2d', null)", "null"); + _assertDifferent(canvas.getContext('2d', Symbol.hasInstance), null, "canvas.getContext('2d', Symbol.hasInstance)", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.create.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.create.html index 980d1036953..0683e459c4b 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.create.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.extraargs.create.html @@ -19,13 +19,12 @@ var t = async_test("The 2D context doesn't throw with extra getContext arguments (new context)"); _addTest(function(canvas, ctx) { -_assertDifferent(document.createElement("canvas").getContext('2d', false, {}, [], 1, "2"), null, "document.createElement(\"canvas\").getContext('2d', false, {}, [], 1, \"2\")", "null"); -_assertDifferent(document.createElement("canvas").getContext('2d', 123), null, "document.createElement(\"canvas\").getContext('2d', 123)", "null"); -_assertDifferent(document.createElement("canvas").getContext('2d', "test"), null, "document.createElement(\"canvas\").getContext('2d', \"test\")", "null"); -_assertDifferent(document.createElement("canvas").getContext('2d', undefined), null, "document.createElement(\"canvas\").getContext('2d', undefined)", "null"); -_assertDifferent(document.createElement("canvas").getContext('2d', null), null, "document.createElement(\"canvas\").getContext('2d', null)", "null"); -_assertDifferent(document.createElement("canvas").getContext('2d', Symbol.hasInstance), null, "document.createElement(\"canvas\").getContext('2d', Symbol.hasInstance)", "null"); - + _assertDifferent(document.createElement("canvas").getContext('2d', false, {}, [], 1, "2"), null, "document.createElement(\"canvas\").getContext('2d', false, {}, [], 1, \"2\")", "null"); + _assertDifferent(document.createElement("canvas").getContext('2d', 123), null, "document.createElement(\"canvas\").getContext('2d', 123)", "null"); + _assertDifferent(document.createElement("canvas").getContext('2d', "test"), null, "document.createElement(\"canvas\").getContext('2d', \"test\")", "null"); + _assertDifferent(document.createElement("canvas").getContext('2d', undefined), null, "document.createElement(\"canvas\").getContext('2d', undefined)", "null"); + _assertDifferent(document.createElement("canvas").getContext('2d', null), null, "document.createElement(\"canvas\").getContext('2d', null)", "null"); + _assertDifferent(document.createElement("canvas").getContext('2d', Symbol.hasInstance), null, "document.createElement(\"canvas\").getContext('2d', Symbol.hasInstance)", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.invalid.args.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.invalid.args.html index ff592c9ba96..c3407d05003 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.invalid.args.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.invalid.args.html @@ -19,16 +19,15 @@ var t = async_test("Calling getContext with invalid arguments."); _addTest(function(canvas, ctx) { -_assertSame(canvas.getContext(''), null, "canvas.getContext('')", "null"); -_assertSame(canvas.getContext('2d#'), null, "canvas.getContext('2d#')", "null"); -_assertSame(canvas.getContext('This is clearly not a valid context name.'), null, "canvas.getContext('This is clearly not a valid context name.')", "null"); -_assertSame(canvas.getContext('2d\0'), null, "canvas.getContext('2d\\0')", "null"); -_assertSame(canvas.getContext('2\uFF44'), null, "canvas.getContext('2\\uFF44')", "null"); -_assertSame(canvas.getContext('2D'), null, "canvas.getContext('2D')", "null"); -assert_throws_js(TypeError, function() { canvas.getContext(); }); -_assertSame(canvas.getContext('null'), null, "canvas.getContext('null')", "null"); -_assertSame(canvas.getContext('undefined'), null, "canvas.getContext('undefined')", "null"); - + _assertSame(canvas.getContext(''), null, "canvas.getContext('')", "null"); + _assertSame(canvas.getContext('2d#'), null, "canvas.getContext('2d#')", "null"); + _assertSame(canvas.getContext('This is clearly not a valid context name.'), null, "canvas.getContext('This is clearly not a valid context name.')", "null"); + _assertSame(canvas.getContext('2d\0'), null, "canvas.getContext('2d\\0')", "null"); + _assertSame(canvas.getContext('2\uFF44'), null, "canvas.getContext('2\\uFF44')", "null"); + _assertSame(canvas.getContext('2D'), null, "canvas.getContext('2D')", "null"); + assert_throws_js(TypeError, function() { canvas.getContext(); }); + _assertSame(canvas.getContext('null'), null, "canvas.getContext('null')", "null"); + _assertSame(canvas.getContext('undefined'), null, "canvas.getContext('undefined')", "null"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html index 93c1603b695..54c1fd13fde 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.shared.html @@ -19,12 +19,11 @@ var t = async_test("getContext('2d') returns objects which share canvas state"); _addTest(function(canvas, ctx) { -var ctx2 = canvas.getContext('2d'); -ctx.fillStyle = '#f00'; -ctx2.fillStyle = '#0f0'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + var ctx2 = canvas.getContext('2d'); + ctx.fillStyle = '#f00'; + ctx2.fillStyle = '#0f0'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.unique.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.unique.html index 8632dad109c..c6e8980a20c 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.unique.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.getcontext.unique.html @@ -19,8 +19,7 @@ var t = async_test("getContext('2d') returns the same object"); _addTest(function(canvas, ctx) { -_assertSame(canvas.getContext('2d'), canvas.getContext('2d'), "canvas.getContext('2d')", "canvas.getContext('2d')"); - + _assertSame(canvas.getContext('2d'), canvas.getContext('2d'), "canvas.getContext('2d')", "canvas.getContext('2d')"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.scaled-manual.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.scaled-manual.html index ed91b714e08..28daf0bca5e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.scaled-manual.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.scaled-manual.html @@ -19,11 +19,10 @@ var t = async_test("CSS-scaled canvases get drawn correctly"); _addTest(function(canvas, ctx) { -ctx.fillStyle = '#00f'; -ctx.fillRect(0, 0, 50, 25); -ctx.fillStyle = '#0ff'; -ctx.fillRect(0, 0, 25, 10); - + ctx.fillStyle = '#00f'; + ctx.fillRect(0, 0, 50, 25); + ctx.fillStyle = '#0ff'; + ctx.fillRect(0, 0, 25, 10); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.exists.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.exists.html index e7fa25c46ef..e2c09e60d74 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.exists.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.exists.html @@ -19,8 +19,7 @@ var t = async_test("The 2D context interface is a property of 'window'"); _addTest(function(canvas, ctx) { -_assert(window.CanvasRenderingContext2D, "window.CanvasRenderingContext2D"); - + _assert(window.CanvasRenderingContext2D, "window.CanvasRenderingContext2D"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html index 1cb5e4869f9..151b40d36f4 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.extend.html @@ -19,15 +19,14 @@ var t = async_test("Interface methods can be added"); _addTest(function(canvas, ctx) { -window.CanvasRenderingContext2D.prototype.fillRectGreen = function (x, y, w, h) -{ - this.fillStyle = '#0f0'; - this.fillRect(x, y, w, h); -}; -ctx.fillStyle = '#f00'; -ctx.fillRectGreen(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + window.CanvasRenderingContext2D.prototype.fillRectGreen = function (x, y, w, h) + { + this.fillStyle = '#0f0'; + this.fillRect(x, y, w, h); + }; + ctx.fillStyle = '#f00'; + ctx.fillRectGreen(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html index bd95dac8af9..24ee5068bd5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.prototype.html @@ -19,17 +19,16 @@ var t = async_test("window.CanvasRenderingContext2D.prototype are not [[Writable]] and not [[Configurable]], and its methods are [[Configurable]]."); _addTest(function(canvas, ctx) { -_assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype"); -_assert(window.CanvasRenderingContext2D.prototype.fill, "window.CanvasRenderingContext2D.prototype.fill"); -window.CanvasRenderingContext2D.prototype = null; -_assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype"); -delete window.CanvasRenderingContext2D.prototype; -_assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype"); -window.CanvasRenderingContext2D.prototype.fill = 1; -_assertSame(window.CanvasRenderingContext2D.prototype.fill, 1, "window.CanvasRenderingContext2D.prototype.fill", "1"); -delete window.CanvasRenderingContext2D.prototype.fill; -_assertSame(window.CanvasRenderingContext2D.prototype.fill, undefined, "window.CanvasRenderingContext2D.prototype.fill", "undefined"); - + _assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype"); + _assert(window.CanvasRenderingContext2D.prototype.fill, "window.CanvasRenderingContext2D.prototype.fill"); + window.CanvasRenderingContext2D.prototype = null; + _assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype"); + delete window.CanvasRenderingContext2D.prototype; + _assert(window.CanvasRenderingContext2D.prototype, "window.CanvasRenderingContext2D.prototype"); + window.CanvasRenderingContext2D.prototype.fill = 1; + _assertSame(window.CanvasRenderingContext2D.prototype.fill, 1, "window.CanvasRenderingContext2D.prototype.fill", "1"); + delete window.CanvasRenderingContext2D.prototype.fill; + _assertSame(window.CanvasRenderingContext2D.prototype.fill, undefined, "window.CanvasRenderingContext2D.prototype.fill", "undefined"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html index 47aa5bb8235..aa0ec1cff4d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/2d.type.replace.html @@ -19,16 +19,15 @@ var t = async_test("Interface methods can be overridden"); _addTest(function(canvas, ctx) { -var fillRect = window.CanvasRenderingContext2D.prototype.fillRect; -window.CanvasRenderingContext2D.prototype.fillRect = function (x, y, w, h) -{ - this.fillStyle = '#0f0'; - fillRect.call(this, x, y, w, h); -}; -ctx.fillStyle = '#f00'; -ctx.fillRect(0, 0, 100, 50); -_assertPixel(canvas, 50,25, 0,255,0,255); - + var fillRect = window.CanvasRenderingContext2D.prototype.fillRect; + window.CanvasRenderingContext2D.prototype.fillRect = function (x, y, w, h) + { + this.fillStyle = '#0f0'; + fillRect.call(this, x, y, w, h); + }; + ctx.fillStyle = '#f00'; + ctx.fillRect(0, 0, 100, 50); + _assertPixel(canvas, 50,25, 0,255,0,255); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html index d0fd3d60221..a99cb5d3898 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html @@ -19,84 +19,83 @@ var t = async_test("Resetting the canvas state resets 2D state variables"); _addTest(function(canvas, ctx) { -canvas.width = 100; -var default_val; - -default_val = ctx.strokeStyle; -ctx.strokeStyle = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); - -default_val = ctx.fillStyle; -ctx.fillStyle = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); - -default_val = ctx.globalAlpha; -ctx.globalAlpha = 0.5; -canvas.width = 100; -_assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); - -default_val = ctx.lineWidth; -ctx.lineWidth = 0.5; -canvas.width = 100; -_assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); - -default_val = ctx.lineCap; -ctx.lineCap = "round"; -canvas.width = 100; -_assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); - -default_val = ctx.lineJoin; -ctx.lineJoin = "round"; -canvas.width = 100; -_assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); - -default_val = ctx.miterLimit; -ctx.miterLimit = 0.5; -canvas.width = 100; -_assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); - -default_val = ctx.shadowOffsetX; -ctx.shadowOffsetX = 5; -canvas.width = 100; -_assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); - -default_val = ctx.shadowOffsetY; -ctx.shadowOffsetY = 5; -canvas.width = 100; -_assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); - -default_val = ctx.shadowBlur; -ctx.shadowBlur = 5; -canvas.width = 100; -_assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); - -default_val = ctx.shadowColor; -ctx.shadowColor = "#ff0000"; -canvas.width = 100; -_assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); - -default_val = ctx.globalCompositeOperation; -ctx.globalCompositeOperation = "copy"; -canvas.width = 100; -_assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); - -default_val = ctx.font; -ctx.font = "25px serif"; -canvas.width = 100; -_assertSame(ctx.font, default_val, "ctx.font", "default_val"); - -default_val = ctx.textAlign; -ctx.textAlign = "center"; -canvas.width = 100; -_assertSame(ctx.textAlign, default_val, "ctx.textAlign", "default_val"); - -default_val = ctx.textBaseline; -ctx.textBaseline = "bottom"; -canvas.width = 100; -_assertSame(ctx.textBaseline, default_val, "ctx.textBaseline", "default_val"); - + canvas.width = 100; + var default_val; + + default_val = ctx.strokeStyle; + ctx.strokeStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.strokeStyle, default_val, "ctx.strokeStyle", "default_val"); + + default_val = ctx.fillStyle; + ctx.fillStyle = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.fillStyle, default_val, "ctx.fillStyle", "default_val"); + + default_val = ctx.globalAlpha; + ctx.globalAlpha = 0.5; + canvas.width = 100; + _assertSame(ctx.globalAlpha, default_val, "ctx.globalAlpha", "default_val"); + + default_val = ctx.lineWidth; + ctx.lineWidth = 0.5; + canvas.width = 100; + _assertSame(ctx.lineWidth, default_val, "ctx.lineWidth", "default_val"); + + default_val = ctx.lineCap; + ctx.lineCap = "round"; + canvas.width = 100; + _assertSame(ctx.lineCap, default_val, "ctx.lineCap", "default_val"); + + default_val = ctx.lineJoin; + ctx.lineJoin = "round"; + canvas.width = 100; + _assertSame(ctx.lineJoin, default_val, "ctx.lineJoin", "default_val"); + + default_val = ctx.miterLimit; + ctx.miterLimit = 0.5; + canvas.width = 100; + _assertSame(ctx.miterLimit, default_val, "ctx.miterLimit", "default_val"); + + default_val = ctx.shadowOffsetX; + ctx.shadowOffsetX = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetX, default_val, "ctx.shadowOffsetX", "default_val"); + + default_val = ctx.shadowOffsetY; + ctx.shadowOffsetY = 5; + canvas.width = 100; + _assertSame(ctx.shadowOffsetY, default_val, "ctx.shadowOffsetY", "default_val"); + + default_val = ctx.shadowBlur; + ctx.shadowBlur = 5; + canvas.width = 100; + _assertSame(ctx.shadowBlur, default_val, "ctx.shadowBlur", "default_val"); + + default_val = ctx.shadowColor; + ctx.shadowColor = "#ff0000"; + canvas.width = 100; + _assertSame(ctx.shadowColor, default_val, "ctx.shadowColor", "default_val"); + + default_val = ctx.globalCompositeOperation; + ctx.globalCompositeOperation = "copy"; + canvas.width = 100; + _assertSame(ctx.globalCompositeOperation, default_val, "ctx.globalCompositeOperation", "default_val"); + + default_val = ctx.font; + ctx.font = "25px serif"; + canvas.width = 100; + _assertSame(ctx.font, default_val, "ctx.font", "default_val"); + + default_val = ctx.textAlign; + ctx.textAlign = "center"; + canvas.width = 100; + _assertSame(ctx.textAlign, default_val, "ctx.textAlign", "default_val"); + + default_val = ctx.textBaseline; + ctx.textBaseline = "bottom"; + canvas.width = 100; + _assertSame(ctx.textBaseline, default_val, "ctx.textBaseline", "default_val"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html index d1954aa3eb3..613cf0e11a5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.decimal.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100.999', "canvas.getAttribute('width')", "'100.999'"); -_assertSame(canvas.getAttribute('height'), '100.999', "canvas.getAttribute('height')", "'100.999'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100.999', "canvas.getAttribute('width')", "'100.999'"); + _assertSame(canvas.getAttribute('height'), '100.999', "canvas.getAttribute('height')", "'100.999'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html index 3fc93a5c4b1..21d9e6ab1e8 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.em.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100em', "canvas.getAttribute('width')", "'100em'"); -_assertSame(canvas.getAttribute('height'), '100em', "canvas.getAttribute('height')", "'100em'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100em', "canvas.getAttribute('width')", "'100em'"); + _assertSame(canvas.getAttribute('height'), '100em', "canvas.getAttribute('height')", "'100em'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.empty.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.empty.html index df58fcbb0d2..7198ccd3abf 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.empty.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.empty.html @@ -19,11 +19,10 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), '', "canvas.getAttribute('width')", "''"); -_assertSame(canvas.getAttribute('height'), '', "canvas.getAttribute('height')", "''"); - + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), '', "canvas.getAttribute('width')", "''"); + _assertSame(canvas.getAttribute('height'), '', "canvas.getAttribute('height')", "''"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html index f59ea05fecc..c609939640b 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.exp.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100e1', "canvas.getAttribute('width')", "'100e1'"); -_assertSame(canvas.getAttribute('height'), '100e1', "canvas.getAttribute('height')", "'100e1'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100e1', "canvas.getAttribute('width')", "'100e1'"); + _assertSame(canvas.getAttribute('height'), '100e1', "canvas.getAttribute('height')", "'100e1'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html index 1b9b741b20b..a00bb3c4ea2 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.hex.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); -_assertSame(canvas.getAttribute('width'), '0x100', "canvas.getAttribute('width')", "'0x100'"); -_assertSame(canvas.getAttribute('height'), '0x100', "canvas.getAttribute('height')", "'0x100'"); - + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); + _assertSame(canvas.getAttribute('width'), '0x100', "canvas.getAttribute('width')", "'0x100'"); + _assertSame(canvas.getAttribute('height'), '0x100', "canvas.getAttribute('height')", "'0x100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.junk.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.junk.html index 72e2edbbe7c..7b4f837600d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.junk.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.junk.html @@ -19,11 +19,10 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), '#!?', "canvas.getAttribute('width')", "'#!?'"); -_assertSame(canvas.getAttribute('height'), '#!?', "canvas.getAttribute('height')", "'#!?'"); - + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), '#!?', "canvas.getAttribute('width')", "'#!?'"); + _assertSame(canvas.getAttribute('height'), '#!?', "canvas.getAttribute('height')", "'#!?'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.minus.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.minus.html index 779879d6a80..6d6560b8db9 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.minus.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.minus.html @@ -19,11 +19,10 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), '-100', "canvas.getAttribute('width')", "'-100'"); -_assertSame(canvas.getAttribute('height'), '-100', "canvas.getAttribute('height')", "'-100'"); - + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), '-100', "canvas.getAttribute('width')", "'-100'"); + _assertSame(canvas.getAttribute('height'), '-100', "canvas.getAttribute('height')", "'-100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html index b795d1651a7..e1f42ea1886 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.octal.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '0100', "canvas.getAttribute('width')", "'0100'"); -_assertSame(canvas.getAttribute('height'), '0100', "canvas.getAttribute('height')", "'0100'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '0100', "canvas.getAttribute('width')", "'0100'"); + _assertSame(canvas.getAttribute('height'), '0100', "canvas.getAttribute('height')", "'0100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.onlyspace.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.onlyspace.html index 3a1253257e1..20721dcc6fa 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.onlyspace.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.onlyspace.html @@ -19,11 +19,10 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), ' ', "canvas.getAttribute('width')", "' '"); -_assertSame(canvas.getAttribute('height'), ' ', "canvas.getAttribute('height')", "' '"); - + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), ' ', "canvas.getAttribute('width')", "' '"); + _assertSame(canvas.getAttribute('height'), ' ', "canvas.getAttribute('height')", "' '"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html index bcaaa0e858f..860703c6c2e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.percent.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100%', "canvas.getAttribute('width')", "'100%'"); -_assertSame(canvas.getAttribute('height'), '100%', "canvas.getAttribute('height')", "'100%'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100%', "canvas.getAttribute('width')", "'100%'"); + _assertSame(canvas.getAttribute('height'), '100%', "canvas.getAttribute('height')", "'100%'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html index 5ef717020ca..2b600941a8d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.plus.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '+100', "canvas.getAttribute('width')", "'+100'"); -_assertSame(canvas.getAttribute('height'), '+100', "canvas.getAttribute('height')", "'+100'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '+100', "canvas.getAttribute('width')", "'+100'"); + _assertSame(canvas.getAttribute('height'), '+100', "canvas.getAttribute('height')", "'+100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html index 0f12f4dd85e..34cae4d4c90 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.space.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), ' 100', "canvas.getAttribute('width')", "' 100'"); -_assertSame(canvas.getAttribute('height'), ' 100', "canvas.getAttribute('height')", "' 100'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), ' 100', "canvas.getAttribute('width')", "' 100'"); + _assertSame(canvas.getAttribute('height'), ' 100', "canvas.getAttribute('height')", "' 100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html index 287887b5a37..e2b92ee0aae 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.trailingjunk.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100#!?', "canvas.getAttribute('width')", "'100#!?'"); -_assertSame(canvas.getAttribute('height'), '100#!?', "canvas.getAttribute('height')", "'100#!?'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100#!?', "canvas.getAttribute('width')", "'100#!?'"); + _assertSame(canvas.getAttribute('height'), '100#!?', "canvas.getAttribute('height')", "'100#!?'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html index 13c5fbbea64..c7a76f967e2 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html @@ -21,12 +21,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'"); -_assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'"); - + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'"); + _assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html index fa0560377ab..0f7a0415a17 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.zero.html @@ -19,12 +19,11 @@ var t = async_test("Parsing of non-negative integers"); _addTest(function(canvas, ctx) { -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); -_assertSame(canvas.getAttribute('width'), '0', "canvas.getAttribute('width')", "'0'"); -_assertSame(canvas.getAttribute('height'), '0', "canvas.getAttribute('height')", "'0'"); - + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); + _assertSame(canvas.getAttribute('width'), '0', "canvas.getAttribute('width')", "'0'"); + _assertSame(canvas.getAttribute('height'), '0', "canvas.getAttribute('height')", "'0'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html index e2eaa1ff8e2..9f0b4b1deb0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.decimal.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '100.999'); -canvas.setAttribute('height', '100.999'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100.999', "canvas.getAttribute('width')", "'100.999'"); -_assertSame(canvas.getAttribute('height'), '100.999', "canvas.getAttribute('height')", "'100.999'"); - + canvas.setAttribute('width', '100.999'); + canvas.setAttribute('height', '100.999'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100.999', "canvas.getAttribute('width')", "'100.999'"); + _assertSame(canvas.getAttribute('height'), '100.999', "canvas.getAttribute('height')", "'100.999'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html index a806ad5f776..df0eee7462e 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.em.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '100em'); -canvas.setAttribute('height', '100em'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100em', "canvas.getAttribute('width')", "'100em'"); -_assertSame(canvas.getAttribute('height'), '100em', "canvas.getAttribute('height')", "'100em'"); - + canvas.setAttribute('width', '100em'); + canvas.setAttribute('height', '100em'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100em', "canvas.getAttribute('width')", "'100em'"); + _assertSame(canvas.getAttribute('height'), '100em', "canvas.getAttribute('height')", "'100em'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.empty.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.empty.html index fc9690d858e..37e021424a0 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.empty.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.empty.html @@ -19,13 +19,12 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', ''); -canvas.setAttribute('height', ''); -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), '', "canvas.getAttribute('width')", "''"); -_assertSame(canvas.getAttribute('height'), '', "canvas.getAttribute('height')", "''"); - + canvas.setAttribute('width', ''); + canvas.setAttribute('height', ''); + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), '', "canvas.getAttribute('width')", "''"); + _assertSame(canvas.getAttribute('height'), '', "canvas.getAttribute('height')", "''"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html index c36d3eca6dd..943b98b9c3b 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.exp.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '100e1'); -canvas.setAttribute('height', '100e1'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100e1', "canvas.getAttribute('width')", "'100e1'"); -_assertSame(canvas.getAttribute('height'), '100e1', "canvas.getAttribute('height')", "'100e1'"); - + canvas.setAttribute('width', '100e1'); + canvas.setAttribute('height', '100e1'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100e1', "canvas.getAttribute('width')", "'100e1'"); + _assertSame(canvas.getAttribute('height'), '100e1', "canvas.getAttribute('height')", "'100e1'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html index ee3669adff6..a73ff5ec042 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.hex.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '0x100'); -canvas.setAttribute('height', '0x100'); -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); -_assertSame(canvas.getAttribute('width'), '0x100', "canvas.getAttribute('width')", "'0x100'"); -_assertSame(canvas.getAttribute('height'), '0x100', "canvas.getAttribute('height')", "'0x100'"); - + canvas.setAttribute('width', '0x100'); + canvas.setAttribute('height', '0x100'); + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); + _assertSame(canvas.getAttribute('width'), '0x100', "canvas.getAttribute('width')", "'0x100'"); + _assertSame(canvas.getAttribute('height'), '0x100', "canvas.getAttribute('height')", "'0x100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.junk.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.junk.html index e04166bd0d7..607892d3f08 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.junk.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.junk.html @@ -19,13 +19,12 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '#!?'); -canvas.setAttribute('height', '#!?'); -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), '#!?', "canvas.getAttribute('width')", "'#!?'"); -_assertSame(canvas.getAttribute('height'), '#!?', "canvas.getAttribute('height')", "'#!?'"); - + canvas.setAttribute('width', '#!?'); + canvas.setAttribute('height', '#!?'); + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), '#!?', "canvas.getAttribute('width')", "'#!?'"); + _assertSame(canvas.getAttribute('height'), '#!?', "canvas.getAttribute('height')", "'#!?'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.minus.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.minus.html index 159a29346c8..4fd49e5eccf 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.minus.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.minus.html @@ -19,13 +19,12 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '-100'); -canvas.setAttribute('height', '-100'); -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), '-100', "canvas.getAttribute('width')", "'-100'"); -_assertSame(canvas.getAttribute('height'), '-100', "canvas.getAttribute('height')", "'-100'"); - + canvas.setAttribute('width', '-100'); + canvas.setAttribute('height', '-100'); + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), '-100', "canvas.getAttribute('width')", "'-100'"); + _assertSame(canvas.getAttribute('height'), '-100', "canvas.getAttribute('height')", "'-100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html index 9419b449a5d..d841413d3fe 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.octal.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '0100'); -canvas.setAttribute('height', '0100'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '0100', "canvas.getAttribute('width')", "'0100'"); -_assertSame(canvas.getAttribute('height'), '0100', "canvas.getAttribute('height')", "'0100'"); - + canvas.setAttribute('width', '0100'); + canvas.setAttribute('height', '0100'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '0100', "canvas.getAttribute('width')", "'0100'"); + _assertSame(canvas.getAttribute('height'), '0100', "canvas.getAttribute('height')", "'0100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.onlyspace.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.onlyspace.html index 3e134295718..7959c303d48 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.onlyspace.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.onlyspace.html @@ -19,13 +19,12 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', ' '); -canvas.setAttribute('height', ' '); -_assertSame(canvas.width, 300, "canvas.width", "300"); -_assertSame(canvas.height, 150, "canvas.height", "150"); -_assertSame(canvas.getAttribute('width'), ' ', "canvas.getAttribute('width')", "' '"); -_assertSame(canvas.getAttribute('height'), ' ', "canvas.getAttribute('height')", "' '"); - + canvas.setAttribute('width', ' '); + canvas.setAttribute('height', ' '); + _assertSame(canvas.width, 300, "canvas.width", "300"); + _assertSame(canvas.height, 150, "canvas.height", "150"); + _assertSame(canvas.getAttribute('width'), ' ', "canvas.getAttribute('width')", "' '"); + _assertSame(canvas.getAttribute('height'), ' ', "canvas.getAttribute('height')", "' '"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html index 03520e8589a..6fed0cdae5a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.percent.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '100%'); -canvas.setAttribute('height', '100%'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100%', "canvas.getAttribute('width')", "'100%'"); -_assertSame(canvas.getAttribute('height'), '100%', "canvas.getAttribute('height')", "'100%'"); - + canvas.setAttribute('width', '100%'); + canvas.setAttribute('height', '100%'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100%', "canvas.getAttribute('width')", "'100%'"); + _assertSame(canvas.getAttribute('height'), '100%', "canvas.getAttribute('height')", "'100%'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html index bcf24923b11..4be39bf19bd 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.plus.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '+100'); -canvas.setAttribute('height', '+100'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '+100', "canvas.getAttribute('width')", "'+100'"); -_assertSame(canvas.getAttribute('height'), '+100', "canvas.getAttribute('height')", "'+100'"); - + canvas.setAttribute('width', '+100'); + canvas.setAttribute('height', '+100'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '+100', "canvas.getAttribute('width')", "'+100'"); + _assertSame(canvas.getAttribute('height'), '+100', "canvas.getAttribute('height')", "'+100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html index 5920f67f961..3cc00788ef7 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.space.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', ' 100'); -canvas.setAttribute('height', ' 100'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), ' 100', "canvas.getAttribute('width')", "' 100'"); -_assertSame(canvas.getAttribute('height'), ' 100', "canvas.getAttribute('height')", "' 100'"); - + canvas.setAttribute('width', ' 100'); + canvas.setAttribute('height', ' 100'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), ' 100', "canvas.getAttribute('width')", "' 100'"); + _assertSame(canvas.getAttribute('height'), ' 100', "canvas.getAttribute('height')", "' 100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html index cb76b7a939d..4c9b7ce54a2 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.trailingjunk.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '100#!?'); -canvas.setAttribute('height', '100#!?'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '100#!?', "canvas.getAttribute('width')", "'100#!?'"); -_assertSame(canvas.getAttribute('height'), '100#!?', "canvas.getAttribute('height')", "'100#!?'"); - + canvas.setAttribute('width', '100#!?'); + canvas.setAttribute('height', '100#!?'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '100#!?', "canvas.getAttribute('width')", "'100#!?'"); + _assertSame(canvas.getAttribute('height'), '100#!?', "canvas.getAttribute('height')", "'100#!?'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html index b7c0ed6b592..8f6ecc95b4a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.whitespace.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '\r\n\t\x0c100'); -canvas.setAttribute('height', '\r\n\t\x0c100'); -_assertSame(canvas.width, 100, "canvas.width", "100"); -_assertSame(canvas.height, 100, "canvas.height", "100"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); -_assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'"); -_assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'"); - + canvas.setAttribute('width', '\r\n\t\x0c100'); + canvas.setAttribute('height', '\r\n\t\x0c100'); + _assertSame(canvas.width, 100, "canvas.width", "100"); + _assertSame(canvas.height, 100, "canvas.height", "100"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "100px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"100px\""); + _assertSame(canvas.getAttribute('width'), '\r\n\t\x0c100', "canvas.getAttribute('width')", "'\\r\\n\\t\\x0c100'"); + _assertSame(canvas.getAttribute('height'), '\r\n\t\x0c100', "canvas.getAttribute('height')", "'\\r\\n\\t\\x0c100'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html index 0a919e977c5..2bbad823537 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.setAttribute.zero.html @@ -19,14 +19,13 @@ var t = async_test("Parsing of non-negative integers in setAttribute"); _addTest(function(canvas, ctx) { -canvas.setAttribute('width', '0'); -canvas.setAttribute('height', '0'); -_assertSame(canvas.width, 0, "canvas.width", "0"); -_assertSame(canvas.height, 0, "canvas.height", "0"); -_assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); -_assertSame(canvas.getAttribute('width'), '0', "canvas.getAttribute('width')", "'0'"); -_assertSame(canvas.getAttribute('height'), '0', "canvas.getAttribute('height')", "'0'"); - + canvas.setAttribute('width', '0'); + canvas.setAttribute('height', '0'); + _assertSame(canvas.width, 0, "canvas.width", "0"); + _assertSame(canvas.height, 0, "canvas.height", "0"); + _assertSame(window.getComputedStyle(canvas, null).getPropertyValue("width"), "0px", "window.getComputedStyle(canvas, null).getPropertyValue(\"width\")", "\"0px\""); + _assertSame(canvas.getAttribute('width'), '0', "canvas.getAttribute('width')", "'0'"); + _assertSame(canvas.getAttribute('height'), '0', "canvas.getAttribute('height')", "'0'"); }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-change-empty-crash.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-change-empty-crash.html new file mode 100644 index 00000000000..6e44250ccb7 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-change-empty-crash.html @@ -0,0 +1,8 @@ +<script> +document.addEventListener('DOMContentLoaded', () => { + a.type = "foo" + document.execCommand("insertHorizontalRule", false) + a.type = "text" +}) +</script> +<input id="a" type="color"> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-change-value.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-change-value.html new file mode 100644 index 00000000000..74aeef7cd51 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/input-type-change-value.html @@ -0,0 +1,33 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Input type switch from / to color</title> +<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<link rel="help" href="https://html.spec.whatwg.org/#input-type-change"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1833477"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<script> +function runTest(focus) { + let input = document.createElement("input"); + input.type = "color"; + document.body.appendChild(input); + if (focus) { + input.focus(); + } + assert_equals(input.value, "#000000", "Invalid color should return a non-empty sanitized value"); + input.type = "text"; + assert_equals(input.value, "", "Value dirty flag should remain false"); + input.type = "color"; + input.value = "#ffffff"; + assert_equals(input.value, "#ffffff", "Valid color is returned"); + input.type = "text"; + assert_equals(input.value, "#ffffff", "Value dirty flag should remain true"); + if (focus) { + assert_equals(document.activeElement, input, "Focus is preserved"); + } +} +test(() => runTest(false), "Without focus"); +test(() => runTest(true), "With focus"); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html index a366f61a355..9cd2426b8cb 100644 --- a/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html +++ b/tests/wpt/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-overlay.html @@ -11,10 +11,7 @@ test(() => { assert_equals(getComputedStyle(dialog).overlay, "none", "Computed overlay"); - // dialog::backdrop {} UA rule always sets overlay to 'auto' even if - // ::backdrop pseudo is not generated. ::backdrop is only generated when the - // dialog is in the top layer. - assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto", + assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "none", "Computed overlay for ::backdrop"); }, "dialog computed overlay initially 'none'"); @@ -23,15 +20,17 @@ assert_equals(getComputedStyle(dialog).overlay, "auto", "Computed overlay on open dialog"); - assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto", + // ::backdrop pseudo element is always rendered in the top layer when its + // originating element is. It does not get its overlay property changed, + // though. + assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "none", "Computed overlay for ::backdrop"); dialog.close(); assert_equals(getComputedStyle(dialog).overlay, "none", "Computed overlay on closed dialog"); - // ::backdrop is always overlay:auto. See comment above. - assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "auto", + assert_equals(getComputedStyle(dialog, "::backdrop").overlay, "none", "Computed overlay for ::backdrop"); }, "Opening and closing a modal dialog changes computed overlay to 'auto' and back to 'none'"); </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 4b888169e1b..59a12a2c9ac 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 @@ -106,13 +106,14 @@ popover1.showPopover(); await waitForRender(); assert_true(popover1.matches(':popover-open')); - const actions = new test_driver.Actions(); - await actions.pointerMove(0, 0, {origin: outside}) - .pointerDown({button: actions.ButtonType.LEFT}) + await new test_driver.Actions() + .pointerMove(0, 0, {origin: outside}) + .pointerDown() .send(); await waitForRender(); assert_true(popover1.matches(':popover-open'),'pointerdown (outside the popover) should not hide the popover'); - await actions.pointerUp({button: actions.ButtonType.LEFT}) + await new test_driver.Actions() + .pointerUp() .send(); await waitForRender(); assert_false(popover1.matches(':popover-open'),'pointerup (outside the popover) should trigger light dismiss'); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html new file mode 100644 index 00000000000..5e8acb1a17b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-type-whitespace.html @@ -0,0 +1,27 @@ +<!doctype html> +<title><script type> non-ASCII whitespace handling</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script> +function testParserInsertedDidNotRun(description) { + test(() => assert_false(window.ran), + "Script shouldn't run with " + description + " (parser-inserted)"); + window.ran = false; +} +</script> + +<script>window.ran = false;</script> +<script type="text/javascript">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript\"");</script> + +<script type="text/javascript…">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript…\"");</script> + +<script type="text/javascript ">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> + +<script type="text/javascript ">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> + +<script type="text/javascript ">window.ran = true;</script> +<script>testParserInsertedDidNotRun("type=\"text/javascript \"");</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir-dynamic.html b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir-dynamic.html new file mode 100644 index 00000000000..8f2951f8efc --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir-dynamic.html @@ -0,0 +1,47 @@ +<!doctype html> +<html> +<head> + <meta charset="utf-8"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <link rel="author" title="Vincent Hilla" href="mailto:vhilla@mozilla.com"> + <link rel="help" href="https://html.spec.whatwg.org/#the-directionality"> +</head> +<body> + <input id="inp"/> + <textarea id="ta"></textarea> + <div id="div"></div> + <pre id="pre"></pre> + + <script> + function doTest(e) { + e.dir = "ltr"; + assert_true(e.matches(":dir(ltr)"), "dir to ltr on " + e.tagName + " element"); + + e.dir = "rtl"; + assert_true(e.matches(":dir(rtl)"), "dir to rtl on " + e.tagName + " element"); + + e.dir = "auto"; + assert_true(e.matches(":dir(ltr)"), "dir to auto, empty text on " + e.tagName + " element"); + + e.value = "\u05D0;"; + e.textContent = "\u05D0;"; + assert_true(e.matches(":dir(rtl)"), "auto dir, text to Hebrew on " + e.tagName + " element"); + + e.dir = "ltr"; + assert_true(e.matches(":dir(ltr)"), "dir to ltr, Hebrew text on " + e.tagName + " element"); + + e.dir = "auto"; + assert_true(e.matches(":dir(rtl)"), "dir to auto, Hebrew text on " + e.tagName + " element"); + + e.removeAttribute("dir"); + assert_true(e.matches(":dir(ltr)"), "dir removed, Hebrew text on " + e.tagName + " element"); + } + + const elements = [inp, ta, div, pre]; + for (const e of elements) { + test(() => doTest(e), "Dynamically changing dir, text on " + e.tagName.toLowerCase() + " element"); + } + </script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html index fb2a10e0ca3..588c3c68507 100644 --- a/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html +++ b/tests/wpt/web-platform-tests/html/semantics/selectors/pseudo-classes/dir.html @@ -35,8 +35,15 @@ <bdo dir="auto" id=bdo3>HEBREW</bdo> <bdo dir="auto" id=bdo4>إيان</bdo> <bdo dir="ltr" id=bdo5>עברית</bdo> + <textarea dir="auto" id="ta1">إيان</textarea> + <textarea dir="auto" id="ta2">HEBREWإيان</textarea> + <textarea dir="auto" id="ta3">إيان</textarea> + <pre dir="auto" id="pre1">إيان</pre> + <pre dir="auto" id="pre2">HEBREWإيان</pre> <script id=script4> + ta3.value = "HEBREW"; + const rtlElements = [ "bdo1", "bdi2", @@ -46,6 +53,8 @@ "span7", "input-tel3", "bdo4", + "ta1", + "pre1", ]; testSelectorIdsMatch(":dir(rtl)", rtlElements, "':dir(rtl)' matches all elements whose directionality is 'rtl'."); @@ -74,6 +83,9 @@ "input-tel2", "bdo3", "bdo5", + "ta2", + "ta3", + "pre2", "script4", ]; diff --git a/tests/wpt/web-platform-tests/images/README.md b/tests/wpt/web-platform-tests/images/README.md new file mode 100644 index 00000000000..6491564709f --- /dev/null +++ b/tests/wpt/web-platform-tests/images/README.md @@ -0,0 +1,18 @@ +Largest contentful paint test images +==================================== + +The images in this directory prefixed with `lcp-` are specifically intended to +be used by tests where a largest-contentful-paint entry should be generated. As +Chromium has implemented a contentfulness threshold of 0.05 bits per pixel, +these images, when rendered at their natural dimensions, have a minimum content +length, as shown in the table below: + +File | Dimensions | Area (px^2) | Minimum content-length (bytes) +----------------+------------+-------------|------------------------------- +lcp-256x256.png | 256x256 | 65536 | 410 +lcp-133x106.png | 133x106 | 14098 | 89 +lcp-100x50.png | 100x50 | 5000 | 32 +lcp-96x96.png | 96x96 | 9216 | 58 +lcp-16x16.png | 16x16 | 256 | 2 +lcp-2x2.png | 2x2 | 4 | 1 +lcp-1x1.png | 1x1 | 1 | 1 diff --git a/tests/wpt/web-platform-tests/images/lcp-100x50-alt.png b/tests/wpt/web-platform-tests/images/lcp-100x50-alt.png Binary files differnew file mode 100644 index 00000000000..2fdd47cb6d1 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-100x50-alt.png diff --git a/tests/wpt/web-platform-tests/images/lcp-100x50.png b/tests/wpt/web-platform-tests/images/lcp-100x50.png Binary files differnew file mode 100644 index 00000000000..0e4722139e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-100x50.png diff --git a/tests/wpt/web-platform-tests/images/lcp-133x106.png b/tests/wpt/web-platform-tests/images/lcp-133x106.png Binary files differnew file mode 100644 index 00000000000..fb61e8db851 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-133x106.png diff --git a/tests/wpt/web-platform-tests/images/lcp-16x16.png b/tests/wpt/web-platform-tests/images/lcp-16x16.png Binary files differnew file mode 100644 index 00000000000..f8ca4fae684 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-16x16.png diff --git a/tests/wpt/web-platform-tests/images/lcp-1x1.png b/tests/wpt/web-platform-tests/images/lcp-1x1.png Binary files differnew file mode 100644 index 00000000000..82863b859ac --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-1x1.png diff --git a/tests/wpt/web-platform-tests/images/lcp-256x256.png b/tests/wpt/web-platform-tests/images/lcp-256x256.png Binary files differnew file mode 100644 index 00000000000..944f10f8761 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-256x256.png diff --git a/tests/wpt/web-platform-tests/images/lcp-2x2.png b/tests/wpt/web-platform-tests/images/lcp-2x2.png Binary files differnew file mode 100644 index 00000000000..5b628e0734c --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-2x2.png diff --git a/tests/wpt/web-platform-tests/images/lcp-96x96.png b/tests/wpt/web-platform-tests/images/lcp-96x96.png Binary files differnew file mode 100644 index 00000000000..66464b77575 --- /dev/null +++ b/tests/wpt/web-platform-tests/images/lcp-96x96.png diff --git a/tests/wpt/web-platform-tests/interfaces/document-picture-in-picture.idl b/tests/wpt/web-platform-tests/interfaces/document-picture-in-picture.idl new file mode 100644 index 00000000000..742f65e6f06 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/document-picture-in-picture.idl @@ -0,0 +1,34 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Document Picture-in-Picture Specification (https://wicg.github.io/document-picture-in-picture/) + +[Exposed=Window] +partial interface Window { + [SameObject, SecureContext] readonly attribute DocumentPictureInPicture + documentPictureInPicture; +}; + +[Exposed=Window, SecureContext] +interface DocumentPictureInPicture : EventTarget { + [NewObject] Promise<Window> requestWindow( + optional DocumentPictureInPictureOptions options = {}); + readonly attribute Window window; + attribute EventHandler onenter; +}; + +dictionary DocumentPictureInPictureOptions { + [EnforceRange] unsigned long long width = 0; + [EnforceRange] unsigned long long height = 0; + boolean copyStyleSheets = false; +}; + +[Exposed=Window] +interface DocumentPictureInPictureEvent : Event { + constructor(DOMString type, DocumentPictureInPictureEventInit eventInitDict); + [SameObject] readonly attribute Window window; +}; + +dictionary DocumentPictureInPictureEventInit : EventInit { + required Window window; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/dom.idl b/tests/wpt/web-platform-tests/interfaces/dom.idl index c5b5c94dbcc..c2def872fa2 100644 --- a/tests/wpt/web-platform-tests/interfaces/dom.idl +++ b/tests/wpt/web-platform-tests/interfaces/dom.idl @@ -95,6 +95,7 @@ interface AbortController { interface AbortSignal : EventTarget { [NewObject] static AbortSignal abort(optional any reason); [Exposed=(Window,Worker), NewObject] static AbortSignal timeout([EnforceRange] unsigned long long milliseconds); + [NewObject] static AbortSignal _any(sequence<AbortSignal> signals); readonly attribute boolean aborted; readonly attribute any reason; diff --git a/tests/wpt/web-platform-tests/interfaces/fenced-frame.idl b/tests/wpt/web-platform-tests/interfaces/fenced-frame.idl index 6b0734d1f7b..440ec2bbaa1 100644 --- a/tests/wpt/web-platform-tests/interfaces/fenced-frame.idl +++ b/tests/wpt/web-platform-tests/interfaces/fenced-frame.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Fenced frame (https://wicg.github.io/fenced-frame/) +// Source: Fenced Frame (https://wicg.github.io/fenced-frame/) [Exposed=Window] interface HTMLFencedFrameElement : HTMLElement { @@ -20,7 +20,6 @@ typedef USVString FencedFrameConfigURL; [Exposed=Window] interface FencedFrameConfig { - readonly attribute FencedFrameConfigURL? url; readonly attribute FencedFrameConfigSize? containerWidth; readonly attribute FencedFrameConfigSize? containerHeight; readonly attribute FencedFrameConfigSize? contentWidth; diff --git a/tests/wpt/web-platform-tests/interfaces/notifications.idl b/tests/wpt/web-platform-tests/interfaces/notifications.idl index bfcfa2e66af..4300b171071 100644 --- a/tests/wpt/web-platform-tests/interfaces/notifications.idl +++ b/tests/wpt/web-platform-tests/interfaces/notifications.idl @@ -28,7 +28,7 @@ interface Notification : EventTarget { [SameObject] readonly attribute FrozenArray<unsigned long> vibrate; readonly attribute EpochTimeStamp timestamp; readonly attribute boolean renotify; - readonly attribute boolean silent; + readonly attribute boolean? silent; readonly attribute boolean requireInteraction; [SameObject] readonly attribute any data; [SameObject] readonly attribute FrozenArray<NotificationAction> actions; @@ -47,7 +47,7 @@ dictionary NotificationOptions { VibratePattern vibrate; EpochTimeStamp timestamp; boolean renotify = false; - boolean silent = false; + boolean? silent = null; boolean requireInteraction = false; any data = null; sequence<NotificationAction> actions = []; @@ -72,6 +72,7 @@ dictionary NotificationAction { }; callback NotificationPermissionCallback = undefined (NotificationPermission permission); + dictionary GetNotificationOptions { DOMString tag = ""; }; diff --git a/tests/wpt/web-platform-tests/interfaces/permissions-policy.idl b/tests/wpt/web-platform-tests/interfaces/permissions-policy.idl index a789d41738c..16945e3a9b7 100644 --- a/tests/wpt/web-platform-tests/interfaces/permissions-policy.idl +++ b/tests/wpt/web-platform-tests/interfaces/permissions-policy.idl @@ -18,6 +18,7 @@ partial interface Document { partial interface HTMLIFrameElement { [SameObject] readonly attribute PermissionsPolicy permissionsPolicy; }; + [Exposed=Window] interface PermissionsPolicyViolationReportBody : ReportBody { readonly attribute DOMString featureId; diff --git a/tests/wpt/web-platform-tests/interfaces/resource-timing.idl b/tests/wpt/web-platform-tests/interfaces/resource-timing.idl index aa17003493e..33fed05b756 100644 --- a/tests/wpt/web-platform-tests/interfaces/resource-timing.idl +++ b/tests/wpt/web-platform-tests/interfaces/resource-timing.idl @@ -26,6 +26,7 @@ interface PerformanceResourceTiming : PerformanceEntry { readonly attribute unsigned long long decodedBodySize; readonly attribute unsigned short responseStatus; readonly attribute RenderBlockingStatusType renderBlockingStatus; + readonly attribute DOMString contentType; [Default] object toJSON(); }; diff --git a/tests/wpt/web-platform-tests/interfaces/scheduling-apis.idl b/tests/wpt/web-platform-tests/interfaces/scheduling-apis.idl index 9ed49cfb689..1e84e79cd15 100644 --- a/tests/wpt/web-platform-tests/interfaces/scheduling-apis.idl +++ b/tests/wpt/web-platform-tests/interfaces/scheduling-apis.idl @@ -45,8 +45,14 @@ interface TaskController : AbortController { undefined setPriority(TaskPriority priority); }; +dictionary TaskSignalAnyInit { + (TaskPriority or TaskSignal) priority = "user-visible"; +}; + [Exposed=(Window, Worker)] interface TaskSignal : AbortSignal { + [NewObject] static TaskSignal _any(sequence<AbortSignal> signals, optional TaskSignalAnyInit init = {}); + readonly attribute TaskPriority priority; attribute EventHandler onprioritychange; diff --git a/tests/wpt/web-platform-tests/interfaces/webauthn.idl b/tests/wpt/web-platform-tests/interfaces/webauthn.idl index c7f72eacfd0..9a37207ba2c 100644 --- a/tests/wpt/web-platform-tests/interfaces/webauthn.idl +++ b/tests/wpt/web-platform-tests/interfaces/webauthn.idl @@ -17,34 +17,34 @@ typedef DOMString Base64URLString; typedef (RegistrationResponseJSON or AuthenticationResponseJSON) PublicKeyCredentialJSON; dictionary RegistrationResponseJSON { - Base64URLString id; - Base64URLString rawId; - AuthenticatorAttestationResponseJSON response; - DOMString? authenticatorAttachment; - AuthenticationExtensionsClientOutputsJSON clientExtensionResults; - DOMString type; + required Base64URLString id; + required Base64URLString rawId; + required AuthenticatorAttestationResponseJSON response; + DOMString authenticatorAttachment; + required AuthenticationExtensionsClientOutputsJSON clientExtensionResults; + required DOMString type; }; dictionary AuthenticatorAttestationResponseJSON { - Base64URLString clientDataJSON; - Base64URLString attestationObject; - sequence<DOMString> transports; + required Base64URLString clientDataJSON; + required Base64URLString attestationObject; + required sequence<DOMString> transports; }; dictionary AuthenticationResponseJSON { - Base64URLString id; - Base64URLString rawId; - AuthenticatorAssertionResponseJSON response; - DOMString? authenticatorAttachment; - AuthenticationExtensionsClientOutputsJSON clientExtensionResults; - DOMString type; + required Base64URLString id; + required Base64URLString rawId; + required AuthenticatorAssertionResponseJSON response; + DOMString authenticatorAttachment; + required AuthenticationExtensionsClientOutputsJSON clientExtensionResults; + required DOMString type; }; dictionary AuthenticatorAssertionResponseJSON { - Base64URLString clientDataJSON; - Base64URLString authenticatorData; - Base64URLString signature; - Base64URLString? userHandle; + required Base64URLString clientDataJSON; + required Base64URLString authenticatorData; + required Base64URLString signature; + Base64URLString userHandle; }; dictionary AuthenticationExtensionsClientOutputsJSON { diff --git a/tests/wpt/web-platform-tests/interfaces/webgpu.idl b/tests/wpt/web-platform-tests/interfaces/webgpu.idl index 34f78a1d8cd..25943d99c35 100644 --- a/tests/wpt/web-platform-tests/interfaces/webgpu.idl +++ b/tests/wpt/web-platform-tests/interfaces/webgpu.idl @@ -152,8 +152,8 @@ GPUDevice includes GPUObjectBase; [Exposed=(Window, DedicatedWorker), SecureContext] interface GPUBuffer { - readonly attribute GPUSize64 size; - readonly attribute GPUBufferUsageFlags usage; + readonly attribute GPUSize64Out size; + readonly attribute GPUFlagsConstant usage; readonly attribute GPUBufferMapState mapState; @@ -206,14 +206,14 @@ interface GPUTexture { undefined destroy(); - readonly attribute GPUIntegerCoordinate width; - readonly attribute GPUIntegerCoordinate height; - readonly attribute GPUIntegerCoordinate depthOrArrayLayers; - readonly attribute GPUIntegerCoordinate mipLevelCount; - readonly attribute GPUSize32 sampleCount; + readonly attribute GPUIntegerCoordinateOut width; + readonly attribute GPUIntegerCoordinateOut height; + readonly attribute GPUIntegerCoordinateOut depthOrArrayLayers; + readonly attribute GPUIntegerCoordinateOut mipLevelCount; + readonly attribute GPUSize32Out sampleCount; readonly attribute GPUTextureDimension dimension; readonly attribute GPUTextureFormat format; - readonly attribute GPUTextureUsageFlags usage; + readonly attribute GPUFlagsConstant usage; }; GPUTexture includes GPUObjectBase; @@ -1141,7 +1141,7 @@ interface GPUQuerySet { undefined destroy(); readonly attribute GPUQueryType type; - readonly attribute GPUSize32 count; + readonly attribute GPUSize32Out count; }; GPUQuerySet includes GPUObjectBase; @@ -1258,6 +1258,10 @@ typedef [EnforceRange] unsigned long GPUIndex32; typedef [EnforceRange] unsigned long GPUSize32; typedef [EnforceRange] long GPUSignedOffset32; +typedef unsigned long long GPUSize64Out; +typedef unsigned long GPUIntegerCoordinateOut; +typedef unsigned long GPUSize32Out; + typedef unsigned long GPUFlagsConstant; dictionary GPUColorDict { diff --git a/tests/wpt/web-platform-tests/interfaces/webnn.idl b/tests/wpt/web-platform-tests/interfaces/webnn.idl index d2b973a624b..17e30803b88 100644 --- a/tests/wpt/web-platform-tests/interfaces/webnn.idl +++ b/tests/wpt/web-platform-tests/interfaces/webnn.idl @@ -127,10 +127,10 @@ interface MLGraphBuilder { constructor(MLContext context); // Create an operand for a graph input. - MLOperand input(DOMString name, MLOperandDescriptor desc); + MLOperand input(DOMString name, MLOperandDescriptor descriptor); // Create an operand for a graph constant. - MLOperand constant(MLOperandDescriptor desc, MLBufferView bufferView); + MLOperand constant(MLOperandDescriptor descriptor, MLBufferView bufferView); // Create a single-value operand from the specified number of the specified type. MLOperand constant(double value, optional MLOperandType type = "float32"); diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl index a5fb3294b7e..b398c73e3f4 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl @@ -13,8 +13,6 @@ enum RTCStatsType { "media-playout", "peer-connection", "data-channel", -"stream", -"track", "transport", "candidate-pair", "local-candidate", diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc.idl b/tests/wpt/web-platform-tests/interfaces/webrtc.idl index 578cbe92974..4c31d3be67a 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc.idl @@ -441,13 +441,13 @@ enum RTCIceGathererState { }; enum RTCIceTransportState { + "closed", + "failed", + "disconnected", "new", "checking", - "connected", "completed", - "disconnected", - "failed", - "closed" + "connected" }; enum RTCIceRole { diff --git a/tests/wpt/web-platform-tests/interfaces/webtransport.idl b/tests/wpt/web-platform-tests/interfaces/webtransport.idl index 2bea483e1b9..a9f514e2366 100644 --- a/tests/wpt/web-platform-tests/interfaces/webtransport.idl +++ b/tests/wpt/web-platform-tests/interfaces/webtransport.idl @@ -98,6 +98,7 @@ dictionary WebTransportDatagramStats { [Exposed=(Window,Worker), SecureContext, Transferable] interface WebTransportSendStream : WritableStream { + attribute long long? sendOrder; Promise<WebTransportSendStreamStats> getStats(); }; @@ -130,12 +131,12 @@ interface WebTransportError : DOMException { constructor(optional DOMString message = "", optional WebTransportErrorOptions options = {}); readonly attribute WebTransportErrorSource source; - readonly attribute octet? streamErrorCode; + readonly attribute unsigned long? streamErrorCode; }; dictionary WebTransportErrorOptions { WebTransportErrorSource source = "stream"; - [Clamp] octet? streamErrorCode = null; + [Clamp] unsigned long? streamErrorCode = null; }; enum WebTransportErrorSource { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/idlharness.html b/tests/wpt/web-platform-tests/largest-contentful-paint/idlharness.html index 84d1c7ff9ae..5f5d286b356 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/idlharness.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/idlharness.html @@ -27,4 +27,4 @@ idl_test( ); </script> <!-- a contentful element to observe --> -<img src=/images/green-100x50.png> +<img src=/images/lcp-100x50.png> diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html index e67e21a17c7..2f8e17fb322 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-full-viewport.html @@ -29,7 +29,7 @@ body { ).observe({type: 'largest-contentful-paint', buffered: true}); // Add an image, setting width and height equal to viewport. img = document.createElement('img'); - img.src = '/images/green-100x50.png'; + img.src = '/images/lcp-100x50.png'; img.id = 'image_id'; img.width = viewportWidth * 2; img.height = viewportHeight * 2; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html index 1aee495fe19..514a424f68e 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-not-fully-visible.html @@ -27,7 +27,7 @@ body { t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); const entry = entryList.getEntries()[0]; - const url = window.location.origin + '/images/green-100x50.png'; + const url = window.location.origin + '/images/lcp-100x50.png'; // To compute the size, compute the percentage of the image visible and // scale by its natural dimensions. In this test, the image is expanded to twice its size // but place towards the bottom right corner of the viewport, so it is @@ -42,7 +42,7 @@ body { ).observe({type: 'largest-contentful-paint', buffered: true}); // Add an image, setting width and height equal to viewport. img = document.createElement('img'); - img.src = '/images/green-100x50.png'; + img.src = '/images/lcp-100x50.png'; img.id = 'image_id'; img.width = imgWidth * 2; img.height = imgHeight * 2; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html index 3e557a4fdc7..08e5ee56dba 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-removed-before-load.html @@ -11,7 +11,7 @@ setup({"hide_test_state": true}); const numInitial = 100; const sleep = 1000; - const small_img_src = '/images/green-16x16.png'; + const small_img_src = '/images/lcp-16x16.png'; let beforeLoad; async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html b/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html index b4d68a5cb92..061a0140d10 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/initially-invisible-images.html @@ -16,10 +16,10 @@ <body> <div> <div class='flex-container' id="container"> - <img src='/images/yellow.png?pipe=trickle(d1)' width="1000" height="1000"/> - <img src='/images/green-1x1.png?1' width="1000" height="1000"/> - <img src='/images/green-1x1.png?2' width="1000" height="1000"/> - <img src='/images/green-1x1.png?3' width="1000" height="1000"/> + <img src='/images/lcp-100x50.png?pipe=trickle(d1)' width="1000" height="1000"/> + <img src='/images/lcp-1x1.png?1' width="1000" height="1000"/> + <img src='/images/lcp-1x1.png?2' width="1000" height="1000"/> + <img src='/images/lcp-1x1.png?3' width="1000" height="1000"/> </div> </div> <script> @@ -48,7 +48,7 @@ promise_test(async t => { if (!entry.url) { return; } - assert_true(entry.url.includes("yellow.png"), "Re-visible image has an entry"); + assert_true(entry.url.includes("lcp-100x50.png"), "Re-visible image has an entry"); resolve(); }); }); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html index 948f00d0c61..9415cbc32fa 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html @@ -6,11 +6,11 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> - <!-- There is some text and some images. We care about blue.png being reported, as it is the largest. --> + <!-- There is some text and some images. We care about lcp-133x106.png being reported, as it is the largest. --> <p>This is some text! :)</p> - <img src='' id='red' /> - <img src='' id='blue' /> - <img src='' id='black' /> + <img src='' id='lcp1' /> + <img src='' id='lcp2' /> + <img src='' id='lcp3' /> <p>More text!</p> <script> // Add listener for load event that is fired when image is loaded. @@ -23,31 +23,30 @@ promise_test(async (t) => { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); - let promise = image_load_promise(document.getElementById('red')); - document.getElementById('red').src = '/images/red.png'; + let promise = image_load_promise(document.getElementById('lcp1')); + document.getElementById('lcp1').src = '/images/lcp-100x50.png'; await promise; const beforeLoad = performance.now(); - promise = image_load_promise(document.getElementById('blue')); - document.getElementById('blue').src = '/images/blue.png'; + promise = image_load_promise(document.getElementById('lcp2')); + document.getElementById('lcp2').src = '/images/lcp-133x106.png'; await promise; - promise = image_load_promise(document.getElementById('black')); - document.getElementById('black').src = '/images/black-rectangle.png'; + promise = image_load_promise(document.getElementById('lcp3')); + document.getElementById('lcp3').src = '/images/lcp-100x50-alt.png'; await promise; const observer = new PerformanceObserver( t.step_func(entryList => { entryList.getEntries().forEach(entry => { - // The text or other image could be reported as LCP if it is rendered before the blue image. - if (entry.id !== 'blue') + // The text or other image could be reported as LCP if it is rendered before the larger image. + if (entry.id !== 'lcp2') return; - const url = window.location.origin + '/images/blue.png'; - // blue.png is 133 by 106. + const url = window.location.origin + '/images/lcp-133x106.png'; const size = 133 * 106; - checkImage(entry, url, 'blue', size, beforeLoad); + checkImage(entry, url, 'lcp2', size, beforeLoad); t.done(); }) }) diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html index 8758c1c839b..c577899eccb 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html @@ -14,10 +14,10 @@ </style> <!-- These are some text and some tiny images. We care about the largest text. --> - <img id='green1' /> + <img id='image1' /> <div id='text1'></div> <div id='text2'></div> - <img id='green2' /> + <img id='image2' /> <script> const load_image = async (id, url) => { await new Promise(resolve => { @@ -37,13 +37,13 @@ let beforeRender = performance.now(); // Load images and add texts. - await load_image('green1', '/images/green-1x1.png'); + await load_image('image1', '/images/lcp-1x1.png'); load_text('text1', 'This is some text.'); load_text('text2', 'This is more text so it will be the Largest Contentful Paint!'); - await load_image('green2', '/images/green-2x2.png'); + await load_image('image2', '/images/lcp-2x2.png'); await new Promise(resolve => { new PerformanceObserver( diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html b/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html index 16cbd0f0cb9..ddd4f9672e7 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-background.tentative.html @@ -10,7 +10,7 @@ <script src="resources/mouseover-utils.js"></script> </head> <body> - <img src="/images/green-16x16.png" id=image> + <img src="/images/lcp-16x16.png" id=image> <span id=span style="display: inline-block;width: 15px; height: 15px"></span> <script> run_mouseover_test(/*background=*/true); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html b/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html index bbd87235e82..afc4b2a50d6 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/mouseover-heuristics-element.tentative.html @@ -10,7 +10,7 @@ <script src="resources/mouseover-utils.js"></script> </head> <body> - <img src="/images/green-16x16.png" id=image> + <img src="/images/lcp-16x16.png" id=image> <span id=span style="display: inline-block;width: 15px; height: 15px"></span> <script> run_mouseover_test(/*background=*/false); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html b/tests/wpt/web-platform-tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html index 50f9a229ea6..4d799c1b05a 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/non-tao-image-subsequent-lcp-candidate.tentative.html @@ -10,8 +10,8 @@ <body> <script> promise_test(async t => { - let small_image_path = '/images/green-100x50.png'; - let big_image_path = '/images/green-256x256.png'; + let small_image_path = '/images/lcp-100x50.png'; + let big_image_path = '/images/lcp-256x256.png'; let non_tao_scheme = get_host_info().OTHER_ORIGIN; // Load non-tao image with 0 opacity so it won't trigger an LCP entry. diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/placeholder-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/placeholder-image.html index 6a2ce5c7c6d..06691cef22e 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/placeholder-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/placeholder-image.html @@ -5,13 +5,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="resources/largest-contentful-paint-helpers.js"></script> -<img src='/images/green-1x1.png' id='image_id' width="133" height="106"/> +<img src='/images/lcp-1x1.png' id='image_id' width="133" height="106"/> <script> async_test(function (t) { assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad = performance.now(); - document.getElementById('image_id').src = '/images/blue.png'; - const url = window.location.origin + '/images/blue.png'; + document.getElementById('image_id').src = '/images/lcp-133x106.png'; + const url = window.location.origin + '/images/lcp-133x106.png'; const observer = new PerformanceObserver( t.step_func(function(entryList) { let entries = entryList.getEntries().filter(e => e.url === url); @@ -19,7 +19,6 @@ return; assert_equals(entries.length, 1); const entry = entries[0]; - // blue.png is 133 by 106. const size = 133 * 106; checkImage(entry, url, 'image_id', size, beforeLoad); t.done(); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/resources/mouseover-utils.js b/tests/wpt/web-platform-tests/largest-contentful-paint/resources/mouseover-utils.js index 1836f2e4ad2..60a29ed04e5 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/resources/mouseover-utils.js +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/resources/mouseover-utils.js @@ -7,7 +7,7 @@ const loadImage = size => { } else { zoom = new Image(); } - zoom.src=`/images/green-${size}.png`; + zoom.src=`/images/lcp-${size}.png`; ++counter; zoom.elementTiming = "zoom" + counter; document.body.appendChild(zoom); @@ -19,7 +19,7 @@ const loadBackgroundImage = size => { const [width, height] = size.split("x"); ++counter; div.style = `background-image: - url(/images/green-${size}.png?${counter}); width: ${width}px; height: ${height}px`; + url(/images/lcp-${size}.png?${counter}); width: ${width}px; height: ${height}px`; div.elementTiming = "zoom" + counter; document.body.appendChild(div); } diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore index 1672f3b52e7..4e52e323fd9 100644 --- a/tests/wpt/web-platform-tests/lint.ignore +++ b/tests/wpt/web-platform-tests/lint.ignore @@ -659,8 +659,8 @@ TESTHARNESS-IN-OTHER-TYPE: svg/svg-in-svg/svg-in-svg-circular-filter-reference-c # Adding the testharnessreport.js script causes the test to never complete. MISSING-TESTHARNESSREPORT: accessibility/crashtests/computed-node-checked.html -PRINT STATEMENT: webdriver/tests/print/* PRINT STATEMENT: webdriver/tests/bidi/browsing_context/print/* +PRINT STATEMENT: webdriver/tests/classic/print/* PRINT STATEMENT: webdriver/tests/support/fixtures_bidi.py DUPLICATE-BASENAME-PATH: acid/acid3/empty.html diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html index 2b5687f672b..6e6dbaf3bba 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html @@ -36,7 +36,8 @@ function doTest(callGetUserMedia, testName) assert_equals(device1.deviceId, "", "deviceId is empty before capture"); assert_equals(device1.groupId, "", "groupId is empty before capture"); assert_equals(device1.label, "", "label is empty before capture"); - assert_in_array(device1.kind, ["audioinput", "audiooutput", "videoinput", "kind is set to a valid value before capture"]); + assert_in_array(device1.kind, ["audioinput", "audiooutput", "videoinput"], + "kind is set to a valid value before capture"); } } /* Additionally, at most one device of each kind @@ -52,8 +53,8 @@ function doTest(callGetUserMedia, testName) }, testName); } -doTest(false, "enumerateDevices returns expected mostly empty objects in case device-info permission is not granted"); -doTest(true, "enumerateDevices returns expected objects in case device-info permission is granted"); +doTest(false, "enumerateDevices exposes mostly empty objects ahead of successful getUserMedia call"); +doTest(true, "enumerateDevices exposes expected objects after successful getUserMedia call"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html index 4971f4fc482..88c07048a1b 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html @@ -23,36 +23,85 @@ promise_test(async () => { assert_not_equals(navigator.mediaDevices.enumerateDevices, undefined, "navigator.mediaDevices.enumerateDevices exists"); - const deviceList = await navigator.mediaDevices.enumerateDevices(); - for (const mediaInfo of deviceList) { - assert_not_equals(mediaInfo.kind, undefined, "mediaInfo's kind should exist."); - assert_equals(mediaInfo.deviceId, "", "mediaInfo's deviceId should exist and be empty if getUserMedia was never called successfully."); - assert_equals(mediaInfo.label, "", "mediaInfo's label should exist and be empty if getUserMedia was never called successfully."); - assert_equals(mediaInfo.groupId, "", "mediaInfo's groupId should exist and be empty if getUserMedia was never called successfully."); - assert_in_array(mediaInfo.kind, ["videoinput", "audioinput", "audiooutput"]); + const devices = await navigator.mediaDevices.enumerateDevices(); + for (const {kind, deviceId, label, groupId} of devices) { + assert_in_array(kind, ["videoinput", "audioinput", "audiooutput"]); + assert_equals(deviceId, "", "deviceId should be empty string if getUserMedia was never called successfully."); + assert_equals(label, "", "label should be empty string if getUserMedia was never called successfully."); + assert_equals(groupId, "", "groupId should be empty string if getUserMedia was never called successfully."); + } + assert_less_than_equal(devices.filter(({kind}) => kind == "audioinput").length, + 1, "there should be zero or one audio input device."); + assert_less_than_equal(devices.filter(({kind}) => kind == "videoinput").length, + 1, "there should be zero or one video input device."); + assert_equals(devices.filter(({kind}) => kind == "audiooutput").length, + 0, "there should be no audio output devices."); + assert_less_than_equal(devices.length, 2, + "there should be no more than two devices."); + if (devices.length > 1) { + assert_equals(devices[0].kind, "audioinput", "audioinput is first"); + assert_equals(devices[1].kind, "videoinput", "videoinput is second"); } - assert_less_than_equal(deviceList.filter((item) => { return item.kind == "audioinput"; }).length, 1, "there should be zero or one audio input device "); - assert_less_than_equal(deviceList.filter((item) => { return item.kind == "videoinput"; }).length, 1, "there should be zero or one video input device "); - }, "mediaDevices.enumerateDevices() is present and working - before capture"); -promise_test(async () => { - await setMediaPermission("granted", ["microphone"]); - await navigator.mediaDevices.getUserMedia({ audio : true }); - const deviceList = await navigator.mediaDevices.enumerateDevices(); - for (const mediaInfo of deviceList) { - assert_not_equals(mediaInfo.kind, undefined, "mediaInfo's kind should exist."); - assert_not_equals(mediaInfo.deviceId, "", "mediaInfo's deviceId should exist and not be empty."); - assert_in_array(mediaInfo.kind, ["videoinput", "audioinput", "audiooutput"]); +promise_test(async t => { + await setMediaPermission("granted"); + const stream = await navigator.mediaDevices.getUserMedia({ video: true }); + stream.getTracks()[0].stop(); + + const devices = await navigator.mediaDevices.enumerateDevices(); + const kinds = ["audioinput", "videoinput"]; + for (const {kind, deviceId} of devices) { + assert_in_array(kind, kinds, "camera doesn't expose audiooutput"); + assert_equals(typeof deviceId, "string", "deviceId is a string."); + switch (kind) { + case "videoinput": + assert_greater_than(deviceId.length, 0, "video deviceId should not be empty."); + break; + case "audioinput": + assert_equals(deviceId.length, 0, "audio deviceId should be empty."); + break; + } + } +}, "mediaDevices.enumerateDevices() is working - after video capture"); + +// This test is designed to come after its video counterpart directly above +promise_test(async t => { + const devices1 = await navigator.mediaDevices.enumerateDevices(); + const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); + stream.getTracks()[0].stop(); + const devices = await navigator.mediaDevices.enumerateDevices(); + assert_equals(devices.filter(({kind}) => kind == "videoinput").length, + devices1.filter(({kind}) => kind == "videoinput").length, + "same number of (previously exposed) videoinput devices"); + assert_greater_than_equal(devices.filter(d => d.kind == "audioinput").length, + devices1.filter(d => d.kind == "audioinput").length, + "same number or more audioinput devices"); + const order = ["audioinput", "videoinput", "audiooutput"]; + for (const {kind, deviceId} of devices) { + assert_in_array(kind, order, "expected kind"); + assert_equals(typeof deviceId, "string", "deviceId is a string."); + switch (kind) { + case "videoinput": + assert_greater_than(deviceId.length, 0, "video deviceId should not be empty."); + break; + case "audioinput": + assert_greater_than(deviceId.length, 0, "audio deviceId should not be empty."); + break; + } } -}, "mediaDevices.enumerateDevices() is present and working - after capture"); + const kinds = devices.map(({kind}) => kind); + const correct = [...kinds].sort((a, b) => order.indexOf(a) - order.indexOf(b)); + assert_equals(JSON.stringify(kinds), JSON.stringify(correct), "correct order"); +}, "mediaDevices.enumerateDevices() is working - after video then audio capture"); promise_test(async () => { - const deviceList = await navigator.mediaDevices.enumerateDevices(); - for (const mediaInfo of deviceList) { + const devices = await navigator.mediaDevices.enumerateDevices(); + for (const mediaInfo of devices) { if (mediaInfo.kind == "audioinput" || mediaInfo.kind == "videoinput") { + assert_true("InputDeviceInfo" in window, "InputDeviceInfo exists"); assert_true(mediaInfo instanceof InputDeviceInfo); - } else if ( mediaInfo.kind == "audiooutput" ) { + } else if (mediaInfo.kind == "audiooutput") { assert_true(mediaInfo instanceof MediaDeviceInfo); } else { assert_unreached("mediaInfo.kind should be one of 'audioinput', 'videoinput', or 'audiooutput'.") diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html index 96399c804fc..9376f528974 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html @@ -43,6 +43,10 @@ test(function () { promise_test(async t => { // Both permissions are needed at some point, asking both at once await setMediaPermission(); + // A successful camera gUM call is needed to expose camera information + const afterGum = await navigator.mediaDevices.getUserMedia({video: true}); + afterGum.getTracks()[0].stop(); + assert_true(navigator.mediaDevices.getSupportedConstraints()["groupId"], "groupId should be supported"); const devices = await navigator.mediaDevices.enumerateDevices(); @@ -66,6 +70,10 @@ promise_test(async t => { }, 'groupId is correctly supported by getUserMedia() for video devices'); promise_test(async t => { + // A successful microphone gUM call is needed to expose microphone information + const afterGum = await navigator.mediaDevices.getUserMedia({audio: true}); + afterGum.getTracks()[0].stop(); + assert_true(navigator.mediaDevices.getSupportedConstraints()["groupId"], "groupId should be supported"); const devices = await navigator.mediaDevices.enumerateDevices(); diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html index c1d90a4f483..1bda4c748ac 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html @@ -67,18 +67,25 @@ }, 'A device can be opened twice with different resolutions requested'); promise_test(async t => { + // getUserMedia needs to be called before deviceIds and groupIds are exposed + const afterGum = await navigator.mediaDevices.getUserMedia({ + video: true, audio: true + }); + afterGum.getTracks().forEach(track => track.stop()); + const devices = await navigator.mediaDevices.enumerateDevices(); - const inputDevices = devices.filter(d => d.kind != "audiooutput"); - assert_greater_than(inputDevices.length, 0); - for (const device of inputDevices) { - const device_id_constraint = {deviceId: {exact: device.deviceId}}; - const constraints = device.kind == "audioinput" - ? {audio: device_id_constraint} - : {video: device_id_constraint}; - - const stream = await navigator.mediaDevices.getUserMedia(constraints); - assert_true(stream.getTracks()[0].getSettings().groupId === device.groupId, "device groupId"); - assert_greater_than(device.groupId.length, 0); + const inputDevices = devices.filter(({kind}) => kind != "audiooutput"); + assert_greater_than(inputDevices.length, 1, "have at least 2 test devices"); + for (const {kind, deviceId, groupId} of inputDevices) { + const type = {videoinput: "video", audioinput: "audio"}[kind]; + const stream = await navigator.mediaDevices.getUserMedia({ + [type]: {deviceId: {exact: deviceId}} + }); + const [track] = stream.getTracks(); + const settings = track.getSettings(); + track.stop(); + assert_true(settings.groupId == groupId, "device groupId"); + assert_greater_than(settings.groupId.length, 0, "groupId is not empty"); } }, 'groupId is correctly reported by getSettings() for all input devices'); diff --git a/tests/wpt/web-platform-tests/notifications/constructor-basic.https.html b/tests/wpt/web-platform-tests/notifications/constructor-basic.https.html index 3f704de03e3..df959b922f9 100644 --- a/tests/wpt/web-platform-tests/notifications/constructor-basic.https.html +++ b/tests/wpt/web-platform-tests/notifications/constructor-basic.https.html @@ -13,4 +13,34 @@ test(function() { notification.close() } }, "Called the notification constructor with one argument.") + +test(() => { + assert_equals( + new Notification("a").silent, + null, + "Expected null by default" + ); +}, "Constructing a notification without a NotificationOptions defaults to null."); + +test(() => { + for (const silent of [null, undefined]) { + assert_equals( + new Notification("a", { silent }).silent, + null, + `Expected silent to be null when initialized with ${silent}.` + ); + } + for (const silent of [true, 1, 100, {}, [], "a string"]) { + assert_true( + new Notification("a", { silent }).silent, + `Expected silent to be true when initialized with ${silent}.` + ); + } + for (const silent of [false, 0, "", NaN]) { + assert_false( + new Notification("a", { silent }).silent, + `Expected silent to be false when initialized with ${silent}.` + ); + } +}, "constructing a notification with a NotificationOptions dictionary correctly sets and reflects the silent attribute."); </script> diff --git a/tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-on-object.html b/tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-on-object.html index 78edfbde1b8..27142a4f59c 100644 --- a/tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-on-object.html +++ b/tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-on-object.html @@ -62,6 +62,12 @@ var previous_done_clicked = 0; }); }); +// Simple test to check that passive listeners can't prevent compatibility events. +target.addEventListener("pointerdown", function(event) { + event.preventDefault(); + }, + { passive: true, once: true }); + document.getElementById('done').addEventListener('click', (e) => done_clicked++); // Need to prevent the default behaviour for firefox diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_click_is_a_pointerevent.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_click_is_a_pointerevent.html index 2571c9c9034..36b80b66f57 100644 --- a/tests/wpt/web-platform-tests/pointerevents/pointerevent_click_is_a_pointerevent.html +++ b/tests/wpt/web-platform-tests/pointerevents/pointerevent_click_is_a_pointerevent.html @@ -58,6 +58,8 @@ promise_test(async () => { assert_click_construction(click_event, this); assert_click_attributes(click_event, pointerdown_event, pointerup_event); + assert_not_equals(click_event.pointerId, -1, + "Click event triggered by a pointing device should not have -1 as the pointerId"); }, "click using " + pointer_type + " is a PointerEvent"); promise_test(async () => { @@ -77,4 +79,28 @@ promise_test(async () => { assert_click_construction(click_event, frames[0]); assert_click_attributes(click_event, pointerdown_event, pointerup_event); }, "click in a subframe using " + pointer_type + " is a PointerEvent"); + +// Run this part of the test only once, since it doesn't rely on the pointer_type. +if (pointer_type == "mouse") { + promise_test(async () => { + const target = document.getElementById("target"); + let click_promise = getEvent("click", target); + target.click(); + let click_event = await click_promise; + assert_equals(click_event.pointerId, -1, + "Click event triggered by a non-pointing device should have -1 as the pointerId"); + + target.type = "button"; + target.focus(); + click_promise = getEvent("click", target); + // Press enter + let actions = new test_driver.Actions() + .keyDown("\uE007") + .keyUp("\uE007"); + await actions.send(); + click_event = await click_promise; + assert_equals(click_event.pointerId, -1, + "Click event triggered by a non-pointing device should have -1 as the pointerId"); + }, "Click event triggered by a non-pointing device should have -1 as the pointerId"); +} </script> diff --git a/tests/wpt/web-platform-tests/resources/testdriver.js b/tests/wpt/web-platform-tests/resources/testdriver.js index 446b033b0a4..e582477da9b 100644 --- a/tests/wpt/web-platform-tests/resources/testdriver.js +++ b/tests/wpt/web-platform-tests/resources/testdriver.js @@ -680,6 +680,134 @@ set_spc_transaction_mode: function(mode, context=null) { return window.test_driver_internal.set_spc_transaction_mode(mode, context); }, + + /** + * Cancels the Federated Credential Management dialog + * + * Matches the `Cancel dialog + * <https://fedidcg.github.io/FedCM/#webdriver-canceldialog>`_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the dialog is canceled, or rejected + * in case the WebDriver command errors + */ + cancel_fedcm_dialog: function(context=null) { + return window.test_driver_internal.cancel_fedcm_dialog(context); + }, + + /** + * Selects an account from the Federated Credential Management dialog + * + * Matches the `Select account + * <https://fedidcg.github.io/FedCM/#webdriver-selectaccount>`_ + * WebDriver command. + * + * @param {number} account_index - Index of the account to select. + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the account is selected, + * or rejected in case the WebDriver command errors + */ + select_fedcm_account: function(account_index, context=null) { + return window.test_driver_internal.select_fedcm_account(account_index, context); + }, + + /** + * Gets the account list from the Federated Credential Management dialog + * + * Matches the `Account list + * <https://fedidcg.github.io/FedCM/#webdriver-accountlist>`_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} fulfilled after the account list is returned, or + * rejected in case the WebDriver command errors + */ + get_fedcm_account_list: function(context=null) { + return window.test_driver_internal.get_fedcm_account_list(context); + }, + + /** + * Gets the title of the Federated Credential Management dialog + * + * Matches the `Get title + * <https://fedidcg.github.io/FedCM/#webdriver-gettitle>`_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the title is returned, or rejected + * in case the WebDriver command errors + */ + get_fedcm_dialog_title: function(context=null) { + return window.test_driver_internal.get_fedcm_dialog_title(context); + }, + + /** + * Gets the type of the Federated Credential Management dialog + * + * Matches the `Get dialog type + * <https://fedidcg.github.io/FedCM/#webdriver-getdialogtype>`_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the dialog type is returned, or + * rejected in case the WebDriver command errors + */ + get_fedcm_dialog_type: function(context=null) { + return window.test_driver_internal.get_fedcm_dialog_type(context); + }, + + /** + * Sets whether promise rejection delay is enabled for the Federated Credential Management dialog + * + * Matches the `Set delay enabled + * <https://fedidcg.github.io/FedCM/#webdriver-setdelayenabled>`_ + * WebDriver command. + * + * @param {boolean} enabled - Whether to delay FedCM promise rejection. + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the delay has been enabled or disabled, + * or rejected in case the WebDriver command errors + */ + set_fedcm_delay_enabled: function(enabled, context=null) { + return window.test_driver_internal.set_fedcm_delay_enabled(enabled, context); + }, + + /** + * Resets the Federated Credential Management dialog's cooldown + * + * Matches the `Reset cooldown + * <https://fedidcg.github.io/FedCM/#webdriver-resetcooldown>`_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the cooldown has been reset, + * or rejected in case the WebDriver command errors + */ + reset_fedcm_cooldown: function(context=null) { + return window.test_driver_internal.reset_fedcm_cooldown(context); + } }; window.test_driver_internal = { @@ -805,5 +933,32 @@ throw new Error("set_spc_transaction_mode() is not implemented by testdriver-vendor.js"); }, + async cancel_fedcm_dialog(context=null) { + throw new Error("cancel_fedcm_dialog() is not implemented by testdriver-vendor.js"); + }, + + async select_fedcm_account(account_index, context=null) { + throw new Error("select_fedcm_account() is not implemented by testdriver-vendor.js"); + }, + + async get_fedcm_account_list(context=null) { + throw new Error("get_fedcm_account_list() is not implemented by testdriver-vendor.js"); + }, + + async get_fedcm_dialog_title(context=null) { + throw new Error("get_fedcm_dialog_title() is not implemented by testdriver-vendor.js"); + }, + + async get_fedcm_dialog_type(context=null) { + throw new Error("get_fedcm_dialog_type() is not implemented by testdriver-vendor.js"); + }, + + async set_fedcm_delay_enabled(enabled, context=null) { + throw new Error("set_fedcm_delay_enabled() is not implemented by testdriver-vendor.js"); + }, + + async reset_fedcm_cooldown(context=null) { + throw new Error("reset_fedcm_cooldown() is not implemented by testdriver-vendor.js"); + } }; })(); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-range-ignored.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-range-ignored.html index dabb4ec5a60..98a5d45c37f 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-range-ignored.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-range-ignored.html @@ -63,7 +63,6 @@ const anim = startAnimation(t); await anim.ready; - await waitForNextFrame(); scroller.scrollTop = 650; await waitForNextFrame(); @@ -89,9 +88,10 @@ // Step 1: Set the range end programmatically and range start via CSS. // The start time will be respected since not previously set via the // animation API. - anim.rangeEnd = 'contain 100%'; - target.style.animationRangeStart = 'entry 50%'; - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + anim.rangeEnd = 'contain 100%'; + target.style.animationRangeStart = 'entry 50%'; + }); // Animation range does not affect timeline's currentTime. assert_percents_equal( @@ -116,7 +116,9 @@ // Step 2: Programmatically set the range start. // Scroll position is current at entry 50%, thus the animation's current // time is negative. - anim.rangeStart = 'contain 0%'; + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = 'contain 0%'; + }); // animation current time = // (scroll pos - range start) / (cover 100% - cover 0%) * 100% // = (650 - 700) / (900 - 600) * 100% = -100/6% @@ -146,8 +148,9 @@ // Step 3: Try to update the range start via CSS. This change must be // ignored since previously set programmatically. - target.style.animationRangeStart = "entry 50%"; - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + target.style.animationRangeStart = "entry 50%"; + }); assert_percents_equal( anim.currentTime, 100/6, 'Current time unchanged after change to ignored CSS property'); @@ -161,16 +164,16 @@ const anim = startAnimation(t); await anim.ready; - await waitForNextFrame(); scroller.scrollTop = 650; await waitForNextFrame(); // Step 1: Set the range start programmatically and range end via CSS. // The start time will be respected since not previously set via the // animation API. - anim.rangeStart = "entry 50%"; - target.style.animationRangeEnd = "contain 100%"; - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = "entry 50%"; + target.style.animationRangeEnd = "contain 100%"; + }); assert_percents_equal( anim.timeline.currentTime, 100/6, @@ -190,8 +193,10 @@ // Step 2: Programmatically set the range. // Scroll position is current at entry 50%, thus the animation's current // time is negative. - anim.rangeStart = "contain 0%"; - anim.rangeEnd = "contain 100%"; + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = "contain 0%"; + anim.rangeEnd = "contain 100%"; + }); assert_percents_equal( anim.currentTime, -100/6, @@ -213,8 +218,9 @@ // Step 3: Try to update the range end via CSS. This change must be // ignored since previously set programmatically. - target.style.animationRangeEnd = "cover 100%"; - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + target.style.animationRangeEnd = "cover 100%"; + }); assert_percents_equal( anim.currentTime, 100/6, 'Current time unchanged after change to ignored CSS property'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-deferred.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-deferred.html new file mode 100644 index 00000000000..d0671e5f238 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-deferred.html @@ -0,0 +1,109 @@ +<!DOCTYPE html> +<title>Deferred timelines via Animation.timeline</title> +<link rel="help" src="https://github.com/w3c/csswg-drafts/issues/7759"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> + +<main id=main></main> +<script> + function inflate(t, template) { + t.add_cleanup(() => main.replaceChildren()); + main.append(template.content.cloneNode(true)); + main.offsetTop; + } + + async function scrollTop(e, value) { + e.scrollTop = value; + await waitForNextFrame(); + } +</script> +<style> + @keyframes anim { + from { width: 0px; } + to { width: 200px; } + } + .scroller { + overflow-y: hidden; + width: 200px; + height: 200px; + } + .scroller > .content { + margin: 400px 0px; + width: 100px; + height: 100px; + background-color: green; + } + .animating { + background-color: coral; + width: 0px; + animation: anim auto linear; + animation-timeline: --t1; + } + .timeline { + scroll-timeline-name: --t1; + } + .scope { + timeline-scope: --t1; + } +</style> + +<template id=animation_timeline_attached> + <div class="scope"> + <div class=animating>Test</div> + <div class="scroller timeline"> + <div class="content animating"></div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, animation_timeline_attached); + let scroller = main.querySelector('.scroller'); + let animating = Array.from(main.querySelectorAll('.animating')); + + assert_equals(animating.length, 2); + let animations = animating.map((e) => e.getAnimations()[0]); + assert_equals(animations.length, 2); + + // animations[0] is attached via deferred timeline (timeline-scope), + // and animations[1] is attached directly. + assert_equals(animations[0].timeline, animations[1].timeline); + }, 'Animation.timeline returns attached timeline'); +</script> + +<template id=animation_timeline_inactive> + <div class="scope"> + <div class=animating>Test</div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, animation_timeline_inactive); + let scroller = main.querySelector('.scroller'); + let animating = main.querySelector('.animating'); + + assert_equals(animating.getAnimations()[0].timeline, null); + }, 'Animation.timeline returns null for inactive deferred timeline'); +</script> + +<template id=animation_timeline_overattached> + <div class="scope"> + <div class=animating>Test</div> + <div class="scroller timeline"> + <div class="content"></div> + </div> + <div class="scroller timeline"> + <div class="content"></div> + </div> + </div> +</template> +<script> + promise_test(async (t) => { + inflate(t, animation_timeline_overattached); + let scroller = main.querySelector('.scroller'); + let animating = main.querySelector('.animating'); + + assert_equals(animating.getAnimations()[0].timeline, null); + }, 'Animation.timeline returns null for inactive (overattached) deferred timeline'); +</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html index 8992cdc174f..4a6624caf43 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-ignored.tentative.html @@ -7,14 +7,12 @@ main { overflow: hidden; height: 0px; - scroll-timeline-attachment: defer; - scroll-timeline-name: --timeline1, --timeline2, --timeline3; + timeline-scope: --timeline1, --timeline2, --timeline3; } .scroller { overflow: hidden; width: 100px; height: 100px; - scroll-timeline-attachment: ancestor; } .scroller > div { height: 200px; @@ -53,12 +51,6 @@ <div id=container></div> </main> <script> - // Force layout of scrollers. - scroller1.offsetTop; - scroller2.offsetTop; - scroller3.offsetTop; - scroller4.offsetTop; - scroller1.scrollTop = 20; scroller2.scrollTop = 40; scroller3.scrollTop = 60; @@ -68,10 +60,12 @@ function test_animation_timeline(func, description) { promise_test(async () => { try { - let element = document.createElement('element'); - element.setAttribute('id', 'element'); - container.append(element); - await func(); + await runAndWaitForFrameUpdate(() => { + let element = document.createElement('element'); + element.setAttribute('id', 'element'); + container.append(element); + }); + func(); } finally { while (container.firstChild) container.firstChild.remove(); @@ -79,22 +73,17 @@ }, description); } - test_animation_timeline(async () => { - await waitForNextFrame(); + test_animation_timeline(() => { assert_equals(getComputedStyle(element).width, '120px'); element.style = 'animation-timeline:--timeline2'; assert_equals(getComputedStyle(element).width, '140px'); }, 'Changing animation-timeline changes the timeline (sanity check)'); - test_animation_timeline(async () => { - await waitForNextFrame(); + test_animation_timeline(() => { assert_equals(getComputedStyle(element).width, '120px'); // Set a (non-CSS) ScrollTimeline on the CSSAnimation. - let timeline4 = new ScrollTimeline({ - source: scroller4, - scrollOffsets: [CSS.px(0), CSS.px(100)] - }); + let timeline4 = new ScrollTimeline({ source: scroller4 }); element.getAnimations()[0].timeline = timeline4; assert_equals(getComputedStyle(element).width, '180px'); @@ -102,14 +91,14 @@ // Changing the animation-timeline property should have no effect. element.style = 'animation-timeline:--timeline2'; assert_equals(getComputedStyle(element).width, '180px'); - }, 'animation-timeline ignored after setting timeline with JS (ScrollTimeline from JS)'); + }, 'animation-timeline ignored after setting timeline with JS ' + + '(ScrollTimeline from JS)'); - test_animation_timeline(async () => { - await waitForNextFrame(); + test_animation_timeline(() => { assert_equals(getComputedStyle(element).width, '120px'); + let animation = element.getAnimations()[0]; let timeline1 = animation.timeline; - element.style = 'animation-timeline:--timeline2'; assert_equals(getComputedStyle(element).width, '140px'); @@ -119,10 +108,10 @@ // Should have no effect. element.style = 'animation-timeline:--timeline3'; assert_equals(getComputedStyle(element).width, '120px'); - }, 'animation-timeline ignored after setting timeline with JS (ScrollTimeline from CSS)'); + }, 'animation-timeline ignored after setting timeline with JS ' + + '(ScrollTimeline from CSS)'); - test_animation_timeline(async () => { - await waitForNextFrame(); + test_animation_timeline(() => { assert_equals(getComputedStyle(element).width, '120px'); element.getAnimations()[0].timeline = document.timeline; @@ -134,8 +123,7 @@ assert_equals(getComputedStyle(element).width, '120px'); }, 'animation-timeline ignored after setting timeline with JS (document timeline)'); - test_animation_timeline(async () => { - await waitForNextFrame(); + test_animation_timeline(() => { assert_equals(getComputedStyle(element).width, '120px'); element.getAnimations()[0].timeline = null; assert_equals(getComputedStyle(element).width, '120px'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-multiple.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-multiple.html index e812c7d67ea..3196653656d 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-multiple.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-multiple.html @@ -6,15 +6,13 @@ <script src="/web-animations/testcommon.js"></script> <style> main { - scroll-timeline-attachment: defer; - scroll-timeline-name: --top_timeline, --bottom_timeline, --left_timeline, --right_timeline; + timeline-scope: --top_timeline, --bottom_timeline, --left_timeline, --right_timeline; } .scroller { overflow: hidden; width: 100px; height: 100px; - scroll-timeline-attachment: ancestor; } .scroller > div { height: 200px; @@ -74,23 +72,17 @@ <div id=element></div> </main> <script> - // Force layout of scrollers. - top_scroller.offsetTop; - bottom_scroller.offsetTop; - left_scroller.offsetTop; - right_scroller.offsetTop; - - top_scroller.scrollTop = 20; - top_scroller.scrollLeft = 40; - bottom_scroller.scrollTop = 20; - bottom_scroller.scrollLeft = 40; - left_scroller.scrollTop = 60; - left_scroller.scrollLeft = 80; - right_scroller.scrollTop = 60; - right_scroller.scrollLeft = 80; - promise_test(async (t) => { - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + top_scroller.scrollTop = 20; + top_scroller.scrollLeft = 40; + bottom_scroller.scrollTop = 20; + bottom_scroller.scrollLeft = 40; + left_scroller.scrollTop = 60; + left_scroller.scrollLeft = 80; + right_scroller.scrollTop = 60; + right_scroller.scrollLeft = 80; + }); assert_equals(getComputedStyle(element).top, '120px'); assert_equals(getComputedStyle(element).bottom, '140px'); assert_equals(getComputedStyle(element).left, '160px'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html index 71df9ceda87..5a1f26b3f38 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-named-scroll-progress-timeline.tentative.html @@ -102,18 +102,19 @@ promise_test(async t => { let content = document.createElement('div'); content.className = 'content'; - // <div id='target' class='scroller'> - // <div id='content'></div> - // </div> - document.body.appendChild(target); - target.appendChild(content); - - target.style.scrollTimelineName = '--timeline'; - target.style.animation = "anim 10s linear"; - target.style.animationTimeline = '--timeline'; + await runAndWaitForFrameUpdate(() => { + // <div id='target' class='scroller'> + // <div id='content'></div> + // </div> + document.body.appendChild(target); + target.appendChild(content); + + target.style.scrollTimelineName = '--timeline'; + target.style.animation = "anim 10s linear"; + target.style.animationTimeline = '--timeline'; + target.scrollTop = 50; // 50% + }); - target.scrollTop = 50; // 50% - await waitForNextFrame(); assert_equals(getComputedStyle(target).translate, '100px'); content.remove(); @@ -124,19 +125,21 @@ promise_test(async t => { promise_test(async t => { let [parent, target] = createScrollerAndTarget(t, 'square-container'); - // <div id='parent' class='scroller'> - // <div id='target'></div> - // <div id='content'></div> - // </div> - document.body.appendChild(parent); - parent.insertBefore(target, parent.firstElementChild); + await runAndWaitForFrameUpdate(() => { + // <div id='parent' class='scroller'> + // <div id='target'></div> + // <div id='content'></div> + // </div> + document.body.appendChild(parent); + parent.insertBefore(target, parent.firstElementChild); - parent.style.scrollTimelineName = '--timeline'; - target.style.animation = "anim 10s linear"; - target.style.animationTimeline = '--timeline'; + parent.style.scrollTimelineName = '--timeline'; + target.style.animation = "anim 10s linear"; + target.style.animationTimeline = '--timeline'; + + parent.scrollTop = 100; // 50% + }); - parent.scrollTop = 100; // 50% - await waitForNextFrame(); assert_equals(getComputedStyle(target).translate, '100px'); }, "scroll-timeline-name is referenceable in animation-timeline on that " + "element's descendants"); @@ -145,19 +148,21 @@ promise_test(async t => { promise_test(async t => { let [sibling, target] = createScrollerAndTarget(t); - // <div id='sibling' class='scroller'> ... </div> - // <div id='target'></div> - document.body.appendChild(sibling); - document.body.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='sibling' class='scroller'> ... </div> + // <div id='target'></div> + document.body.appendChild(sibling); + document.body.appendChild(target); - // Resolvable if using a deferred timeline, but otherwise can only resolve - // if an ancestor container of the target element. - sibling.style.scrollTimelineName = '--timeline'; - target.style.animation = "anim 10s linear"; - target.style.animationTimeline = '--timeline'; + // Resolvable if using a deferred timeline, but otherwise can only resolve + // if an ancestor container of the target element. + sibling.style.scrollTimelineName = '--timeline'; + target.style.animation = "anim 10s linear"; + target.style.animationTimeline = '--timeline'; + + sibling.scrollTop = 50; // 50% + }); - sibling.scrollTop = 50; // 50% - await waitForNextFrame(); assert_equals(getComputedStyle(target).translate, '50px', 'Animation with unknown timeline name holds current time at zero'); }, "scroll-timeline-name is not referenceable in animation-timeline on that " + @@ -170,17 +175,18 @@ promise_test(async t => { let target = document.createElement('div'); target.id = 'target'; - // <div id='parent' style='overflow-x: clip'>... - // <div id='target'></div> - // </div> - document.body.appendChild(parent); - parent.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='parent' style='overflow-x: clip'>... + // <div id='target'></div> + // </div> + document.body.appendChild(parent); + parent.appendChild(target); - parent.style.scrollTimelineName = '--timeline'; - target.style.animation = "anim 10s linear"; - target.style.animationTimeline = '--timeline'; + parent.style.scrollTimelineName = '--timeline'; + target.style.animation = "anim 10s linear"; + target.style.animationTimeline = '--timeline'; + }); - await waitForNextFrame(); assert_equals(getComputedStyle(target).translate, 'none', 'Animation with an unresolved current time'); @@ -191,19 +197,19 @@ promise_test(async t => { promise_test(async t => { let [scroller, target] = createScrollerAndTarget(t); - // <div id='scroller' class='scroller'> ... - // <div id='target'></div> - // </div> - - document.body.appendChild(scroller); - scroller.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='scroller' class='scroller'> ... + // <div id='target'></div> + // </div> - scroller.style.scrollTimelineName = '--timeline-A'; - scroller.scrollTop = 50; // 25% - target.style.animation = "anim 10s linear"; - target.style.animationTimeline = '--timeline-B'; + document.body.appendChild(scroller); + scroller.appendChild(target); - await waitForNextFrame(); + scroller.style.scrollTimelineName = '--timeline-A'; + scroller.scrollTop = 50; // 25% + target.style.animation = "anim 10s linear"; + target.style.animationTimeline = '--timeline-B'; + }); const anim = target.getAnimations()[0]; assert_true(!!anim, 'Failed to create animation'); @@ -221,19 +227,19 @@ promise_test(async t => { promise_test(async t => { let [scroller, target] = createScrollerAndTarget(t); - // <div id='scroller' class='scroller'> ... - // <div id='target'></div> - // </div> - - document.body.appendChild(scroller); - scroller.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='scroller' class='scroller'> ... + // <div id='target'></div> + // </div> - scroller.style.scrollTimelineName = '--timeline-A'; - scroller.scrollTop = 50; // 25% - target.style.animation = "anim 10s linear"; - target.style.animationTimeline = '--timeline-A'; + document.body.appendChild(scroller); + scroller.appendChild(target); - await waitForNextFrame(); + scroller.style.scrollTimelineName = '--timeline-A'; + scroller.scrollTop = 50; // 25% + target.style.animation = "anim 10s linear"; + target.style.animationTimeline = '--timeline-A'; + }); const anim = target.getAnimations()[0]; assert_true(!!anim, 'Failed to create animation'); @@ -263,23 +269,22 @@ promise_test(async t => { scroller1.id = 'A'; scroller2.id = 'B'; - // <div class='scroller' id='A'> ... - // <div class='scroller' id='B'> ... - // <div id='target'></div> - // </div> - // </div> - document.body.appendChild(scroller1); - scroller1.appendChild(scroller2); - scroller2.appendChild(target); - - scroller1.style.scrollTimelineName = '--timeline'; - scroller1.scrollTop = 50; // 25% - scroller2.scrollTop = 100; // 50% - - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + // <div class='scroller' id='A'> ... + // <div class='scroller' id='B'> ... + // <div id='target'></div> + // </div> + // </div> + document.body.appendChild(scroller1); + scroller1.appendChild(scroller2); + scroller2.appendChild(target); + + scroller1.style.scrollTimelineName = '--timeline'; + scroller1.scrollTop = 50; // 25% + scroller2.scrollTop = 100; // 50% + }); const anim = target.getAnimations()[0]; - assert_true(!!anim.timeline, 'Failed to retrieve animation'); assert_equals(anim.timeline.source.id, 'A'); assert_equals(getComputedStyle(target).translate, '75px'); @@ -298,31 +303,29 @@ promise_test(async t => { wrapper.classList.remove('scroller'); let target = createTarget(t); - // <div id='wrapper'> ... - // <div id='target'></div> - // </div> - document.body.appendChild(wrapper); - wrapper.appendChild(target); - target.style.animation = "anim 10s linear"; - target.style.animationTimeline = '--timeline'; - - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + // <div id='wrapper'> ... + // <div id='target'></div> + // </div> + document.body.appendChild(wrapper); + wrapper.appendChild(target); + target.style.animation = "anim 10s linear"; + target.style.animationTimeline = '--timeline'; + }); // Timeline initially cannot be resolved, resulting in a null // timeline. The animation's hold time is zero. - let anim = document.getAnimations()[0]; + // let anim = document.getAnimations()[0]; assert_equals(getComputedStyle(target).translate, '50px'); - await waitForNextFrame(); - - wrapper.classList.add('scroller'); - wrapper.style.scrollTimelineName = '--timeline'; - - // <div id='wrapper' class="scroller"> ... - // <div id='target'></div> - // </div> - wrapper.scrollTop = 50; // 25% - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + // <div id='wrapper' class="scroller"> ... + // <div id='target'></div> + // </div> + wrapper.classList.add('scroller'); + wrapper.style.scrollTimelineName = '--timeline'; + wrapper.scrollTop = 50; // 25% + }); // The timeline should be updated to scroller. assert_equals(getComputedStyle(target).translate, '75px'); @@ -337,15 +340,17 @@ promise_test(async t => { let [scroller, target] = createScrollerAndTarget(t); scroller.style.writingMode = 'vertical-lr'; - // <div id='scroller' class='scroller'> ... - // <div id='target'></div> - // </div> - document.body.appendChild(scroller); - scroller.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='scroller' class='scroller'> ... + // <div id='target'></div> + // </div> + document.body.appendChild(scroller); + scroller.appendChild(target); - scroller.style.scrollTimeline = '--timeline block'; - target.style.animation = "anim-2 10s linear"; - target.style.animationTimeline = '--timeline'; + scroller.style.scrollTimeline = '--timeline block'; + target.style.animation = "anim-2 10s linear"; + target.style.animationTimeline = '--timeline'; + }); await waitForScrollLeft(scroller, 50); assert_equals(getComputedStyle(target).zIndex, '50'); @@ -355,15 +360,17 @@ promise_test(async t => { let [scroller, target] = createScrollerAndTarget(t); scroller.style.writingMode = 'vertical-lr'; - // <div id='scroller' class='scroller'> ... - // <div id='target'></div> - // </div> - document.body.appendChild(scroller); - scroller.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='scroller' class='scroller'> ... + // <div id='target'></div> + // </div> + document.body.appendChild(scroller); + scroller.appendChild(target); - scroller.style.scrollTimeline = '--timeline inline'; - target.style.animation = "anim-2 10s linear"; - target.style.animationTimeline = '--timeline'; + scroller.style.scrollTimeline = '--timeline inline'; + target.style.animation = "anim-2 10s linear"; + target.style.animationTimeline = '--timeline'; + }); await waitForScrollTop(scroller, 50); assert_equals(getComputedStyle(target).zIndex, '50'); @@ -373,15 +380,17 @@ promise_test(async t => { let [scroller, target] = createScrollerAndTarget(t); scroller.style.writingMode = 'vertical-lr'; - // <div id='scroller' class='scroller'> ... - // <div id='target'></div> - // </div> - document.body.appendChild(scroller); - scroller.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='scroller' class='scroller'> ... + // <div id='target'></div> + // </div> + document.body.appendChild(scroller); + scroller.appendChild(target); - scroller.style.scrollTimeline = '--timeline x'; - target.style.animation = "anim-2 10s linear"; - target.style.animationTimeline = '--timeline'; + scroller.style.scrollTimeline = '--timeline x'; + target.style.animation = "anim-2 10s linear"; + target.style.animationTimeline = '--timeline'; + }); await waitForScrollLeft(scroller, 50); assert_equals(getComputedStyle(target).zIndex, '50'); @@ -391,15 +400,17 @@ promise_test(async t => { let [scroller, target] = createScrollerAndTarget(t); scroller.style.writingMode = 'vertical-lr'; - // <div id='scroller' class='scroller'> ... - // <div id='target'></div> - // </div> - document.body.appendChild(scroller); - scroller.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='scroller' class='scroller'> ... + // <div id='target'></div> + // </div> + document.body.appendChild(scroller); + scroller.appendChild(target); - scroller.style.scrollTimeline = '--timeline y'; - target.style.animation = "anim-2 10s linear"; - target.style.animationTimeline = '--timeline'; + scroller.style.scrollTimeline = '--timeline y'; + target.style.animation = "anim-2 10s linear"; + target.style.animationTimeline = '--timeline'; + }); await waitForScrollTop(scroller, 50); assert_equals(getComputedStyle(target).zIndex, '50'); @@ -408,15 +419,17 @@ promise_test(async t => { promise_test(async t => { let [scroller, target] = createScrollerAndTarget(t); - // <div id='scroller' class='scroller'> ... - // <div id='target'></div> - // </div> - document.body.appendChild(scroller); - scroller.appendChild(target); + await runAndWaitForFrameUpdate(() => { + // <div id='scroller' class='scroller'> ... + // <div id='target'></div> + // </div> + document.body.appendChild(scroller); + scroller.appendChild(target); - scroller.style.scrollTimeline = '--timeline block'; - target.style.animation = "anim-2 10s linear"; - target.style.animationTimeline = '--timeline'; + scroller.style.scrollTimeline = '--timeline block'; + target.style.animation = "anim-2 10s linear"; + target.style.animationTimeline = '--timeline'; + }); await waitForScrollTop(scroller, 25); await waitForScrollLeft(scroller, 75); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-scroll-functional-notation.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-scroll-functional-notation.tentative.html index 0bba4a03f40..31c85810d55 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-scroll-functional-notation.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-scroll-functional-notation.tentative.html @@ -86,8 +86,10 @@ async function scrollTop(element, value) { promise_test(async t => { let [container, div] = createTargetWithStuff(t, 'block-content'); - div.style.animation = "anim 10s linear"; - div.style.animationTimeline = "scroll(nearest)"; + await runAndWaitForFrameUpdate(() => { + div.style.animation = "anim 10s linear"; + div.style.animationTimeline = "scroll(nearest)"; + }); await scrollTop(root, 50); assert_equals(getComputedStyle(div).translate, '50px'); @@ -100,8 +102,10 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, 'block-content'); - div.style.animation = "anim 10s linear"; - div.style.animationTimeline = "scroll(root)"; + await runAndWaitForFrameUpdate(() => { + div.style.animation = "anim 10s linear"; + div.style.animationTimeline = "scroll(root)"; + }); await scrollTop(container, 50); assert_equals(getComputedStyle(div).translate, '50px'); @@ -114,36 +118,41 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, 'block-content'); - container.style.animation = "anim 10s linear"; - container.style.animationTimeline = "scroll(self)"; - + await runAndWaitForFrameUpdate(() => { + container.style.animation = "anim 10s linear"; + container.style.animationTimeline = "scroll(self)"; + }); await scrollTop(container, 50); assert_equals(getComputedStyle(container).translate, '100px'); }, 'animation-timeline: scroll(self)'); promise_test(async t => { let [container, div] = createTargetWithStuff(t, 'block-content'); - div.style.animation = "anim 10s linear"; - div.style.animationTimeline = "scroll(self)"; - + await runAndWaitForFrameUpdate(() => { + div.style.animation = "anim 10s linear"; + div.style.animationTimeline = "scroll(self)"; + }); await scrollTop(container, 50); assert_equals(getComputedStyle(div).translate, 'none'); }, 'animation-timeline: scroll(self), on non-scroller'); promise_test(async t => { let [container, div] = createTargetWithStuff(t, 'inline-content'); - div.style.animation = "anim 10s linear"; - div.style.animationTimeline = "scroll(inline)"; - + await runAndWaitForFrameUpdate(() => { + div.style.animation = "anim 10s linear"; + div.style.animationTimeline = "scroll(inline)"; + }); await scrollLeft(container, 50); assert_equals(getComputedStyle(div).translate, '100px'); }, 'animation-timeline: scroll(inline)'); promise_test(async t => { let [container, div] = createTargetWithStuff(t, 'block-content'); - container.style.writingMode = 'vertical-lr'; - div.style.animation = "anim 10s linear"; - div.style.animationTimeline = "scroll(x)"; + await runAndWaitForFrameUpdate(() => { + container.style.writingMode = 'vertical-lr'; + div.style.animation = "anim 10s linear"; + div.style.animationTimeline = "scroll(x)"; + }); await scrollLeft(container, 50); assert_equals(getComputedStyle(div).translate, '100px'); @@ -151,9 +160,11 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, 'inline-content'); - container.style.writingMode = 'vertical-lr'; - div.style.animation = "anim 10s linear"; - div.style.animationTimeline = "scroll(y)"; + await runAndWaitForFrameUpdate(() => { + container.style.writingMode = 'vertical-lr'; + div.style.animation = "anim 10s linear"; + div.style.animationTimeline = "scroll(y)"; + }); await scrollTop(container, 50); assert_equals(getComputedStyle(div).translate, '100px'); 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 8a62199b524..3ac94478e59 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 @@ -1,7 +1,7 @@ <!DOCTYPE html> <title>The animation-timeline: view() notation</title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1"> -<link rel="help" src="https://w3c.github.io/csswg-drafts/scroll-animations-1/#view-notation"> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#view-notation"> <link rel="help" src="https://github.com/w3c/csswg-drafts/issues/7587"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -116,11 +116,13 @@ async function scrollTop(element, value) { 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 runAndWaitForFrameUpdate(() => { + 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); @@ -138,9 +140,11 @@ promise_test(async t => { 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)"; + await runAndWaitForFrameUpdate(() => { + 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); @@ -160,9 +164,11 @@ promise_test(async t => { 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)"; + await runAndWaitForFrameUpdate(() => { + 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); @@ -182,9 +188,11 @@ promise_test(async t => { 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 runAndWaitForFrameUpdate(() => { + 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. @@ -200,9 +208,11 @@ promise_test(async t => { 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(x)"; + await runAndWaitForFrameUpdate(() => { + container.style.overflow = 'hidden'; + div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animationTimeline = "view(x)"; + }); // So the range is [-200px, 100px], but it is impossible to scroll to the // negative part. @@ -218,8 +228,10 @@ promise_test(async t => { 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(y)"; + await runAndWaitForFrameUpdate(() => { + div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animationTimeline = "view(y)"; + }); // So the range is [-200px, 100px], but it is impossible to scroll to the // negative part. @@ -235,9 +247,11 @@ promise_test(async t => { 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(x 50px)"; + await runAndWaitForFrameUpdate(() => { + container.style.overflow = 'hidden'; + div.style.animation = "fade-out-without-timeline-range 1s linear"; + div.style.animationTimeline = "view(x 50px)"; + }); // So the range is [-150px, 50px], but it is impossible to scroll to the // negative part. @@ -252,10 +266,12 @@ promise_test(async t => { 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 runAndWaitForFrameUpdate(() => { + 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'); @@ -282,10 +298,11 @@ promise_test(async t => { 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 runAndWaitForFrameUpdate(() => { + 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%'); @@ -309,8 +326,10 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); - div.style.animation = "fade-in-out 1s linear"; - div.style.animationTimeline = "view()"; + await runAndWaitForFrameUpdate(() => { + div.style.animation = "fade-in-out 1s linear"; + div.style.animationTimeline = "view()"; + }); await scrollTop(container, 200); assert_equals(getComputedStyle(div).opacity, '0', 'At entry 0%'); @@ -329,8 +348,10 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); - div.style.animation = "fade-in-out 1s linear"; - div.style.animationTimeline = "view(50px)"; + await runAndWaitForFrameUpdate(() => { + div.style.animation = "fade-in-out 1s linear"; + div.style.animationTimeline = "view(50px)"; + }); await scrollTop(container, 250); assert_equals(getComputedStyle(div).opacity, '0', 'At entry 0%'); @@ -348,8 +369,10 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']); - div.style.animation = "fade-in-out 1s linear"; - div.style.animationTimeline = "view(auto 50px)"; + await runAndWaitForFrameUpdate(() => { + div.style.animation = "fade-in-out 1s linear"; + div.style.animationTimeline = "view(auto 50px)"; + }); await scrollTop(container, 250); assert_equals(getComputedStyle(div).opacity, '0', 'At entry 0%'); @@ -368,9 +391,11 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); - container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear"; - div.style.animationTimeline = "view(inline)"; + await runAndWaitForFrameUpdate(() => { + container.style.overflow = 'scroll'; + div.style.animation = "fade-out 1s linear"; + div.style.animationTimeline = "view(inline)"; + }); await scrollLeft(container, 0); assert_equals(getComputedStyle(div).opacity, '1', 'At exit 0%'); @@ -382,9 +407,11 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); - container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear"; - div.style.animationTimeline = "view(x)"; + await runAndWaitForFrameUpdate(() => { + container.style.overflow = 'scroll'; + div.style.animation = "fade-out 1s linear"; + div.style.animationTimeline = "view(x)"; + }); await scrollLeft(container, 0); assert_equals(getComputedStyle(div).opacity, '1', 'At exit 0%'); @@ -396,9 +423,11 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); - container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear"; - div.style.animationTimeline = "view(y)"; + await runAndWaitForFrameUpdate(() => { + container.style.overflow = 'scroll'; + div.style.animation = "fade-out 1s linear"; + div.style.animationTimeline = "view(y)"; + }); await scrollTop(container, 0); assert_equals(getComputedStyle(div).opacity, '1', 'At exit 0%'); @@ -410,10 +439,12 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); - container.style.overflowY = 'hidden'; - container.style.overflowX = 'scroll'; - div.style.animation = "fade-out 1s linear"; - div.style.animationTimeline = "view(x 50px)"; + await runAndWaitForFrameUpdate(() => { + container.style.overflowY = 'hidden'; + container.style.overflowX = 'scroll'; + div.style.animation = "fade-out 1s linear"; + div.style.animationTimeline = "view(x 50px)"; + }); await scrollLeft(container, 0); assert_equals(getComputedStyle(div).opacity, '0.5', 'At exit 50%'); @@ -423,9 +454,11 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); - container.style.overflow = 'scroll'; - div.style.animation = "fade-out 1s linear, change-font-size 1s linear"; - div.style.animationTimeline = "view(), view(inline)"; + await runAndWaitForFrameUpdate(() => { + container.style.overflow = 'scroll'; + div.style.animation = "fade-out 1s linear, change-font-size 1s linear"; + div.style.animationTimeline = "view(), view(inline)"; + }); await scrollLeft(container, 0); assert_equals(getComputedStyle(div).fontSize, '10px', 'At exit 0% inline'); @@ -451,9 +484,11 @@ promise_test(async t => { promise_test(async t => { let [container, div] = createTargetWithStuff(t, ['target', 'content']); - container.style.overflowY = 'hidden'; - container.style.overflowX = 'scroll'; - div.style.animation = "fade-out 1s linear"; + await runAndWaitForFrameUpdate(() => { + container.style.overflowY = 'hidden'; + container.style.overflowX = 'scroll'; + div.style.animation = "fade-out 1s linear"; + }); div.style.animationTimeline = "view(inline)"; await scrollLeft(container, 0); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/deferred-timeline-composited-ref.html b/tests/wpt/web-platform-tests/scroll-animations/css/deferred-timeline-composited-ref.html new file mode 100644 index 00000000000..088e93750af --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/deferred-timeline-composited-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<style> + #target { + translate: 50px; + width: 50px; + height: 50px; + background-color: green; + } +</style> +<div id=target></div> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/deferred-timeline-composited.html b/tests/wpt/web-platform-tests/scroll-animations/css/deferred-timeline-composited.html new file mode 100644 index 00000000000..239c0ca50a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/deferred-timeline-composited.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <link rel="help" src="https://github.com/w3c/csswg-drafts/issues/7759"> + <link rel="match" href="deferred-timeline-composited-ref.html"> + <script src="/web-animations/testcommon.js"></script> + <script src="/common/reftest-wait.js"></script> + <style> + @keyframes anim { + from { translate: 0px; } + to { translate: 100px; } + } + main { + timeline-scope: --t1; + } + .scroller { + width: 100px; + height: 100px; + will-change: translate; + background-color: white; + /* Prevent scrollers from appearing in the screenshot. */ + opacity: 0; + } + .scroller > div { + height: 300px; + width: 300px; + } + #target { + animation: anim auto linear; + animation-timeline: --t1; + width: 50px; + height: 50px; + will-change: translate; + background-color: green; + } + .timeline { + scroll-timeline-name: --t1; + } + #scroller_block { + overflow-y: scroll; + overflow-x: hidden; + scroll-timeline-axis: block; + } + #scroller_inline { + overflow-y: hidden; + overflow-x: scroll; + scroll-timeline-axis: inline; + } + </style> +</head> +<body> + <main> + <div id=target></div> + <div id=scroller_block class="scroller timeline"> + <div></div> + </div> + <div id=scroller_inline class=scroller> + <div></div> + </div> + </main> + <script> + (async () => { + await waitForCompositorReady(); + // Switch out the timeline associated with timeline-scope:--t. + scroller_block.classList.toggle('timeline'); + scroller_inline.classList.toggle('timeline'); + await waitForCompositorReady(); + let scrollPromise = new Promise((resolve) => { + scroller_inline.addEventListener('scrollend', resolve); + }) + scroller_inline.scrollTo({left: 100, behavior: "smooth"}); // 50% + await scrollPromise; + takeScreenshot(); + })(); + </script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/get-animations-inactive-timeline.html b/tests/wpt/web-platform-tests/scroll-animations/css/get-animations-inactive-timeline.html index d3048913cef..83bc5b5f531 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/get-animations-inactive-timeline.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/get-animations-inactive-timeline.html @@ -41,14 +41,11 @@ setup(assert_implements_animation_timeline); promise_test(async t => { - // Newly created timeline is inactive, let animations = document.getAnimations(); assert_equals(animations.length, 1, 'Single running animation'); assert_true(animations[0].timeline instanceof ScrollTimeline, 'Animation associated with a scroll timeline'); - assert_equals(animations[0].timeline.currentTime, null, - 'Timeline is initially inactive'); // Canceled animation is no longer current. const anim = animations[0]; diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-animation-longhand-properties.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-animation-longhand-properties.tentative.html index f4f9a669f3d..25ce1675533 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-animation-longhand-properties.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-animation-longhand-properties.tentative.html @@ -71,8 +71,10 @@ async function scrollTop(element, value) { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + }); await scrollTop(scroller, 25); // [0, 100]. assert_equals(getComputedStyle(target).translate, '25px'); @@ -94,8 +96,10 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + }); await scrollTop(scroller, 25); // [0, 100]. assert_equals(getComputedStyle(target).translate, '25px'); @@ -113,9 +117,11 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim forwards'; - target.style.animationTimeline = 'scroll(nearest)'; - target.style.animationIterationCount = '0'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim forwards'; + target.style.animationTimeline = 'scroll(nearest)'; + target.style.animationIterationCount = '0'; + }); await scrollTop(scroller, 25); // [0, 100]. assert_equals(getComputedStyle(target).translate, '0px'); @@ -123,9 +129,11 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim forwards'; - target.style.animationTimeline = 'scroll(nearest)'; - target.style.animationIterationCount = 'infinite'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim forwards'; + target.style.animationTimeline = 'scroll(nearest)'; + target.style.animationIterationCount = 'infinite'; + }); await scrollTop(scroller, 25); // [0, 100]. assert_equals(getComputedStyle(target).translate, '100px'); @@ -138,8 +146,10 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + }); await scrollTop(scroller, 25) // [0, 100]. assert_equals(getComputedStyle(target).translate, '25px'); @@ -147,9 +157,11 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; - target.style.animationDirection = 'reverse'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + target.style.animationDirection = 'reverse'; + }); await scrollTop(scroller, 25); // 25% in the reversing direction. assert_equals(getComputedStyle(target).translate, '75px'); @@ -157,10 +169,12 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; - target.style.animationIterationCount = '2'; - target.style.animationDirection = 'alternate'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + target.style.animationIterationCount = '2'; + target.style.animationDirection = 'alternate'; + }); await scrollTop(scroller, 10); // 20% in the 1st iteration. assert_equals(getComputedStyle(target).translate, '20px'); @@ -171,10 +185,12 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; - target.style.animationIterationCount = '2'; - target.style.animationDirection = 'alternate-reverse'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + target.style.animationIterationCount = '2'; + target.style.animationDirection = 'alternate-reverse'; + }); await scrollTop(scroller, 10); // 20% in the 1st iteration (reversing direction). assert_equals(getComputedStyle(target).translate, '80px'); @@ -190,8 +206,10 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + }); await scrollTop(scroller, 25); // [0, 100]. assert_equals(getComputedStyle(target).translate, '25px'); @@ -216,8 +234,10 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + }); // active // |--------------------| @@ -238,10 +258,12 @@ promise_test(async t => { promise_test(async t => { let [target, scroller] = createTargetAndScroller(t); - target.style.animation = '10s linear anim'; - target.style.animationTimeline = 'scroll(nearest)'; - target.style.animationDelay = '10s'; - target.style.animationDelayStart = '10s'; // crbug.com/1375994 + await runAndWaitForFrameUpdate(() => { + target.style.animation = '10s linear anim'; + target.style.animationTimeline = 'scroll(nearest)'; + target.style.animationDelay = '10s'; + target.style.animationDelayStart = '10s'; // crbug.com/1375994 + }); await scrollTop(scroller, 25); assert_equals(getComputedStyle(target).translate, 'none'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment-computed-tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment-computed-tentative.html deleted file mode 100644 index 3ec18a0eb9a..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment-computed-tentative.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/support/computed-testcommon.js"></script> -<style> - #outer { scroll-timeline-attachment: defer; } - #target { scroll-timeline-attachment: ancestor; } -</style> -<div id="outer"> - <div id="target"></div> -</div> -<script> -test_computed_value('scroll-timeline-attachment', 'initial', 'local'); -test_computed_value('scroll-timeline-attachment', 'inherit', 'defer'); -test_computed_value('scroll-timeline-attachment', 'unset', 'local'); -test_computed_value('scroll-timeline-attachment', 'revert', 'local'); -test_computed_value('scroll-timeline-attachment', 'local'); -test_computed_value('scroll-timeline-attachment', 'defer'); -test_computed_value('scroll-timeline-attachment', 'ancestor'); -test_computed_value('scroll-timeline-attachment', 'local, defer'); -test_computed_value('scroll-timeline-attachment', 'defer, ancestor'); -test_computed_value('scroll-timeline-attachment', 'local, defer, ancestor'); -test_computed_value('scroll-timeline-attachment', 'local, local, local, local'); - -test(() => { - let style = getComputedStyle(document.getElementById('target')); - assert_not_equals(Array.from(style).indexOf('scroll-timeline-attachment'), -1); -}, 'The scroll-timeline-attachment property shows up in CSSStyleDeclaration enumeration'); - -test(() => { - let style = document.getElementById('target').style; - assert_not_equals(style.cssText.indexOf('scroll-timeline-attachment'), -1); -}, 'The scroll-timeline-attachment property shows up in CSSStyleDeclaration.cssText'); - -</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment-parsing-tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment-parsing-tentative.html deleted file mode 100644 index 3235292d20b..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment-parsing-tentative.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/support/parsing-testcommon.js"></script> -<div id="target"></div> - -<script> - -test_valid_value('scroll-timeline-attachment', 'initial'); -test_valid_value('scroll-timeline-attachment', 'inherit'); -test_valid_value('scroll-timeline-attachment', 'unset'); -test_valid_value('scroll-timeline-attachment', 'revert'); - -test_valid_value('scroll-timeline-attachment', 'local'); -test_valid_value('scroll-timeline-attachment', 'defer'); -test_valid_value('scroll-timeline-attachment', 'ancestor'); -test_valid_value('scroll-timeline-attachment', 'local, defer'); -test_valid_value('scroll-timeline-attachment', 'defer, ancestor'); -test_valid_value('scroll-timeline-attachment', 'local, defer, ancestor, local'); -test_valid_value('scroll-timeline-attachment', 'local, local, local, local'); - -test_invalid_value('scroll-timeline-attachment', 'abc'); -test_invalid_value('scroll-timeline-attachment', '10px'); -test_invalid_value('scroll-timeline-attachment', 'auto'); -test_invalid_value('scroll-timeline-attachment', 'none'); -test_invalid_value('scroll-timeline-attachment', 'local defer'); -test_invalid_value('scroll-timeline-attachment', 'local / defer'); - -</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment.html deleted file mode 100644 index c924302b224..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-attachment.html +++ /dev/null @@ -1,417 +0,0 @@ -<!DOCTYPE html> -<title>Scroll Timeline Attachment</title> -<link rel="help" src="https://github.com/w3c/csswg-drafts/issues/7759"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/web-animations/testcommon.js"></script> - -<main id=main></main> -<script> - function inflate(t, template) { - t.add_cleanup(() => main.replaceChildren()); - main.append(template.content.cloneNode(true)); - main.offsetTop; - } - - async function scrollTop(e, value) { - e.scrollTop = value; - await waitForNextFrame(); - } -</script> -<style> - @keyframes anim { - from { width: 0px; --applied:true; } - to { width: 200px; --applied:true; } - } - - .scroller { - overflow-y: hidden; - width: 200px; - height: 200px; - } - .scroller > .content { - margin: 400px 0px; - width: 100px; - height: 100px; - background-color: green; - } - .target { - background-color: coral; - width: 0px; - animation: anim auto linear; - animation-timeline: --t1; - } - .timeline { - scroll-timeline-name: --t1; - } - .local { - scroll-timeline-attachment: local; - } - .defer { - scroll-timeline-attachment: defer; - } - .ancestor { - scroll-timeline-attachment: ancestor; - } - -</style> - - -<!-- Basic Behavior --> - -<template id=scroll_timeline_defer> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_defer); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Descendant can attach to deferred timeline'); -</script> - -<template id=scroll_timeline_defer_no_attach> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_defer_no_attach); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Deferred timeline with no attachments'); -</script> - -<template id=scroll_timeline_defer_no_attach_to_prev_sibling> - <div class="timeline defer"> - <div class="scroller timeline"> - <div class=content></div> - </div> - <div class=target>Test</div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_defer_no_attach_to_prev_sibling); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Deferred timeline with no attachments to previous sibling'); -</script> - -<template id=scroll_timeline_local_ancestor> - <div class="scroller timeline local"> - <div class=content> - <div class=target>Test</div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_local_ancestor); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Timeline with ancestor attachment does not attach to local'); -</script> - -<template id=scroll_timeline_defer_two_attachments> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - <!-- Extra attachment --> - <div class="timeline ancestor"></div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_defer_two_attachments); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Deferred timeline with two attachments'); -</script> - -<!-- Effective Axis of ScrollTimeline --> - -<template id=scroll_timeline_defer_axis> - <div class="timeline defer" style="scroll-timeline-axis:inline"> - <div class=target>Test</div> - <div class="scroller timeline ancestor" style="scroll-timeline-axis:y"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_defer_axis); - let target = main.querySelector('.target'); - assert_equals(target.getAnimations().length, 1); - let anim = target.getAnimations()[0]; - assert_not_equals(anim.timeline, null); - assert_equals(anim.timeline.axis, 'y'); - }, 'Axis of deferred timeline is taken from attached timeline'); -</script> - - -<template id=scroll_timeline_defer_axis_multiple> - <div class="timeline defer" style="scroll-timeline-axis:inline"> - <div class=target>Test</div> - <div class="scroller timeline ancestor" style="scroll-timeline-axis:y"> - <div class=content></div> - </div> - <!-- Extra attachment --> - <div class="timeline ancestor"></div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_defer_axis_multiple); - let target = main.querySelector('.target'); - assert_equals(target.getAnimations().length, 1); - let anim = target.getAnimations()[0]; - assert_not_equals(anim.timeline, null); - assert_equals(anim.timeline.axis, 'block'); - }, 'Axis of deferred timeline with multiple attachments'); -</script> - - -<!-- Dynamic Reattachment --> - - -<template id=scroll_timeline_reattach> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - <div class="scroller timeline"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_reattach); - let scrollers = main.querySelectorAll('.scroller'); - assert_equals(scrollers.length, 2); - let target = main.querySelector('.target'); - await scrollTop(scrollers[0], 350); // 50% - await scrollTop(scrollers[1], 175); // 25% - - // Attached to scrollers[0]. - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - // Reattach to scrollers[1]. - scrollers[0].classList.remove('ancestor'); - scrollers[1].classList.add('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% - }, 'Dynamically re-attaching'); -</script> - - -<template id=scroll_timeline_dynamic_attach_second> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline"> - <div class=content></div> - </div> - <div class="scroller timeline"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_dynamic_attach_second); - let scrollers = main.querySelectorAll('.scroller'); - assert_equals(scrollers.length, 2); - let target = main.querySelector('.target'); - await scrollTop(scrollers[0], 350); // 50% - await scrollTop(scrollers[1], 175); // 25% - - // Attached to no timelines initially: - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - // Attach to scrollers[0]. - scrollers[0].classList.add('ancestor'); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - // Also attach scrollers[1]. - scrollers[1].classList.add('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Dynamically attaching'); -</script> - - -<template id=scroll_timeline_dynamic_detach_second> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_dynamic_detach_second); - let scrollers = main.querySelectorAll('.scroller'); - assert_equals(scrollers.length, 2); - let target = main.querySelector('.target'); - await scrollTop(scrollers[0], 350); // 50% - await scrollTop(scrollers[1], 175); // 25% - - // Attached to two timelines initially: - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - // Detach scrollers[1]. - scrollers[1].classList.remove('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - // Also detach scrollers[0]. - scrollers[0].classList.remove('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Dynamically detaching'); -</script> - -<template id=scroll_timeline_ancestor_attached_removed> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_ancestor_attached_removed); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - let scroller_parent = scroller.parentElement; - scroller.remove(); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - scroller_parent.append(scroller); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Removing/inserting ancestor attached element'); -</script> - -<template id=scroll_timeline_ancestor_attached_display_none> - <div class="timeline defer"> - <div class=target>Test</div> - <div class="scroller timeline ancestor"> - <div class=content></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_ancestor_attached_display_none); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - scroller.style.display = 'none'; - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - scroller.style.display = 'block'; - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Ancestor attached element becoming display:none/block'); -</script> - -<template id=scroll_timeline_dynamic_defer> - <style> - .inner-scroller { - overflow-y: hidden; - width: 50px; - height: 50px; - } - .inner-scroller > .content { - margin: 100px 0px; - width: 20px; - height: 20px; - background-color: red; - } - </style> - <div class="scroller timeline"> - <div class="target content"> - <div class="inner-scroller timeline ancestor"> - <div class=content></div> - </div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, scroll_timeline_dynamic_defer); - let target = main.querySelector('.target'); - let outer_scroller = main.querySelector('.scroller'); - let inner_scroller = main.querySelector('.inner-scroller'); - - await scrollTop(outer_scroller, 350); // 50% - await scrollTop(inner_scroller, 17); // 10% - - // Attached to outer_scroller (local). - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - // Effectively attached to inner_scroller. - outer_scroller.classList.add('defer'); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '20px'); // 0px => 200px, 10% - - // Attached to outer_scroller again. - outer_scroller.classList.remove('defer'); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Dynamically becoming a deferred timeline'); -</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html index 872dc1b2b93..cb9a98dcd8e 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html @@ -89,49 +89,53 @@ <div class=target id=element_inline_in_vertical></div> </div> <script> - // Animations linked to vertical scroll-timelines are at 75% progress. - timeline_initial_axis.scrollTop = 75; - timeline_y.scrollTop = 75; - timeline_block_in_horizontal.scrollTop = 75; - timeline_inline_in_vertical.scrollTop = 75; - // Animations linked to horizontal scroll-timelines are at 25% progress. - timeline_x.scrollLeft = 25; - timeline_block_in_vertical.scrollLeft = 25; - timeline_inline_in_horizontal.scrollLeft = 25; + async function setScrollPositions() { + return runAndWaitForFrameUpdate(() => { + // Animations linked to vertical scroll-timelines are at 75% progress. + timeline_initial_axis.scrollTop = 75; + timeline_y.scrollTop = 75; + timeline_block_in_horizontal.scrollTop = 75; + timeline_inline_in_vertical.scrollTop = 75; + // Animations linked to horizontal scroll-timelines are at 25% progress. + timeline_x.scrollLeft = 25; + timeline_block_in_vertical.scrollLeft = 25; + timeline_inline_in_horizontal.scrollLeft = 25; + }); + } promise_test(async (t) => { - await waitForNextFrame(); + await setScrollPositions(); assert_equals(getComputedStyle(element_initial_axis).width, '175px'); }, 'Initial axis'); promise_test(async (t) => { - await waitForNextFrame(); + await setScrollPositions(); assert_equals(getComputedStyle(element_y).width, '175px'); }, 'Vertical axis'); promise_test(async (t) => { - await waitForNextFrame(); + await setScrollPositions(); assert_equals(getComputedStyle(element_x).width, '125px'); }, 'Horizontal axis'); promise_test(async (t) => { - await waitForNextFrame(); + await setScrollPositions(); assert_equals(getComputedStyle(element_block_in_horizontal).width, '175px'); }, 'Block axis in horizontal writing-mode'); promise_test(async (t) => { - await waitForNextFrame(); + await setScrollPositions(); assert_equals(getComputedStyle(element_inline_in_horizontal).width, '125px'); }, 'Inline axis in horizontal writing-mode'); promise_test(async (t) => { - await waitForNextFrame(); + await setScrollPositions(); assert_equals(getComputedStyle(timeline_block_in_vertical).writingMode, 'vertical-lr'); assert_equals(getComputedStyle(element_block_in_vertical).width, '125px'); }, 'Block axis in vertical writing-mode'); promise_test(async (t) => { - await waitForNextFrame(); + await setScrollPositions(); assert_equals(getComputedStyle(timeline_inline_in_vertical).writingMode, 'vertical-lr'); assert_equals(getComputedStyle(element_inline_in_vertical).width, '175px'); }, 'Inline axis in vertical writing-mode'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html index 57c666e2412..d1f143c7c19 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-dynamic.tentative.html @@ -7,12 +7,7 @@ <script src="support/testcommon.js"></script> <style> main { - scroll-timeline-attachment: defer; - scroll-timeline-name: --timeline; - } - - .scroller { - scroll-timeline-attachment: ancestor; + timeline-scope: --timeline; } main > div { @@ -91,8 +86,9 @@ assert_equals(getComputedStyle(element).width, expected); }, description + ' [immediate]'); - // Verify that the computed style after scrolling a bit. + // Verify the computed style after scrolling a bit. instantiate(async (element, expected) => { + await waitForNextFrame(); scroller1.scrollTop = scroller1.scrollTop + 10; scroller2.scrollTop = scroller2.scrollTop + 10; await waitForNextFrame(); @@ -146,7 +142,7 @@ // Note: #scroller1 is at 20%, and #scroller2 is at 40%. scroller1.style.scrollTimelineName = '--timeline1'; scroller2.style.scrollTimelineName = '--timeline2'; - main.style.scrollTimelineName = "--timeline1, --timeline2"; + main.style.timelineScope = "--timeline1, --timeline2"; await assert_width(element, '100px'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-multi-pass.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-multi-pass.tentative.html index 7e0c1339b26..403316ead0f 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-multi-pass.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-multi-pass.tentative.html @@ -18,7 +18,7 @@ main { height: 0px; overflow: hidden; - scroll-timeline: --timeline1 defer, --timeline2 defer; + timeline-scope: --timeline1, --timeline2; } .scroller { height: 100px; @@ -50,7 +50,7 @@ function insertScroller(timeline_name) { let scroller = document.createElement('div'); scroller.classList.add('scroller'); - scroller.style.scrollTimeline = `${timeline_name} ancestor`; + scroller.style.scrollTimeline = timeline_name; scroller.append(document.createElement('div')); main.insertBefore(scroller, element1); } diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-range-animation.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-range-animation.html new file mode 100644 index 00000000000..df087da6e2b --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-range-animation.html @@ -0,0 +1,182 @@ +<!DOCTYPE html> +<title>Scroll timelines and animation attachment ranges</title> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#named-timeline-range"> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#animation-range"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="support/testcommon.js"></script> +<style> + @keyframes anim { + from { z-index: 0; background-color: skyblue;} + to { z-index: 100; background-color: coral; } + } + #scroller { + border: 10px solid lightgray; + overflow-y: scroll; + width: 200px; + height: 200px; + } + #scroller > div { + margin: 800px 0px; + width: 100px; + height: 100px; + } + #target { + font-size: 10px; + background-color: green; + z-index: -1; + } +</style> +<main id=main> +</main> + +<template id=template_without_scope> + <div id=scroller class=timeline> + <div id=target></div> + </div> +</template> + +<template id=template_with_scope> + <div id=scope> + <div id=target></div> + <div id=scroller class=timeline> + <div></div> + </div> + </div> +</template> + +<script> + setup(assert_implements_animation_timeline); + + function inflate(t, template) { + t.add_cleanup(() => main.replaceChildren()); + main.append(template.content.cloneNode(true)); + } + async function scrollTop(e, value) { + e.scrollTop = value; + await waitForNextFrame(); + } + async function waitForAnimationReady(target) { + await waitForNextFrame(); + await Promise.all(target.getAnimations().map(x => x.ready)); + } + async function assertValueAt(scroller, target, args) { + await waitForAnimationReady(target); + await scrollTop(scroller, args.scrollTop); + assert_equals(getComputedStyle(target).zIndex, args.expected.toString()); + } + function test_animation_range(options, template, desc_suffix) { + if (template === undefined) + template = template_without_scope; + if (desc_suffix === undefined) + desc_suffix = ''; + + promise_test(async (t) => { + inflate(t, template); + let scroller = main.querySelector('#scroller'); + let target = main.querySelector('#target'); + let timeline = main.querySelector('.timeline'); + let scope = main.querySelector('#scope'); + let maxScroll = scroller.scrollHeight - scroller.clientHeight; + + if (scope != null) { + scope.style.timelineScope = '--t1'; + } + + timeline.style.scrollTimeline = '--t1'; + target.style.animation = 'anim auto linear'; + target.style.animationTimeline = '--t1'; + target.style.animationRangeStart = options.rangeStart; + target.style.animationRangeEnd = options.rangeEnd; + + // Accommodates floating point precision errors at the endpoints. + target.style.animationFillMode = 'both'; + + // 0% + await assertValueAt(scroller, target, + { scrollTop: options.startOffset, expected: 0 }); + // 50% + await assertValueAt(scroller, target, + { scrollTop: (options.startOffset + options.endOffset) / 2, expected: 50 }); + // 100% + await assertValueAt(scroller, target, + { scrollTop: options.endOffset, expected: 100 }); + + // Test before/after phases (need to clear the fill mode for that). + target.style.animationFillMode = 'initial'; + let before_scroll = options.startOffset - 10; + if (before_scroll >= 0) { + await assertValueAt(scroller, target, + { scrollTop: options.startOffset - 10, expected: -1 }); + } + let after_scroll = options.startOffset + 10; + if (after_scroll <= scroller.maxmum) { + await assertValueAt(scroller, target, + { scrollTop: options.endOffset + 10, expected: -1 }); + } + // Check 50% again without fill mode. + await assertValueAt(scroller, target, + { scrollTop: (options.startOffset + options.endOffset) / 2, expected: 50 }); + + }, `Animation with ranges [${options.rangeStart}, ${options.rangeEnd}] ${desc_suffix}`.trim()); + } + + test_animation_range({ + rangeStart: 'initial', + rangeEnd: 'initial', + startOffset: 0, + endOffset: 1500 + }); + + test_animation_range({ + rangeStart: '0%', + rangeEnd: '100%', + startOffset: 0, + endOffset: 1500 + }); + + test_animation_range({ + rangeStart: '10%', + rangeEnd: '100%', + startOffset: 150, + endOffset: 1500 + }); + + test_animation_range({ + rangeStart: '0%', + rangeEnd: '50%', + startOffset: 0, + endOffset: 750 + }); + + test_animation_range({ + rangeStart: '10%', + rangeEnd: '50%', + startOffset: 150, + endOffset: 750 + }); + + test_animation_range({ + rangeStart: '150px', + rangeEnd: '75em', + startOffset: 150, + endOffset: 750 + }); + + test_animation_range({ + rangeStart: 'calc(1% + 135px)', + rangeEnd: 'calc(70em + 50px)', + startOffset: 150, + endOffset: 750 + }); + + // Test animation-range via timeline-scope. + test_animation_range({ + rangeStart: 'calc(1% + 135px)', + rangeEnd: 'calc(70em + 50px)', + startOffset: 150, + endOffset: 750 + }, template_with_scope, '(scoped)'); + +</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-sampling.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-sampling.html index f77c5082200..a67f3b94e49 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-sampling.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-sampling.html @@ -19,6 +19,8 @@ } #element { width: 0px; + } + #element.animate { animation: expand 10s linear; animation-timeline: --timeline; } @@ -33,13 +35,17 @@ </div> <script> promise_test(async (t) => { - // The scroll timeline is initially inactive until the first frame. assert_equals(getComputedStyle(element).width, '0px'); - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + element.classList.add('animate'); + }); + assert_equals(getComputedStyle(element).width, '100px'); + scroller.scrollTop = 50; // Scrolling position should not yet be reflected in the animation, // since the new scroll position has not yet been sampled. assert_equals(getComputedStyle(element).width, '100px'); + await waitForNextFrame(); assert_equals(getComputedStyle(element).width, '150px'); }, 'Scroll position is sampled once per frame'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-shorthand.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-shorthand.tentative.html index 7a6d9cdf4ae..0c8a47ae20d 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-shorthand.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-timeline-shorthand.tentative.html @@ -23,8 +23,6 @@ test_valid_value('scroll-timeline', '--x block', '--x'); test_valid_value('scroll-timeline', '--a, --b, --c'); test_valid_value('scroll-timeline', '--a inline, --b block, --c y', '--a inline, --b, --c y'); test_valid_value('scroll-timeline', '--auto'); -test_valid_value('scroll-timeline', '--abc defer y', '--abc y defer'); -test_valid_value('scroll-timeline', '--abc y defer'); test_invalid_value('scroll-timeline', ''); test_invalid_value('scroll-timeline', '--abc --abc'); @@ -46,32 +44,26 @@ test_computed_value('scroll-timeline', '--y block', '--y'); test_computed_value('scroll-timeline', '--x block', '--x'); test_computed_value('scroll-timeline', '--a, --b, --c'); test_computed_value('scroll-timeline', '--a inline, --b block, --c y', '--a inline, --b, --c y'); -test_computed_value('scroll-timeline', '--abc defer y', '--abc y defer'); -test_computed_value('scroll-timeline', '--abc y defer'); -test_shorthand_value('scroll-timeline', '--abc y local', +test_shorthand_value('scroll-timeline', '--abc y', { 'scroll-timeline-name': '--abc', 'scroll-timeline-axis': 'y', - 'scroll-timeline-attachment': 'local', }); -test_shorthand_value('scroll-timeline', '--inline x defer', +test_shorthand_value('scroll-timeline', '--inline x', { 'scroll-timeline-name': '--inline', 'scroll-timeline-axis': 'x', - 'scroll-timeline-attachment': 'defer', }); -test_shorthand_value('scroll-timeline', '--abc y ancestor, --def', +test_shorthand_value('scroll-timeline', '--abc y, --def', { 'scroll-timeline-name': '--abc, --def', 'scroll-timeline-axis': 'y, block', - 'scroll-timeline-attachment': 'ancestor, local', }); test_shorthand_value('scroll-timeline', '--abc, --def', { 'scroll-timeline-name': '--abc, --def', 'scroll-timeline-axis': 'block, block', - 'scroll-timeline-attachment': 'local, local', }); function test_shorthand_contraction(shorthand, longhands, expected) { @@ -91,19 +83,16 @@ function test_shorthand_contraction(shorthand, longhands, expected) { test_shorthand_contraction('scroll-timeline', { 'scroll-timeline-name': '--abc', 'scroll-timeline-axis': 'inline', - 'scroll-timeline-attachment': 'defer', -}, '--abc inline defer'); +}, '--abc inline'); test_shorthand_contraction('scroll-timeline', { 'scroll-timeline-name': '--a, --b', 'scroll-timeline-axis': 'inline, block', - 'scroll-timeline-attachment': 'ancestor, local', -}, '--a inline ancestor, --b'); +}, '--a inline, --b'); test_shorthand_contraction('scroll-timeline', { 'scroll-timeline-name': 'none, none', 'scroll-timeline-axis': 'block, block', - 'scroll-timeline-attachment': 'local, local', }, 'none, none'); // Longhands with different lengths: @@ -111,12 +100,10 @@ test_shorthand_contraction('scroll-timeline', { test_shorthand_contraction('scroll-timeline', { 'scroll-timeline-name': '--a, --b, --c', 'scroll-timeline-axis': 'inline, inline', - 'scroll-timeline-attachment': 'local, local', }, ''); test_shorthand_contraction('scroll-timeline', { 'scroll-timeline-name': '--a, --b', 'scroll-timeline-axis': 'inline, inline, inline', - 'scroll-timeline-attachment': 'local, local', }, ''); </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-in-keyframe-change-timeline.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-in-keyframe-change-timeline.tentative.html index 311b2c8929a..5a70820b881 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-in-keyframe-change-timeline.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-in-keyframe-change-timeline.tentative.html @@ -27,7 +27,7 @@ overflow-x: hidden; width: 300px; height: 200px; - view-timeline: --sibling defer; + timeline-scope: --sibling; } #sibling { margin-top: 800px; @@ -36,7 +36,7 @@ width: 100px; height: 50px; background-color: blue; - view-timeline: --sibling block ancestor; + view-timeline: --sibling block; } #target { margin-bottom: 800px; @@ -86,7 +86,6 @@ marginRight: "0px", opacity: "1" } ]; assert_frame_lists_equal(frames, expected); - // Once a view-timeline is added, the kefyrames must update to reflect // the new keyframe offsets. target.classList.add('with-view-timeline'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-keyframes-hidden-subject.html b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-keyframes-hidden-subject.html index 10934347821..011b8d4319a 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-keyframes-hidden-subject.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-offset-keyframes-hidden-subject.html @@ -29,7 +29,7 @@ overflow-x: hidden; width: 300px; height: 200px; - view-timeline: --t1 defer; + timeline-scope: --t1; } #block { margin-top: 800px; @@ -38,7 +38,7 @@ width: 100px; height: 50px; background-color: blue; - view-timeline: --t1 ancestor; + view-timeline: --t1; } #target { margin-bottom: 800px; diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-range-name-offset-in-keyframes.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-range-name-offset-in-keyframes.tentative.html index cee90f3b1b0..6fab0025dac 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-range-name-offset-in-keyframes.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-range-name-offset-in-keyframes.tentative.html @@ -2,7 +2,7 @@ <html> <meta charset="utf-8"> <title>Timeline offset in Animation Keyframes</title> -<link rel="help" href="https://w3c.github.io/csswg-drafts/scroll-animations-1/#named-range-keyframes"> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#named-range-keyframes"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/web-animations/testcommon.js"></script> @@ -48,6 +48,8 @@ function runTests() { promise_test(async t => { + await waitForNextFrame(); + // scrollTop=200 to 400 is the entry range container.scrollTop = 200; await waitForNextFrame(); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-scope.html b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-scope.html index 985e694bfdc..e4e90bc03ac 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/timeline-scope.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/timeline-scope.html @@ -7,10 +7,11 @@ <main id=main></main> <script> - function inflate(t, template) { + async function inflate(t, template) { t.add_cleanup(() => main.replaceChildren()); - main.append(template.content.cloneNode(true)); - main.offsetTop; + return runAndWaitForFrameUpdate(() => { + main.append(template.content.cloneNode(true)); + }); } async function scrollTop(e, value) { @@ -62,9 +63,13 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline); + await inflate(t, deferred_timeline); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); + + const anim = target.getAnimations()[0]; + await anim.ready; + await scrollTop(scroller, 350); // 50% assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% }, 'Descendant can attach to deferred timeline'); @@ -80,7 +85,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_no_attachments); + await inflate(t, deferred_timeline_no_attachments); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); await scrollTop(scroller, 350); // 50% @@ -100,7 +105,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, scroll_timeline_inner_interference); + await inflate(t, scroll_timeline_inner_interference); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); await scrollTop(scroller, 350); // 50% @@ -120,7 +125,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_two_attachments); + await inflate(t, deferred_timeline_two_attachments); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); await scrollTop(scroller, 350); // 50% @@ -143,7 +148,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_reattach); + await inflate(t, deferred_timeline_reattach); let scrollers = main.querySelectorAll('.scroller'); assert_equals(scrollers.length, 2); let target = main.querySelector('.target'); @@ -154,10 +159,11 @@ assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% // Reattach to scrollers[1]. - scrollers[0].classList.remove('timeline'); - scrollers[1].classList.add('timeline'); + await runAndWaitForFrameUpdate(() => { + scrollers[0].classList.remove('timeline'); + scrollers[1].classList.add('timeline'); + }); - await waitForNextFrame(); assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% }, 'Dynamically re-attaching'); </script> @@ -175,7 +181,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_dynamic_detach); + await inflate(t, deferred_timeline_dynamic_detach); let scrollers = main.querySelectorAll('.scroller'); assert_equals(scrollers.length, 2); let target = main.querySelector('.target'); @@ -186,9 +192,10 @@ assert_equals(getComputedStyle(target).width, '0px'); // Detach scrollers[1]. - scrollers[1].classList.remove('timeline'); + await runAndWaitForFrameUpdate(() => { + scrollers[1].classList.remove('timeline'); + }); - await waitForNextFrame(); assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% // Also detach scrollers[0]. @@ -209,7 +216,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_attached_removed); + await inflate(t, deferred_timeline_attached_removed); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); await scrollTop(scroller, 350); // 50% @@ -236,7 +243,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_attached_display_none); + await inflate(t, deferred_timeline_attached_display_none); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); await scrollTop(scroller, 350); // 50% @@ -262,7 +269,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_appearing); + await inflate(t, deferred_timeline_appearing); let container = main.querySelector('.container'); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); @@ -294,7 +301,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, deferred_timeline_on_self); + await inflate(t, deferred_timeline_on_self); let scroller = main.querySelector('.scroller'); let target = main.querySelector('.target'); await scrollTop(scroller, 525); // 75% @@ -311,4 +318,5 @@ // to the non-deferred timeline. assert_equals(getComputedStyle(target).width, '150px'); // 0px => 200px, 75% }, 'Animations prefer non-deferred timelines'); -</script>
\ No newline at end of file + +</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 9f8ffd176e3..d1ea2f6c07f 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 y ancestor, --th x ancestor; + view-timeline: --tv y, --th x; background-color: red; } #scroller { @@ -132,7 +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; + timeline-scope: --tv, --th; } #scroller > div { z-index: -1; diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html deleted file mode 100644 index dd244e137bb..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment-computed-tentative.html +++ /dev/null @@ -1,35 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/support/computed-testcommon.js"></script> -<style> - #outer { view-timeline-attachment: defer; } - #target { view-timeline-attachment: ancestor; } -</style> -<div id="outer"> - <div id="target"></div> -</div> -<script> -test_computed_value('view-timeline-attachment', 'initial', 'local'); -test_computed_value('view-timeline-attachment', 'inherit', 'defer'); -test_computed_value('view-timeline-attachment', 'unset', 'local'); -test_computed_value('view-timeline-attachment', 'revert', 'local'); -test_computed_value('view-timeline-attachment', 'local'); -test_computed_value('view-timeline-attachment', 'defer'); -test_computed_value('view-timeline-attachment', 'ancestor'); -test_computed_value('view-timeline-attachment', 'local, defer'); -test_computed_value('view-timeline-attachment', 'defer, ancestor'); -test_computed_value('view-timeline-attachment', 'local, defer, ancestor'); -test_computed_value('view-timeline-attachment', 'local, local, local, local'); - -test(() => { - let style = getComputedStyle(document.getElementById('target')); - assert_not_equals(Array.from(style).indexOf('view-timeline-attachment'), -1); -}, 'The view-timeline-attachment property shows up in CSSStyleDeclaration enumeration'); - -test(() => { - let style = document.getElementById('target').style; - assert_not_equals(style.cssText.indexOf('view-timeline-attachment'), -1); -}, 'The view-timeline-attachment property shows up in CSSStyleDeclaration.cssText'); - -</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment-parsing-tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment-parsing-tentative.html deleted file mode 100644 index 25e20135f14..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment-parsing-tentative.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/css/support/parsing-testcommon.js"></script> -<div id="target"></div> - -<script> - -test_valid_value('view-timeline-attachment', 'initial'); -test_valid_value('view-timeline-attachment', 'inherit'); -test_valid_value('view-timeline-attachment', 'unset'); -test_valid_value('view-timeline-attachment', 'revert'); - -test_valid_value('view-timeline-attachment', 'local'); -test_valid_value('view-timeline-attachment', 'defer'); -test_valid_value('view-timeline-attachment', 'ancestor'); -test_valid_value('view-timeline-attachment', 'local, defer'); -test_valid_value('view-timeline-attachment', 'defer, ancestor'); -test_valid_value('view-timeline-attachment', 'local, defer, ancestor, local'); -test_valid_value('view-timeline-attachment', 'local, local, local, local'); - -test_invalid_value('view-timeline-attachment', 'abc'); -test_invalid_value('view-timeline-attachment', '10px'); -test_invalid_value('view-timeline-attachment', 'auto'); -test_invalid_value('view-timeline-attachment', 'none'); -test_invalid_value('view-timeline-attachment', 'local defer'); -test_invalid_value('view-timeline-attachment', 'local / defer'); - -</script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment.html deleted file mode 100644 index a91ae13d64a..00000000000 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-attachment.html +++ /dev/null @@ -1,433 +0,0 @@ -<!DOCTYPE html> -<title>View Timeline Attachment</title> -<link rel="help" src="https://github.com/w3c/csswg-drafts/issues/7759"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/web-animations/testcommon.js"></script> - -<main id=main></main> -<script> - function inflate(t, template) { - t.add_cleanup(() => main.replaceChildren()); - main.append(template.content.cloneNode(true)); - main.offsetTop; - } - - async function scrollTop(e, value) { - e.scrollTop = value; - await waitForNextFrame(); - } -</script> -<style> - @keyframes anim { - from { width: 0px; --applied:true; } - to { width: 200px; --applied:true; } - } - - .scroller { - overflow-y: hidden; - width: 200px; - height: 200px; - } - .scroller > .content { - margin: 400px 0px; - width: 100px; - height: 100px; - background-color: green; - } - .target { - background-color: coral; - width: 0px; - animation: anim auto linear; - animation-timeline: --t1; - } - .timeline { - view-timeline-name: --t1; - } - .local { - view-timeline-attachment: local; - } - .defer { - view-timeline-attachment: defer; - } - .ancestor { - view-timeline-attachment: ancestor; - } - -</style> - -<!-- Basic Behavior --> - -<template id=view_timeline_defer> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_defer); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Descendant can attach to deferred timeline'); -</script> - -<template id=view_timeline_defer_no_attach> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="timeline content"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_defer_no_attach); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Deferred timeline with no attachments'); -</script> - -<template id=view_timeline_defer_two_attachments> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor"></div> - <!-- Extra attachment --> - <div class="timeline ancestor"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_defer_two_attachments); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Deferred timeline with two attachments'); -</script> - -<!-- Effective Axis of ViewTimeline --> - -<template id=view_timeline_defer_axis> - <div class="timeline defer" style="view-timeline-axis:inline"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor" style="view-timeline-axis:y"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_defer_axis); - let target = main.querySelector('.target'); - assert_equals(target.getAnimations().length, 1); - let anim = target.getAnimations()[0]; - assert_not_equals(anim.timeline, null); - assert_equals(anim.timeline.axis, 'y'); - }, 'Axis of deferred timeline is taken from attached timeline'); -</script> - -<template id=view_timeline_defer_axis_multiple> - <div class="timeline defer" style="view-timeline-axis:inline"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor" style="view-timeline-axis:y"></div> - <!-- Extra attachment --> - <div class="timeline ancestor"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_defer_axis_multiple); - let target = main.querySelector('.target'); - assert_equals(target.getAnimations().length, 1); - let anim = target.getAnimations()[0]; - assert_not_equals(anim.timeline, null); - assert_equals(anim.timeline.axis, 'block'); - }, 'Axis of deferred timeline with multiple attachments'); -</script> - -<!-- Effective Inset of ViewTimeline --> - -<template id=view_timeline_inset> - <div class="timeline defer" style="view-timeline-inset:0px"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor" style="view-timeline-inset:50px"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_inset); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - - // Range: [200, 500] + [50, -50] (inset) = [250, 450] - await scrollTop(scroller, 300); // 25% - assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% - }, 'Inset of deferred timeline is taken from attached timeline'); -</script> - -<!-- Dynamic Reattachment --> - -<template id=view_timeline_reattach> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor"></div> - </div> - <div class=scroller> - <div class="content timeline"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_reattach); - let scrollers = main.querySelectorAll('.scroller'); - let contents = main.querySelectorAll('.content'); - assert_equals(scrollers.length, 2); - let target = main.querySelector('.target'); - // Range: [200, 500] - await scrollTop(scrollers[0], 350); // 50% - await scrollTop(scrollers[1], 275); // 25% - - // Attached to contents[0]. - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - // Reattach to contents[1]. - contents[0].classList.remove('ancestor'); - contents[1].classList.add('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% - }, 'Dynamically re-attaching'); -</script> - - -<template id=view_timeline_dynamic_attach_second> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="timeline content"></div> - </div> - <div class=scroller> - <div class="timeline content"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_dynamic_attach_second); - let scrollers = main.querySelectorAll('.scroller'); - let contents = main.querySelectorAll('.content'); - assert_equals(scrollers.length, 2); - let target = main.querySelector('.target'); - // Range: [200, 500] - await scrollTop(scrollers[0], 350); // 50% - await scrollTop(scrollers[1], 275); // 25% - - // Attached to no timelines initially: - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - // Attach to contents[0]. - contents[0].classList.add('ancestor'); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - // Also attach contents[1]. - contents[1].classList.add('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Dynamically attaching'); -</script> - - -<template id=view_timeline_dynamic_detach_second> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor"></div> - </div> - <div class=scroller> - <div class="content timeline ancestor"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_dynamic_detach_second); - let scrollers = main.querySelectorAll('.scroller'); - let contents = main.querySelectorAll('.content'); - assert_equals(scrollers.length, 2); - let target = main.querySelector('.target'); - // Range: [200, 500] - await scrollTop(scrollers[0], 350); // 50% - await scrollTop(scrollers[1], 275); // 25% - - // Attached to two timelines initially: - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - // Detach contents[1]. - contents[1].classList.remove('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - // Also detach contents[0]. - contents[0].classList.remove('ancestor'); - - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - }, 'Dynamically detaching'); -</script> - -<template id=view_timeline_ancestor_attached_removed> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_ancestor_attached_removed); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - let content = main.querySelector('.content'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - content.remove(); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - scroller.append(content); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Removing/inserting ancestor attached element'); -</script> - -<template id=view_timeline_ancestor_attached_display_none> - <div class="timeline defer"> - <div class=target>Test</div> - <div class=scroller> - <div class="content timeline ancestor"></div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_ancestor_attached_display_none); - let scroller = main.querySelector('.scroller'); - let target = main.querySelector('.target'); - let content = main.querySelector('.content'); - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - - content.style.display = 'none'; - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '0px'); - assert_equals(getComputedStyle(target).getPropertyValue('--applied'), ''); - - content.style.display = 'block'; - await scrollTop(scroller, 350); // 50% - assert_equals(getComputedStyle(target).width, '100px'); // 0px => 200px, 50% - }, 'Ancestor attached element becoming display:none/block'); -</script> - -<template id=view_timeline_dynamic_defer> - <style> - .inner-content { - margin: 100px 0px; - width: 20px; - height: 50px; - background-color: red; - } - </style> - <div class="scroller"> - <div class="content timeline"> - <div class="target"> - <div class="inner-content timeline ancestor"></div> - </div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_timeline_dynamic_defer); - let target = main.querySelector('.target'); - let scroller = main.querySelector('.scroller'); - let outer = main.querySelector('.content'); - let inner = main.querySelector('.inner-content'); - - // Outer view timeline range: [200, 500] - // Inner view timeline range: [200, 450] - - await scrollTop(scroller, 275); // 25% (outer), 30% (inner) - - // Attached to outer_view timeline (local). - assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% - - // Effectively attached to inner. - outer.classList.add('defer'); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '60px'); // 0px => 200px, 30% - - // Attached to outer_scroller again. - outer.classList.remove('defer'); - await waitForNextFrame(); - assert_equals(getComputedStyle(target).width, '50px'); // 0px => 200px, 25% - }, 'Dynamically becoming a deferred timeline'); -</script> - -<!-- ViewTimelines and ScrollTimelines --> - -<template id=view_scroll_timeline_defer> - <div style="scroll-timeline: --t1 defer"> - <div class=target>Test1</div> - <div class="timeline defer"> - <div class=target>Test2</div> - <div class=scroller style="scroll-timeline: --t1 ancestor;"> - <div class="content timeline ancestor" style="view-timeline-inset: 0px 50px"></div> - </div> - </div> - </div> -</template> -<script> - promise_test(async (t) => { - inflate(t, view_scroll_timeline_defer); - let scroller = main.querySelector('.scroller'); - let targets = main.querySelectorAll('.target'); - await scrollTop(scroller, 350); - - // Attached to ScrollTimeline: - // Range: [0, 700] - // 350 => 50% - assert_equals(getComputedStyle(targets[0]).width, '100px'); - - // Attached to ViewTimeline: - // Range: [200, 500] + [50, 0] (inset) = [250, 500] - // 350 => 40% - assert_equals(getComputedStyle(targets[1]).width, '80px'); - }, 'Mixing deferred scroll and view-timelines'); -</script> 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 9e042b774b9..81dc8353c20 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,7 +14,6 @@ overflow: hidden; width: 100px; height: 100px; - view-timeline: --t1 defer; } .scroller > div { height: 100px; @@ -43,10 +42,13 @@ } </script> -<template id=dynamic_view_timeline_name> +<template id=dynamic_view_timeline_attachment> <style> + #scroller { + timeline-scope: --t1; + } .timeline { - view-timeline: --t1 ancestor; + view-timeline: --t1; } #target { animation: anim 1s linear; @@ -62,7 +64,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, dynamic_view_timeline_name); + inflate(t, dynamic_view_timeline_attachment); await scrollTop(scroller, 50); @@ -97,16 +99,16 @@ div25.classList.add('timeline'); await waitForCSSScrollTimelineStyle(); assert_equals(getComputedStyle(target).zIndex, '75', 'div25 again'); - }, 'Dynamically changing view-timeline-name'); + }, 'Dynamically changing view-timeline attachment'); </script> <template id=dynamic_view_timeline_axis> <style> #timeline { + view-timeline: --t1; width: 100px; height: 100px; margin: 100px; - view-timeline: --t1 ancestor; } #target { animation: anim 1s linear; @@ -114,8 +116,9 @@ } </style> <div id=scroller class=scroller> - <div id=timeline style="background: red;"></div> - <div id=target></div> + <div id=timeline style="background: red;"> + <div id=target></div> + </div> </div> </template> <script> @@ -138,7 +141,7 @@ width: 100px; height: 100px; margin: 100px; - view-timeline: --t1 ancestor; + view-timeline: --t1; } #target { animation: anim 1s linear; @@ -146,8 +149,9 @@ } </style> <div id=scroller class=scroller> - <div id=timeline style="background: red;"></div> - <div id=target></div> + <div id=timeline style="background: red;"> + <div id=target></div> + </div> </div> </template> <script> @@ -165,8 +169,11 @@ <template id=timeline_display_none> <style> + #scroller { + timeline-scope: --t1; + } #timeline { - view-timeline: --t1 ancestor; + view-timeline: --t1; } #target { animation: anim 1s linear; @@ -189,5 +196,5 @@ await waitForNextFrame(); // The timeline became inactive. assert_equals(getComputedStyle(target).zIndex, '-1', 'display:none'); - }, 'Element with view-timeline becoming display:none'); + }, 'Element with scoped 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 ea9acd22ba7..98f11b85429 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 @@ -22,10 +22,11 @@ </style> <main id=main></main> <script> - function inflate(t, template) { + async function inflate(t, template) { t.add_cleanup(() => main.replaceChildren()); - main.append(template.content.cloneNode(true)); - main.offsetTop; + return runAndWaitForFrameUpdate(() => { + main.append(template.content.cloneNode(true)); + }); } </script> @@ -49,8 +50,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, timeline_self); - await waitForNextFrame(); + await inflate(t, timeline_self); assert_equals(getComputedStyle(target).zIndex, '100'); }, 'view-timeline on self'); </script> @@ -58,11 +58,11 @@ <template id=timeline_preceding_sibling> <style> #scroller { - view-timeline: --t1 defer; + timeline-scope: --t1; } #timeline { height: 0px; - view-timeline: --t1 ancestor; + view-timeline: --t1; } #target { animation: anim 1s linear; @@ -81,10 +81,9 @@ </template> <script> promise_test(async (t) => { - inflate(t, timeline_preceding_sibling); - await waitForNextFrame(); + await inflate(t, timeline_preceding_sibling); assert_equals(getComputedStyle(target).zIndex, '75'); - }, 'view-timeline on preceding sibling'); + }, 'timeline-scope on preceding sibling'); </script> <template id=timeline_ancestor> @@ -113,8 +112,7 @@ </template> <script> promise_test(async (t) => { - inflate(t, timeline_ancestor); - await waitForNextFrame(); + await inflate(t, timeline_ancestor); assert_equals(getComputedStyle(target).zIndex, '25'); }, 'view-timeline on ancestor'); </script> @@ -122,11 +120,11 @@ <template id=timeline_ancestor_sibling> <style> #scroller { - view-timeline: --t1 defer; + timeline-scope: --t1; } #timeline { height: 0px; - view-timeline: --t1 ancestor; + view-timeline: --t1; } #target { animation: anim 1s linear; @@ -148,20 +146,19 @@ </template> <script> promise_test(async (t) => { - inflate(t, timeline_ancestor_sibling); - await waitForNextFrame(); + await inflate(t, timeline_ancestor_sibling); assert_equals(getComputedStyle(target).zIndex, '75'); - }, 'view-timeline on ancestor sibling'); + }, 'timeline-scope on ancestor sibling'); </script> <template id=timeline_ancestor_sibling_conflict> <style> #scroller { - view-timeline: --t1 defer; + timeline-scope: --t1; } #timeline1, #timeline2 { height: 0px; - view-timeline: --t1 ancestor; + view-timeline: --t1; } #target { animation: anim 1s linear; @@ -184,23 +181,22 @@ </template> <script> promise_test(async (t) => { - inflate(t, timeline_ancestor_sibling_conflict); - await waitForNextFrame(); + await inflate(t, timeline_ancestor_sibling_conflict); assert_equals(getComputedStyle(target).zIndex, 'auto'); - }, 'view-timeline on ancestor sibling, conflict remains unresolved'); + }, 'timeline-scope on ancestor sibling, conflict remains unresolved'); </script> <template id=timeline_ancestor_closer_timeline_wins> <style> #scroller { - view-timeline: --t1 defer; + timeline-scope: --t1; } #timeline { height: 0px; - view-timeline: --t1 ancestor; + view-timeline: --t1; } #parent { - scroll-timeline: --t1 defer; + timeline-scope: --t1; /* Inactive */ } #target { animation: anim 1s linear; @@ -220,26 +216,17 @@ </template> <script> promise_test(async (t) => { - inflate(t, timeline_ancestor_closer_timeline_wins); - await waitForNextFrame(); + await inflate(t, timeline_ancestor_closer_timeline_wins); assert_equals(getComputedStyle(target).zIndex, 'auto'); - }, 'view-timeline on ancestor sibling, closer timeline wins'); + }, 'timeline-scope 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 ancestor; - scroll-timeline: --t1 ancestor; - overflow: auto; - } - #timelines > div { - height: 50px; + view-timeline: --t1; + view-timeline-inset: 50px; + scroll-timeline: --t1; } #target { animation: anim 1s linear; @@ -247,24 +234,17 @@ } </style> <div id=scroller class=scroller> + <div id=target></div> + <div></div> <div></div> - <div id=timelines> - <div></div> - </div> <div></div> - <div> - <div> - <div id=target></div> - </div> - </div> <div></div> <div></div> </div> </template> <script> promise_test(async (t) => { - inflate(t, timeline_ancestor_scroll_timeline_wins_on_same_element); - await waitForNextFrame(); + await inflate(t, timeline_ancestor_scroll_timeline_wins_on_same_element); // In case of a name conflict on the same element, scroll progress timelines // take precedence over view progress timelines. // https://drafts.csswg.org/scroll-animations-1/#timeline-scope diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-animation.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-animation.html index 1c657e40ceb..9e5993b63a8 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-animation.html @@ -1,6 +1,7 @@ <!DOCTYPE html> -<title>Animations using named timeline ranges</title> +<title>View timelines and animation attachment ranges</title> <link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#named-timeline-range"> +<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#animation-range"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/web-animations/testcommon.js"></script> @@ -16,22 +17,35 @@ width: 200px; height: 200px; } - #target { + #scroller > div { margin: 800px 0px; width: 100px; height: 100px; - z-index: -1; - background-color: green; + } + #target { font-size: 10px; + background-color: green; + z-index: -1; } </style> <main id=main> </main> -<template> + +<template id=template_without_scope> <div id=scroller> + <div id=target class=timeline></div> + </div> +</template> + +<template id=template_with_scope> + <div id=scope> <div id=target></div> + <div id=scroller> + <div class=timeline></div> + </div> </div> </template> + <script> setup(assert_implements_animation_timeline); @@ -45,24 +59,31 @@ } async function waitForAnimationReady(target) { await waitForNextFrame(); - await Promise.all(target.getAnimations().map(x => x.promise)); + await Promise.all(target.getAnimations().map(x => x.ready)); } async function assertValueAt(scroller, target, args) { await waitForAnimationReady(target); await scrollTop(scroller, args.scrollTop); assert_equals(getComputedStyle(target).zIndex, args.expected.toString()); } - function test_animation_delay(options) { + function test_animation_range(options, template, desc_suffix) { + if (template === undefined) + template = template_without_scope; + if (desc_suffix === undefined) + desc_suffix = ''; + promise_test(async (t) => { - inflate(t, document.querySelector('template')); + inflate(t, template); let scroller = main.querySelector('#scroller'); let target = main.querySelector('#target'); + let timeline = main.querySelector('.timeline'); + let scope = main.querySelector('#scope'); - target.style.viewTimeline = '--t1 block'; - // TODO(crbug.com/1375998): Create the timeline in a separate frame to - // work around a bug. - await waitForNextFrame(); + if (scope != null) { + scope.style.timelineScope = '--t1'; + } + timeline.style.viewTimeline = '--t1'; target.style.animation = 'anim auto linear'; target.style.animationTimeline = '--t1'; target.style.animationRangeStart = options.rangeStart; @@ -91,24 +112,24 @@ await assertValueAt(scroller, target, { scrollTop: (options.startOffset + options.endOffset) / 2, expected: 50 }); - }, `Animation with ranges [${options.rangeStart}, ${options.rangeEnd}]`); + }, `Animation with ranges [${options.rangeStart}, ${options.rangeEnd}] ${desc_suffix}`.trim()); } - test_animation_delay({ + test_animation_range({ rangeStart: 'initial', rangeEnd: 'initial', startOffset: 600, endOffset: 900 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'cover 0%', rangeEnd: 'cover 100%', startOffset: 600, endOffset: 900 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'contain 0%', rangeEnd: 'contain 100%', startOffset: 700, @@ -116,88 +137,96 @@ }); - test_animation_delay({ + test_animation_range({ rangeStart: 'entry 0%', rangeEnd: 'entry 100%', startOffset: 600, endOffset: 700 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'exit 0%', rangeEnd: 'exit 100%', startOffset: 800, endOffset: 900 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'contain -50%', rangeEnd: 'entry 200%', startOffset: 650, endOffset: 800 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'entry 0%', rangeEnd: 'exit 100%', startOffset: 600, endOffset: 900 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'cover 20px', rangeEnd: 'cover 100px', startOffset: 620, endOffset: 700 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'contain 20px', rangeEnd: 'contain 100px', startOffset: 720, endOffset: 800 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'entry 20px', rangeEnd: 'entry 100px', startOffset: 620, endOffset: 700 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'entry-crossing 20px', rangeEnd: 'entry-crossing 100px', startOffset: 620, endOffset: 700 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'exit 20px', rangeEnd: 'exit 80px', startOffset: 820, endOffset: 880 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'exit-crossing 20px', rangeEnd: 'exit-crossing 80px', startOffset: 820, endOffset: 880 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'contain 20px', rangeEnd: 'contain calc(100px - 10%)', startOffset: 720, endOffset: 790 }); - test_animation_delay({ + test_animation_range({ rangeStart: 'exit 2em', rangeEnd: 'exit 8em', startOffset: 820, endOffset: 880 }); + // Test animation-range via timeline-scope. + test_animation_range({ + rangeStart: 'exit 2em', + rangeEnd: 'exit 8em', + startOffset: 820, + endOffset: 880 + }, template_with_scope, '(scoped)'); + </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update.html index 5400d8314b0..e1938caf500 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-range-update.html @@ -50,8 +50,6 @@ async function runTest() { await waitForCompositorReady(); - const anim = target.getAnimations()[0]; - // Scroll to exit 60%. scroller.scrollTop = 860; await waitForNextFrame(); diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-shorthand.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-shorthand.tentative.html index fd00acc73ab..e5bf8822932 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-shorthand.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-shorthand.tentative.html @@ -22,8 +22,6 @@ test_valid_value('view-timeline', '--x block', '--x'); test_valid_value('view-timeline', '--a, --b, --c'); test_valid_value('view-timeline', '--a inline, --b block, --c y', '--a inline, --b, --c y'); test_valid_value('view-timeline', '--auto'); -test_valid_value('view-timeline', '--abc defer y', '--abc y defer'); -test_valid_value('view-timeline', '--abc y defer'); test_invalid_value('view-timeline', '--abc --abc'); test_invalid_value('view-timeline', 'block none'); @@ -41,32 +39,26 @@ test_computed_value('view-timeline', '--y block', '--y'); test_computed_value('view-timeline', '--x block', '--x'); test_computed_value('view-timeline', '--a, --b, --c'); test_computed_value('view-timeline', '--a inline, --b block, --c y', '--a inline, --b, --c y'); -test_computed_value('view-timeline', '--abc defer y', '--abc y defer'); -test_computed_value('view-timeline', '--abc y defer'); test_shorthand_value('view-timeline', '--abc y', { 'view-timeline-name': '--abc', 'view-timeline-axis': 'y', - 'view-timeline-attachment': 'local', }); -test_shorthand_value('view-timeline', '--abc y defer, --def', +test_shorthand_value('view-timeline', '--abc y, --def', { 'view-timeline-name': '--abc, --def', 'view-timeline-axis': 'y, block', - 'view-timeline-attachment': 'defer, local', }); test_shorthand_value('view-timeline', '--abc, --def', { 'view-timeline-name': '--abc, --def', 'view-timeline-axis': 'block, block', - 'view-timeline-attachment': 'local, local', }); -test_shorthand_value('view-timeline', '--inline x ancestor', +test_shorthand_value('view-timeline', '--inline x', { 'view-timeline-name': '--inline', 'view-timeline-axis': 'x', - 'view-timeline-attachment': 'ancestor', }); function test_shorthand_contraction(shorthand, longhands, expected) { @@ -86,19 +78,16 @@ function test_shorthand_contraction(shorthand, longhands, expected) { test_shorthand_contraction('view-timeline', { 'view-timeline-name': '--abc', 'view-timeline-axis': 'inline', - 'view-timeline-attachment': 'ancestor', -}, '--abc inline ancestor'); +}, '--abc inline'); test_shorthand_contraction('view-timeline', { 'view-timeline-name': '--a, --b', 'view-timeline-axis': 'inline, block', - 'view-timeline-attachment': 'defer, local', -}, '--a inline defer, --b'); +}, '--a inline, --b'); test_shorthand_contraction('view-timeline', { 'view-timeline-name': 'none, none', 'view-timeline-axis': 'block, block', - 'view-timeline-attachment': 'local, local', }, 'none, none'); // Longhands with different lengths: @@ -106,12 +95,10 @@ test_shorthand_contraction('view-timeline', { test_shorthand_contraction('view-timeline', { 'view-timeline-name': '--a, --b, --c', 'view-timeline-axis': 'inline, inline', - 'view-timeline-attachment': 'local, local', }, ''); test_shorthand_contraction('view-timeline', { 'view-timeline-name': '--a, --b', 'view-timeline-axis': 'inline, inline, inline', - 'view-timeline-attachment': 'local, local', }, ''); </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming.html index 78ec8e1de54..0c7a5465721 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/effect-updateTiming.html @@ -55,26 +55,31 @@ test(t => { 'getComputedTiming().endTime after set delay -100'); }, 'Allows setting the delay to a negative number'); -test(t => { +promise_test(async t => { const anim = createScrollLinkedAnimationWithTiming(t, {duration: 100}) anim.play(); + await anim.ready; anim.effect.updateTiming({ delay: 100 }); assert_equals(anim.effect.getComputedTiming().progress, null); assert_equals(anim.effect.getComputedTiming().currentIteration, null); }, 'Allows setting the delay of an animation in progress: positive delay that' + ' causes the animation to be no longer in-effect'); -test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { fill: 'both', duration: 100 }) +promise_test(async t => { + const anim = + createScrollLinkedAnimationWithTiming(t, { fill: 'both', duration: 100 }); anim.play(); + await anim.ready; anim.effect.updateTiming({ delay: -50 }); assert_equals(anim.effect.getComputedTiming().progress, 0.5); }, 'Allows setting the delay of an animation in progress: negative delay that' + ' seeks into the active interval'); -test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { fill: 'both', duration: 100 }) +promise_test(async t => { + const anim = + createScrollLinkedAnimationWithTiming(t, { fill: 'both', duration: 100 }); anim.play(); + await anim.ready; anim.effect.updateTiming({ delay: -100 }); assert_equals(anim.effect.getComputedTiming().progress, 1); assert_equals(anim.effect.getComputedTiming().currentIteration, 0); @@ -96,9 +101,10 @@ for (const invalid of gBadDelayValues) { // endDelay // ------------------------------ -test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }) +promise_test(async t => { + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }); anim.play(); + await anim.ready; anim.effect.updateTiming({ endDelay: 123.45 }); assert_time_equals_literal(anim.effect.getTiming().endDelay, 123.45, 'set endDelay 123.45'); @@ -106,26 +112,29 @@ test(t => { 'getComputedTiming() after set endDelay 123.45'); }, 'Allows setting the endDelay to a positive number'); -test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }) +promise_test(async t => { + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }); anim.play(); + await anim.ready; anim.effect.updateTiming({ endDelay: -1000 }); assert_equals(anim.effect.getTiming().endDelay, -1000, 'set endDelay -1000'); assert_equals(anim.effect.getComputedTiming().endDelay, -1000, 'getComputedTiming() after set endDelay -1000'); }, 'Allows setting the endDelay to a negative number'); -test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }) +promise_test(async t => { + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }); anim.play(); + await anim.ready; assert_throws_js(TypeError, () => { anim.effect.updateTiming({ endDelay: Infinity }); }); }, 'Throws when setting the endDelay to infinity'); -test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }) +promise_test(async t => { + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }); anim.play(); + await anim.ready; assert_throws_js(TypeError, () => { anim.effect.updateTiming({ endDelay: -Infinity }); }); @@ -152,53 +161,59 @@ for (const fill of ['none', 'forwards', 'backwards', 'both']) { // iterationStart // ------------------------------ -test(t => { +promise_test(async t => { const anim = createScrollLinkedAnimationWithTiming(t, { iterationStart: 0.2, iterations: 1, fill: 'both', duration: 100, delay: 1 }) anim.play(); + await anim.ready; anim.effect.updateTiming({ iterationStart: 2.5 }); assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); assert_equals(anim.effect.getComputedTiming().currentIteration, 2); }, 'Allows setting the iterationStart of an animation in progress:' + ' backwards-filling'); -test(t => { +promise_test(async t => { const anim = createScrollLinkedAnimationWithTiming(t, { iterationStart: 0.2, iterations: 1, fill: 'both', duration: 100, delay: 0 }) anim.play(); + await anim.ready; anim.effect.updateTiming({ iterationStart: 2.5 }); assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); assert_equals(anim.effect.getComputedTiming().currentIteration, 2); }, 'Allows setting the iterationStart of an animation in progress:' + ' active phase'); -test(t => { +promise_test(async t => { const anim = createScrollLinkedAnimationWithTiming(t, { iterationStart: 0.3, iterations: 1, fill: 'both', duration: 200, delay: 0 }) anim.play(); + await anim.ready; assert_percents_equal(anim.currentTime, 0); - assert_percents_equal(anim.effect.getComputedTiming().localTime, 0, "localTime"); + assert_percents_equal(anim.effect.getComputedTiming().localTime, 0, + "localTime"); assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3); assert_equals(anim.effect.getComputedTiming().currentIteration, 0); anim.finish(); assert_percents_equal(anim.currentTime, 100); - assert_percents_equal(anim.effect.getComputedTiming().localTime, 100, "localTime"); + assert_percents_equal(anim.effect.getComputedTiming().localTime, 100, + "localTime"); assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.3); assert_equals(anim.effect.getComputedTiming().currentIteration, 1); anim.effect.updateTiming({ iterationStart: 2.5 }); assert_percents_equal(anim.currentTime, 100); - assert_percents_equal(anim.effect.getComputedTiming().localTime, 100, "localTime"); + assert_percents_equal(anim.effect.getComputedTiming().localTime, 100, + "localTime"); assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.5); assert_equals(anim.effect.getComputedTiming().currentIteration, 3); }, 'Allows setting the iterationStart of an animation in progress:' @@ -219,7 +234,7 @@ for (const invalid of gBadIterationStartValues) { // ------------------------------ test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }) + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }); anim.play(); anim.effect.updateTiming({ iterations: 2 }); assert_equals(anim.effect.getTiming().iterations, 2, 'set duration 2'); @@ -228,7 +243,7 @@ test(t => { }, 'Allows setting iterations to a double value'); test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }) + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }); anim.play(); assert_throws_js(TypeError, () => { anim.effect.updateTiming({ iterations: Infinity }); @@ -239,7 +254,9 @@ test(t => { // progress based animations behave a bit differently than time based animations // when changing iterations. test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 100000, fill: 'both' }) + const anim = + createScrollLinkedAnimationWithTiming( + t, { duration: 100000, fill: 'both' }); anim.play(); anim.finish(); @@ -280,7 +297,7 @@ test(t => { // Added test for checking duration "auto" test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { fill: 'both' }) + const anim = createScrollLinkedAnimationWithTiming(t, { fill: 'both' }); anim.play(); anim.finish(); @@ -317,7 +334,8 @@ test(t => { 'duration after setting iterations to zero'); assert_equals(anim.effect.getComputedTiming().currentIteration, 0, 'current iteration after setting iterations to zero'); -}, 'Allows setting the iterations of an animation in progress with duration "auto"'); +}, 'Allows setting the iterations of an animation in progress with duration ' + + '"auto"'); // ------------------------------ @@ -333,7 +351,7 @@ const gGoodDurationValuesForProgressBased = [ for (const duration of gGoodDurationValuesForProgressBased) { test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, 2000) + const anim = createScrollLinkedAnimationWithTiming(t, 2000); anim.play(); anim.effect.updateTiming({ duration: duration.specified }); if (typeof duration.specified === 'number') { @@ -366,7 +384,9 @@ for (const invalid of gBadDurationValuesForProgressBased) { } test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 100000, fill: 'both' }) + const anim = + createScrollLinkedAnimationWithTiming( + t, { duration: 100000, fill: 'both' }); anim.play(); anim.finish(); assert_equals(anim.effect.getComputedTiming().progress, 1, @@ -383,7 +403,9 @@ test(t => { }, 'Allows setting the duration of an animation in progress'); promise_test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 100000, fill: 'both' }) + const anim = + createScrollLinkedAnimationWithTiming( + t, { duration: 100000, fill: 'both' }); anim.play(); return anim.ready.then(() => { const originalStartTime = anim.startTime; @@ -417,7 +439,7 @@ promise_test(t => { // ------------------------------ test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }) + const anim = createScrollLinkedAnimationWithTiming(t, { duration: 2000 }); anim.play(); const directions = ['normal', 'reverse', 'alternate', 'alternate-reverse']; @@ -429,7 +451,9 @@ test(t => { }, 'Allows setting the direction to each of the possible keywords'); promise_test(async t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 10000, direction: 'normal' }); + const anim = + createScrollLinkedAnimationWithTiming( + t, { duration: 10000, direction: 'normal' }); const scroller = anim.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; @@ -445,12 +469,15 @@ promise_test(async t => { assert_time_equals_literal(anim.effect.getComputedTiming().progress, 0.93, 'progress after updating direction'); -}, 'Allows setting the direction of an animation in progress from \'normal\' to' - + ' \'reverse\''); +}, 'Allows setting the direction of an animation in progress from \'normal\' ' + + 'to \'reverse\''); -test(t => { - const anim = createScrollLinkedAnimationWithTiming(t, { duration: 10000, direction: 'normal' }); +promise_test(async t => { + const anim = + createScrollLinkedAnimationWithTiming( + t, { duration: 10000, direction: 'normal' }); anim.play(); + await anim.ready; assert_equals(anim.effect.getComputedTiming().progress, 0, 'progress before updating direction'); @@ -461,12 +488,13 @@ test(t => { }, 'Allows setting the direction of an animation in progress from \'normal\' to' + ' \'reverse\' while at start of active interval'); -test(t => { +promise_test(async t => { const anim = createScrollLinkedAnimationWithTiming(t, { fill: 'backwards', duration: 10000, delay: 10000, direction: 'normal' }); anim.play(); + await anim.ready; assert_equals(anim.effect.getComputedTiming().progress, 0, 'progress before updating direction'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/finish-animation.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/finish-animation.html index fd768651b49..3faff63dc93 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/finish-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/finish-animation.html @@ -27,9 +27,6 @@ promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.playbackRate = 0; @@ -40,9 +37,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.finish(); @@ -53,12 +47,9 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); // 1% past effect end - animation.currentTime = CSSNumericValue.parse(animation.effect.getComputedTiming().endTime.value + 1 + "%"); + animation.currentTime = CSSNumericValue.parse("101%"); animation.finish(); assert_percents_equal(animation.currentTime, 100, @@ -71,9 +62,6 @@ promise_test(async t => { const animation = createScrollLinkedAnimation(t); const scroller = animation.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); scroller.scrollTop = maxScroll; await animation.finished; @@ -88,9 +76,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.currentTime = CSSNumericValue.parse("100%"); await animation.finished; @@ -107,9 +92,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.playbackRate = 0.5; animation.finish(); @@ -128,12 +110,10 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); const scroller = animation.timeline.source; - // Make the scroll timeline inactive. - scroller.style.overflow = 'visible'; - scroller.scrollTop; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); + await runAndWaitForFrameUpdate(() => { + // Make the scroll timeline inactive. + scroller.style.overflow = 'visible'; + }); animation.play(); animation.finish(); @@ -148,15 +128,12 @@ promise_test(async t => { 'be set to the end of the active duration'); assert_equals(animation.startTime, null, 'The start time of a finished play-pending animation should ' + - 'be be unresolved'); + 'be unresolved'); }, 'Finishing an animation attached to inactive timeline while play-pending ' + 'doesn\'t resolves the pending task'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); let resolvedFinished = false; animation.finished.then(() => { @@ -173,9 +150,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); const promise = animation.ready; let readyResolved = false; @@ -194,9 +168,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.effect.target.remove(); @@ -212,9 +183,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -284,9 +252,6 @@ promise_test(async t => { const scroller = animation.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; scroller.scrollTop = 0.25 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -309,9 +274,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); const scroller = animation.timeline.source; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -331,9 +293,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.pause(); await animation.ready; @@ -349,9 +308,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); // Update playbackRate so we can test that the calculated startTime // respects it @@ -373,9 +329,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.playbackRate = -2; animation.pause(); @@ -394,9 +347,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -415,9 +365,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -433,9 +380,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/pause-animation.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/pause-animation.html index 9b263f843d2..1f9641e2f8d 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/pause-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/pause-animation.html @@ -26,9 +26,6 @@ promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -46,26 +43,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - animation.play(); - await animation.ready; - - animation.pause(); - assert_not_equals(animation.startTime, null, - 'The start time is resolved when pause-pending'); - - animation.play(); - assert_not_equals(animation.startTime, null, - 'The start time is preserved when a pause is aborted'); -}, 'Aborting a pause preserves the start time'); - -promise_test(async t => { - const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); const promise = animation.ready; animation.pause(); @@ -80,9 +57,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); // Let animation start roughly half-way through animation.currentTime = CSSNumericValue.parse("50%"); @@ -94,9 +68,9 @@ promise_test(async t => { await animation.ready; // If the current time was updated using the new playback rate it will jump - // back to 25s but if we correctly used the old playback rate the current time - // will be >= 50s. - assert_greater_than_equal(animation.currentTime.value, 50); + // back to 25% but if we correctly used the old playback rate the current time + // will be > 50%. + assert_percents_equal(animation.currentTime, 50); }, 'A pause-pending animation maintains the current time when applying a' + ' pending playback rate'); @@ -107,9 +81,6 @@ promise_test(async t => { const animation = createScrollLinkedAnimation(t); const scroller = animation.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -129,9 +100,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); const originalReadyPromise = animation.ready; @@ -170,8 +138,8 @@ promise_test(async t => { animation.pause(); assert_equals(animation.currentTime, null, 'The current time is null when the timeline is inactive.'); - assert_percents_equal(animation.startTime, 0, - 'The start time is zero in Pending state.'); + assert_equals(animation.startTime, null, + 'The start time is null in Pending state.'); await waitForNextFrame(); assert_true(animation.pending, 'Animation has pause pending task while the timeline is inactive.'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/play-animation.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/play-animation.html index d408547f555..7d95eaa2577 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/play-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/play-animation.html @@ -26,48 +26,104 @@ promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); + animation.play(); + assert_equals(animation.startTime, null); + await animation.ready; + assert_percents_equal(animation.startTime, 0); + + animation.cancel(); + const scroller = animation.timeline.source; + const maxScroll = scroller.scrollHeight - scroller.clientHeight; + scroller.scrollTop = maxScroll / 2; + animation.play(); + await animation.ready; + assert_percents_equal(animation.currentTime, 50); + +}, 'Playing an animations aligns the start time with the start of the active ' + + 'range'); + +promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + animation.playbackRate = -1; + animation.play(); + await animation.ready; + assert_percents_equal(animation.startTime, 100); +}, 'Playing an animations with a negative playback rate aligns the start ' + + 'time with the end of the active range'); + +promise_test(async t => { + const animation = createScrollLinkedAnimation(t); + animation.play(); + animation.startTime = CSSNumericValue.parse("10%"); + await animation.ready; + assert_percents_equal(animation.startTime, 10); +}, 'Start time set while play pending is preserved.'); + +promise_test(async t => { + const animation = createScrollLinkedAnimation(t); animation.play(); animation.currentTime = CSSNumericValue.parse("10%"); + await animation.ready; assert_percents_equal(animation.currentTime, 10); +}, 'Current time set while play pending is preserved.'); + +promise_test(async t => { + const animation = createScrollLinkedAnimation(t); animation.play(); + await animation.ready; + animation.currentTime = CSSNumericValue.parse("10%"); assert_percents_equal(animation.currentTime, 10); -}, 'Playing a running animation leaves the current time unchanged'); + animation.play(); + await animation.ready; + assert_percents_equal(animation.currentTime, 0); +}, 'Playing a running animation resets a sticky start time'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.finish(); assert_percents_equal(animation.currentTime, 100); animation.play(); + await animation.ready; assert_percents_equal(animation.currentTime, 0); -}, 'Playing a finished animation seeks back to the start'); +}, 'Playing a finished animation restarts the animation aligned at the start'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.playbackRate = -1; animation.currentTime = CSSNumericValue.parse("0%"); assert_percents_equal(animation.currentTime, 0); animation.play(); + await animation.ready; + assert_percents_equal(animation.currentTime, 100); -}, 'Playing a finished and reversed animation seeks to end'); +}, 'Playing a finished and reversed animation restarts the animation aligned ' + + 'at the end'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.finish(); + await animation.finished; + + // Start time is now sticky since modified by an explicit API call. + // All current time calculations will be based on the new start time + // while running. + assert_percents_equal(animation.startTime, -100, + 'start time when finished'); + assert_percents_equal(animation.currentTime, 100, + 'current time when finished'); + + const scroller = animation.timeline.source; + const maxScroll = scroller.scrollHeight - scroller.clientHeight; + scroller.scrollTop = maxScroll / 2; + await waitForNextFrame(); + assert_percents_equal(animation.startTime, -100, + 'start time after scrolling a finished animation'); + // Clamped at effect end time. + assert_percents_equal(animation.currentTime, 100, + 'current time after scrolling a finished animation'); // Initiate a pause then abort it animation.pause(); @@ -76,30 +132,29 @@ promise_test(async t => { // Wait to return to running state await animation.ready; - assert_percents_equal(animation.currentTime, 0, - 'After aborting a pause when finished, the current time should jump ' + - 'back to the start of the animation'); -}, 'Playing a pause-pending but previously finished animation seeks back to' - + ' to the start'); + assert_percents_equal(animation.startTime, 0, + 'After aborting a pause when finished, the start time should no ' + + 'longer be sticky'); + assert_percents_equal(animation.currentTime, 50, + 'After aborting a pause when finished, the current time should realign ' + + 'with the scroll position'); +}, 'Playing a pause-pending but previously finished animation realigns' + + ' with the scroll position'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.finish(); await animation.ready; animation.play(); + assert_equals(animation.startTime, null); + await animation.ready; assert_percents_equal(animation.startTime, 0, 'start time is zero'); }, 'Playing a finished animation clears the start time'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.cancel(); const promise = animation.ready; @@ -110,9 +165,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); const promise = animation.ready; const promiseResult = await promise; @@ -123,31 +175,25 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.currentTime = CSSNumericValue.parse("50%"); await animation.ready; + assert_percents_equal(animation.currentTime, 50); + animation.pause(); await animation.ready; - const holdTime = animation.currentTime; + assert_percents_equal(animation.currentTime, 50); animation.play(); await animation.ready; - assert_percents_equal( - animation.startTime, - animation.timeline.currentTime.value - holdTime.value); -}, 'Resuming an animation from paused calculates start time from hold time'); + assert_percents_equal(animation.startTime, 0); +}, 'Resuming an animation from paused realigns with scroll position.'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -171,29 +217,29 @@ promise_test(async t => { promise_test(async t => { // Seek animation beyond target end const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.currentTime = CSSNumericValue.parse("-100%"); await animation.ready; + assert_percents_equal(animation.currentTime, -100); // Set pending playback rate to the opposite direction animation.updatePlaybackRate(-1); assert_true(animation.pending); + // Note: Updating the playback rate calls play without rewind. For a + // scroll-timeline, this will immediately apply the playback rate. + // TODO: Determine if we should defer applying the new playback rate. assert_equals(animation.playbackRate, 1); - // When we play, we should seek to the target end, NOT to zero (which + // When we play, we should align to the target end, NOT to zero (which // is where we would seek to if we used the playbackRate of 1. animation.play(); + await animation.ready; + assert_percents_equal(animation.startTime, 100); assert_percents_equal(animation.currentTime, 100); -}, 'A pending playback rate is used when determining auto-rewind behavior'); +}, 'A pending playback rate is used when determining timeline range alignment'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.cancel(); assert_equals(animation.startTime, null, @@ -211,9 +257,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.playbackRate = -1; animation.cancel(); diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/reverse-animation.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/reverse-animation.html index cf6173b60a3..1054ed39836 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/reverse-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/reverse-animation.html @@ -26,9 +26,14 @@ promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); + animation.reverse(); + animation.currentTime = CSSNumericValue.parse("40%"); + await animation.ready; + assert_percents_equal(animation.currentTime, 40); +}, 'Setting current time while reverse-pending preserves currentTime'); + +promise_test(async t => { + const animation = createScrollLinkedAnimation(t); animation.play(); await animation.ready; @@ -45,23 +50,20 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); - animation.currentTime = CSSNumericValue.parse("50%"); - animation.reverse(); + animation.currentTime = CSSNumericValue.parse("40%"); + await animation.ready; + assert_percents_equal(animation.startTime, -40); + assert_percents_equal(animation.currentTime, 40); - assert_percents_equal(animation.currentTime, 50, - 'The current time should not change it is in the ' + - 'middle of the animation duration'); -}, 'Reversing an animation maintains the same current time'); + animation.reverse(); + await animation.ready; + assert_percents_equal(animation.startTime, 100); + assert_percents_equal(animation.currentTime, 100); +}, 'Reversing an animation resets a sticky start time.'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); assert_true(animation.pending, 'The animation is pending before we call reverse'); @@ -74,9 +76,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); let readyResolved = false; animation.ready.then(() => { readyResolved = true; }); @@ -90,76 +89,17 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - animation.play(); - animation.currentTime = CSSNumericValue.parse("200%"); - animation.reverse(); - - assert_percents_equal(animation.currentTime, 100, - 'reverse() should start playing from the animation ' + - 'effect end if the playbackRate > 0 and the ' + - 'currentTime > effect end'); -}, 'Reversing an animation when playbackRate > 0 and currentTime > effect ' + - 'end should make it play from the end'); - -promise_test(async t => { - const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - animation.play(); - - animation.currentTime = CSSNumericValue.parse("-200%"); - animation.reverse(); - - assert_percents_equal(animation.currentTime, 100, - 'reverse() should start playing from the animation ' + - 'effect end if the playbackRate > 0 and the ' + - 'currentTime < 0'); -}, 'Reversing an animation when playbackRate > 0 and currentTime < 0 should ' + - 'make it play from the end'); - -promise_test(async t => { - const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - animation.play(); - animation.playbackRate = -1; - animation.currentTime = CSSNumericValue.parse("-200%"); - animation.reverse(); - - assert_percents_equal(animation.currentTime, 0, - 'reverse() should start playing from the start of ' + - 'animation time if the playbackRate < 0 and the ' + - 'currentTime < 0'); -}, 'Reversing an animation when playbackRate < 0 and currentTime < 0 should ' + - 'make it play from the start'); - -promise_test(async t => { - const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.playbackRate = -1; - animation.currentTime = CSSNumericValue.parse("200%"); animation.reverse(); + await animation.ready; - assert_percents_equal(animation.currentTime, 0, - 'reverse() should start playing from the start of ' + - 'animation time if the playbackRate < 0 and the ' + - 'currentTime > effect end'); -}, 'Reversing an animation when playbackRate < 0 and currentTime > effect ' + - 'end should make it play from the start'); + assert_percents_equal(animation.currentTime, 0); +}, 'Reversing an animation with a negative playback rate should cause ' + + 'the animation to play in a forward direction'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.playbackRate = 0; animation.currentTime = CSSNumericValue.parse("50%"); @@ -168,16 +108,12 @@ promise_test(async t => { await animation.ready; assert_equals(animation.playbackRate, 0, 'reverse() should preserve playbackRate if the playbackRate == 0'); - assert_percents_equal(animation.currentTime, 50, - 'reverse() should not affect the currentTime if the playbackRate == 0'); -}, 'Reversing when when playbackRate == 0 should preserve the current time ' + - 'and playback rate'); + assert_percents_equal(animation.currentTime, 0, + 'Anchors to range start boundary when playback rate is zero'); +}, 'Reversing when when playbackRate == 0 should preserve the playback rate'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); assert_equals(animation.currentTime, null); animation.reverse(); @@ -187,7 +123,7 @@ promise_test(async t => { 'animation.startTime should be at its effect end'); assert_percents_equal(animation.currentTime, 100, 'animation.currentTime should be at its effect end'); -}, 'Reversing an idle animation from starts playing the animation'); +}, 'Reversing an idle animation aligns startTime with the rangeEnd boundary'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); @@ -195,8 +131,6 @@ promise_test(async t => { // Make the scroll timeline inactive. scroller.style.overflow = 'visible'; scroller.scrollTop; - // Wait for new animation frame which allows the timeline to compute new - // current time. await waitForNextFrame(); assert_throws_dom('InvalidStateError', () => { animation.reverse(); }); @@ -205,27 +139,18 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); animation.currentTime = CSSNumericValue.parse("50%"); animation.pause(); - await animation.ready; animation.reverse(); - await animation.ready; - assert_equals(animation.playState, 'running', 'Animation.playState should be "running" after reverse()'); }, 'Reversing an animation plays a pausing animation'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -235,6 +160,5 @@ promise_test(async t => { await animation.ready; assert_equals(animation.playbackRate, -2); }, 'Reversing should use the negative pending playback rate'); - </script> </body> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html index 5ded56bbf78..67bc36ca104 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-effect-phases.tentative.html @@ -314,7 +314,7 @@ verifyEffectBeforePhase(animation); animation.pause(); - await waitForNextFrame(); + await animation.ready; verifyEffectBeforePhase(animation); // Scrolling should not cause the animation effect to change. diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html index 236452eead5..02220cee141 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation-inactive-timeline.html @@ -42,8 +42,8 @@ promise_test(async t => { animation.play(); assert_equals(animation.currentTime, null, 'The current time is null when the timeline is inactive.'); - assert_percents_equal(animation.startTime, 0, - 'The start time is zero in Pending state.'); + assert_equals(animation.startTime, null, + 'The start time is unresolved while play-pending.'); await waitForNextFrame(); assert_true(animation.pending, 'Animation has play pending task while timeline is inactive.'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation.html index bc7ab4a476d..e3544762f60 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-animation.html @@ -25,29 +25,25 @@ const scroller = animation.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - // Verify initial start and current times in Idle state. assert_equals(animation.currentTime, null, "The current time is null in Idle state."); assert_equals(animation.startTime, null, "The start time is null in Idle state."); animation.play(); - assert_true(animation.pending, "Animation is in pending state."); - // Verify initial start and current times in Pending state. - assert_percents_equal(animation.currentTime, 0, - "The current time is zero in Pending state."); - assert_percents_equal(animation.startTime, 0, - "The start time is zero in Pending state."); + assert_true(animation.pending, "Animation is in the pending state."); + // Verify initial start and current times in the pending state. + assert_equals(animation.currentTime, null, + "The current time remains null while in the pending state."); + assert_equals(animation.startTime, null, + "The start time remains null while in the pending state."); await animation.ready; - // Verify initial start and current times in Playing state. + // Verify initial start and current times once ready. assert_percents_equal(animation.currentTime, 0, - "The current time is zero in Playing state."); + "The current time is resolved when ready."); assert_percents_equal(animation.startTime, 0, - "The start time is zero in Playing state."); + "The start time is resolved when ready."); // Now do some scrolling and make sure that the Animation current time is // correct. @@ -59,8 +55,6 @@ "The current time corresponds to the scroll position of the scroller."); assert_times_equal( animation.effect.getComputedTiming().progress, - // Division by 100 is temporary, it will be removed when progress returns - // a CSSNumericValue instead of a double 0-1 animation.timeline.currentTime.value / 100, 'Effect progress corresponds to the scroll position of the scroller.'); }, 'Animation start and current times are correct for each animation state.'); @@ -83,10 +77,10 @@ promise_test(async t => { "The start time is null in Idle state."); animation.play(); // Verify initial start and current times in Pending state. - assert_percents_equal(animation.currentTime, animation.timeline.currentTime, - "The current time is a hold time in Pending state."); - assert_percents_equal(animation.startTime, 0, - "The start time is zero in Pending state."); + assert_equals(animation.currentTime, null, + "The current time remains unresolved while play-pending."); + assert_equals(animation.startTime, null, + "The start time remains unresolved while play-pending."); await animation.ready; // Verify initial start and current times in Playing state. @@ -98,56 +92,6 @@ promise_test(async t => { ' when the animation starts playing with advanced scroller.'); promise_test(async t => { - const timeline = createScrollTimeline(t); - const animation1 = createScrollLinkedAnimation(t, timeline); - const animation2 = createScrollLinkedAnimation(t, timeline); - const scroller = timeline.source; - const maxScroll = scroller.scrollHeight - scroller.clientHeight; - - // Advance the scroller. - scroller.scrollTop = 0.4 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - - // Verify initial start and current times in Idle state. - assert_equals(animation1.currentTime, null, - "The current time is null in Idle state."); - assert_equals(animation1.startTime, null, - "The start time is null in Idle state."); - assert_equals(animation2.currentTime, null, - "The current time is null in Idle state."); - assert_equals(animation2.startTime, null, - "The start time is null in Idle state."); - animation1.play(); - animation2.play(); - // Verify initial start and current times in Pending state. - assert_percents_equal(animation1.currentTime, timeline.currentTime, - "The current time corresponds to the scroll position of the scroller" + - " in Pending state."); - assert_percents_equal(animation1.startTime, 0, - "The start time is zero in Pending state."); - assert_percents_equal(animation2.currentTime, timeline.currentTime, - "The current time corresponds to the scroll position of the scroller" + - " in Pending state."); - assert_percents_equal(animation2.startTime, 0, - "The start time is zero in Pending state."); - - await animation1.ready; - await animation2.ready; - // Verify initial start and current times in Playing state. - assert_percents_equal(animation1.currentTime, timeline.currentTime, - "The current corresponds to the scroll position of the scroller."); - assert_percents_equal(animation1.startTime, 0, - "The start time is zero in Playing state."); - assert_percents_equal(animation2.currentTime, timeline.currentTime, - "The current corresponds to the scroll position of the scroller."); - assert_percents_equal(animation2.startTime, 0, - "The start time is zero in Playing state."); -}, 'Animation start and current times are correct when multiple animations' + - ' are attached to the same timeline.'); - -promise_test(async t => { const animation = createScrollLinkedAnimation(t); const scroller = animation.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html index 0b9e10c9846..cf5e74898af 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/scroll-timeline-invalidation.html @@ -31,15 +31,11 @@ promise_test(async t => { let maxScroll = scroller.scrollHeight - scroller.clientHeight; scroller.scrollTop = 0.2 * maxScroll; const initial_progress = (scroller.scrollTop / maxScroll) * 100; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; // Animation current time is at 20% because scroller was scrolled to 20% - // assert_equals(animation.currentTime.value, 20); assert_equals(animation.currentTime.value, 20); assert_equals(scroller.scrollTop, 180); assert_equals(maxScroll, 900); @@ -70,9 +66,6 @@ promise_test(async t => { const scrollOffset = 0.2 * maxScroll scroller.scrollTop = scrollOffset; const initial_progress = (scroller.scrollTop / maxScroll) * 100; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -109,45 +102,29 @@ promise_test(async t => { const animation = new Animation( new KeyframeEffect( timeline.source.firstChild, - [{ height: '1000px' }, { height: '2000px' }], - { duration: 1000, } + [{ height: '1000px', easing: 'steps(2, jump-none)'}, + { height: '2000px' }], ), timeline); + animation.play(); await animation.ready; - await waitForNextFrame(); - scroller.scrollTop = 0.2 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - // Let s = scroll position - // p = fractional progress - // v = viewport height - // c = scroll height - // c[i] = c[i-1] * (1 + p[i-1]) - // p[i] = s / (c[i-1] - v) - - // c[0] = 1000 - // p[0] = 0.2 ==> s = 180 - // c[1] = 1000 * 1.2 = 1200 - assert_percents_equal(timeline.currentTime, 20, - 'Timeline current time is updated after animation frame.'); - assert_equals(scroller.scrollHeight, 1200); - await waitForNextFrame(); + assert_percents_equal(timeline.currentTime, 0); + assert_equals(scroller.scrollHeight, 1000); + + await runAndWaitForFrameUpdate(() => { + scroller.scrollTop = 0.6 * maxScroll; + }); // Applying the animation effect alters the height of the scroll content and // makes the scroll timeline stale. // https://github.com/w3c/csswg-drafts/issues/8694 - // p[1] = 180 / (1200 - 100) = 0.16363636363 - // c[2] = 1000 * 1.16363636363 = 1163.6363 => 1164 - // p[2] = 180 / (1164 - 100) = 0.1692 - // c[3] = 1169 + // With a single layout, timeline current time would be at 60%, but the + // timeline would be stale. + const expected_progress = 60 * maxScroll / (maxScroll + 1000); + assert_approx_equals(timeline.currentTime.value, expected_progress, 0.1); - assert_percents_equal(timeline.currentTime, 16.92, - 'Timeline current time is updated after two animation frames and ' + - 'reflects single layout run.'); - assert_approx_equals(scroller.scrollHeight, 1169, 1); }, 'If scroll animation resizes its scroll timeline scroller, ' + 'layout reruns once per frame.'); </script> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-playback-rate.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-playback-rate.html index 4d6fecae054..e7e96a27e1f 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-playback-rate.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-playback-rate.html @@ -33,6 +33,7 @@ animation.playbackRate = 0.5; animation.play(); + await animation.ready; assert_percents_equal(animation.currentTime, 0, 'Zero current time is not affected by playbackRate change.'); @@ -49,6 +50,7 @@ await waitForNextFrame(); animation.play(); + await animation.ready; animation.playbackRate = 0.5; assert_percents_equal(animation.currentTime, 0, @@ -134,63 +136,39 @@ }, 'The playback rate affects the rate of progress of the current time' + ' when scrolling'); - promise_test(async t => { - const animation = createScrollLinkedAnimation(t); - const scroller = animation.timeline.source; - const maxScroll = scroller.scrollHeight - scroller.clientHeight; - scroller.scrollTop = 0.25 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - animation.play(); - - animation.playbackRate = 2; - - assert_equals(animation.playState, "running"); - assert_true(animation.pending); - assert_percents_equal(animation.currentTime, 50); - }, 'Setting the playback rate while play-pending scales the current time' + - ' from scrollTimeline.'); - - test(t => { + promise_test(async t => { const animation = createScrollLinkedAnimation(t); animation.play(); + // Setting the current time while play-pending sets the hold time and not + // the start time. currentTime is unaffected by playback rate until no + // longer pending. animation.currentTime = CSSNumericValue.parse("25%"); animation.playbackRate = 2; assert_equals(animation.playState, "running"); assert_true(animation.pending); - assert_percents_equal(animation.currentTime, 50); - }, 'Setting the playback rate while play-pending scales the set current' + - ' time.'); + assert_percents_equal(animation.currentTime, 25); + await animation.ready; + assert_percents_equal(animation.currentTime, 25); + }, 'Setting the playback rate while play-pending does not scale current ' + + 'time.'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); const scroller = animation.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; scroller.scrollTop = 0.25 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); - assert_percents_equal(animation.currentTime, 25); - await animation.ready; animation.playbackRate = 2; assert_percents_equal(animation.currentTime, 50); - }, 'Setting the playback rate while playing scales the current time' + - ' from scrollTimeline.'); + }, 'Setting the playback rate while playing scales current time.'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); - /* Wait for animation frame is here for now to avoid a renderer crash - caused by crbug.com/1042924. Once that is fixed, these can be removed */ - await waitForAnimationFrames(2); - animation.play(); - animation.currentTime = CSSNumericValue.parse("25%"); await animation.ready; animation.playbackRate = 2; @@ -220,9 +198,6 @@ const scroller = animation.timeline.source; const maxScroll = scroller.scrollHeight - scroller.clientHeight; scroller.scrollTop = 0.5 * maxScroll; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time.html index d506df65bf9..aae1849565b 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-start-time.html @@ -249,40 +249,14 @@ promise_test(async t => { // Sanity check assert_true(animation.pending, 'Animation is pending'); assert_equals(animation.playState, 'running', 'Animation is play-pending'); - assert_percents_equal(animation.startTime, 0, 'Start time is zero'); - - // Setting start time should cancel the pending task. - animation.startTime = null; - assert_false(animation.pending, 'Animation is no longer pending'); - assert_equals(animation.playState, 'paused', 'Animation is paused'); -}, 'Setting an unresolved start time on a play-pending animation makes it' - + ' paused'); - -promise_test(async t => { - const animation = createScrollLinkedAnimation(t); - const scroller = animation.timeline.source; - // Make the scroll timeline inactive. - scroller.style.overflow = 'visible'; - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); - assert_equals(animation.timeline.currentTime, null, - 'Sanity check the timeline is inactive'); - - // Put the animation in the play-pending state - animation.play(); - - // Sanity check - assert_true(animation.pending, 'Animation is pending'); - assert_equals(animation.playState, 'running', 'Animation is play-pending'); - assert_percents_equal(animation.startTime, 0, 'Start time is zero'); + assert_equals(animation.startTime, null, 'Start time is unresolved'); // Setting start time should cancel the pending task. animation.startTime = null; assert_false(animation.pending, 'Animation is no longer pending'); assert_equals(animation.playState, 'idle', 'Animation is idle'); }, 'Setting an unresolved start time on a play-pending animation makes it' - + ' idle when the timeline is inactive'); + + ' idle'); promise_test(async t => { const animation = createScrollLinkedAnimation(t); @@ -315,9 +289,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -333,9 +304,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; @@ -353,9 +321,6 @@ promise_test(async t => { promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); let readyPromiseCallbackCalled = false; animation.ready.then(() => { readyPromiseCallbackCalled = true; } ); animation.pause(); @@ -407,9 +372,6 @@ promise_test(async t => { promise_test(async t => { const anim = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); anim.play(); await anim.ready; diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html index 34d9af2bff1..4a7e7366f79 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/setting-timeline.tentative.html @@ -232,15 +232,16 @@ promise_test(async t => { const animation = createAnimation(t); const scrollTimeline = createScrollTimeline(t); animation.timeline = scrollTimeline; - await animation.ready; animation.reverse(); - animation.pause(); + await animation.ready; await updateScrollPosition(scrollTimeline, 100); - assert_scroll_synced_times(animation, 10, 90); + animation.pause(); await animation.ready; + assert_scroll_synced_times(animation, 10, 90); + animation.timeline = document.timeline; assert_false(animation.pending); assert_equals(animation.playState, 'paused'); @@ -321,39 +322,16 @@ promise_test(async t => { const animation = createAnimation(t); animation.pause(); + animation.currentTime = 500; // 50% animation.timeline = scrollTimeline; await animation.ready; - assert_percents_equal(animation.currentTime, 0); - - animation.currentTime = CSSNumericValue.parse("50%"); - - animation.play(); - await animation.ready; assert_percents_equal(animation.currentTime, 50); -}, 'Switching from a document timeline to a scroll timeline and updating ' + - 'currentTime preserves the new value when unpaused.'); - -promise_test(async t => { - const scrollTimeline = createScrollTimeline(t); - await updateScrollPosition(scrollTimeline, 100); - - const animation = createAnimation(t); - animation.pause(); - animation.timeline = scrollTimeline; - await animation.ready; - assert_percents_equal(animation.currentTime, 0); - assert_equals(animation.playState, 'paused'); - - // Set a start time that will ensure that current time is in the active - // region in order not to trigger a seek when play is called. - animation.startTime = CSSNumericValue.parse("-10%"); - assert_equals(animation.playState, 'running'); animation.play(); await animation.ready; - assert_percents_equal(animation.startTime, -10); + assert_percents_equal(animation.currentTime, 10); }, 'Switching from a document timeline to a scroll timeline and updating ' + - 'startTime preserves the new value when play is called.'); + 'currentTime preserves the progress while paused.'); promise_test(async t => { const elem = createDiv(t); @@ -388,7 +366,7 @@ promise_test(async t => { assert_percents_equal(timing.endTime, 0); }, 'Switching from a document timeline to a scroll timeline on an infinite ' + - 'duration animation.') + 'duration animation.'); </script> </body> diff --git a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/update-playback-rate.html b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/update-playback-rate.html index 1db31602f31..10535319fca 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/update-playback-rate.html +++ b/tests/wpt/web-platform-tests/scroll-animations/scroll-timelines/update-playback-rate.html @@ -26,9 +26,6 @@ promise_test(async t => { const animation = createScrollLinkedAnimation(t); - // Wait for new animation frame which allows the timeline to compute new - // current time. - await waitForNextFrame(); animation.play(); await animation.ready; diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html index 16b9c301417..ee01070a53c 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/change-animation-range-updates-play-state.html @@ -48,26 +48,37 @@ anim = target.getAnimations()[0]; await anim.ready; + // Cover range = 600px to 900px + scroller.scrollTop = 750; await waitForNextFrame(); // Animation is running in the active phase. - anim.rangeStart = 'contain 0%'; // 700px - anim.rangeEnd = 'contain 100%'; // 800px + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = 'contain 0%'; // 700px + anim.rangeEnd = 'contain 100%'; // 800px + }); assert_equals(anim.playState, 'running'); + assert_percents_equal(anim.startTime, 100/3); assert_percents_equal(anim.currentTime, 100/6); // Animation in the after phase and switches to the finished state. - anim.rangeStart = 'entry 0%'; // 600px - anim.rangeEnd = 'entry 100%'; // 700px + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = 'entry 0%'; // 600px + anim.rangeEnd = 'entry 100%'; // 700px + }); assert_equals(anim.playState, 'finished'); - // Clamp to effect end when finished. + assert_percents_equal(anim.startTime, 0); + // In the after phase, so current time is clamped. assert_percents_equal(anim.currentTime, 100/3); // Animation in the before phase and switches back to the running state. - anim.rangeStart = 'exit 0%'; // 800px - anim.rangeEnd = 'exit 100%'; // 900px + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = 'exit 0%'; // 800px + anim.rangeEnd = 'exit 100%'; // 900px + }); assert_equals(anim.playState, 'running'); + assert_percents_equal(anim.startTime, 200/3); assert_percents_equal(anim.currentTime, -100/6); }, 'Changing the animation range updates the play state'); diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js index 65301215c47..a798fe918dd 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/testcommon.js @@ -45,7 +45,8 @@ function CreateViewTimelineOpacityAnimation(test, target, options) { // endOffset: 900 // }); async function runTimelineBoundsTest(t, options, message) { - container.scrollLeft = 0; + const scrollOffsetProp = options.axis == 'block' ? 'scrollTop' : 'scrollLeft'; + container[scrollOffsetProp] = 0; await waitForNextFrame(); const anim = @@ -58,19 +59,19 @@ async function runTimelineBoundsTest(t, options, message) { await anim.ready; // Advance to the start offset, which triggers entry to the active phase. - container.scrollLeft = options.startOffset; + container[scrollOffsetProp] = options.startOffset; await waitForNextFrame(); assert_equals(getComputedStyle(target).opacity, '0.3', `Effect at the start of the active phase: ${message}`); // Advance to the midpoint of the animation. - container.scrollLeft = (options.startOffset + options.endOffset) / 2; + container[scrollOffsetProp] = (options.startOffset + options.endOffset) / 2; await waitForNextFrame(); assert_equals(getComputedStyle(target).opacity,'0.5', `Effect at the midpoint of the active range: ${message}`); // Advance to the end of the animation. - container.scrollLeft = options.endOffset; + container[scrollOffsetProp] = options.endOffset; await waitForNextFrame(); assert_equals(getComputedStyle(target).opacity, '0.7', `Effect is in the active phase at effect end time: ${message}`); @@ -103,7 +104,7 @@ async function runTimelineRangeTest(t, options) { `${rangeToString(options.rangeEnd)}`; options.timeline = { - axis: 'inline' + axis: options.axis || 'inline' }; options.animation = { rangeStart: options.rangeStart, diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-get-set-range.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-get-set-range.html index 6de2d84df73..94660abcf27 100644 --- a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-get-set-range.html +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-get-set-range.html @@ -56,6 +56,7 @@ t.add_cleanup(() => { anim.cancel(); }); + await anim.ready; container.scrollLeft = 750; await waitForNextFrame(); @@ -72,8 +73,10 @@ // contain 0% @ 700px // cover 100% @ 900px // expected opacity = (750 - 700) / (900 - 700) = 0.25 - anim.rangeStart = "contain 0%"; - anim.rangeEnd = "cover 100%"; + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = "contain 0%"; + anim.rangeEnd = "cover 100%"; + }); assert_timeline_offset( anim.rangeStart, @@ -89,8 +92,10 @@ // entry -20px @ 580px // exit-crossing 10% @ 810px // expected opacity = (750 - 580) / (810 - 580) = 0.739130 - anim.rangeStart = { rangeName: 'entry', offset: CSS.px(-20), }; - anim.rangeEnd = { rangeName: 'exit-crossing', offset: CSS.percent(10) }; + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = { rangeName: 'entry', offset: CSS.px(-20), }; + anim.rangeEnd = { rangeName: 'exit-crossing', offset: CSS.percent(10) }; + }); assert_timeline_offset( anim.rangeStart, { rangeName: 'entry', offset: CSS.px(-20) }, @@ -106,8 +111,10 @@ // normal [start] @ 600px // contain 100% @ 800px // expected opacity = (750 - 600) / (800 - 600) = 0.75 - anim.rangeStart = "normal"; - anim.rangeEnd = "contain calc(60% + 40%)"; + await runAndWaitForFrameUpdate(() => { + anim.rangeStart = "normal"; + anim.rangeEnd = "contain calc(60% + 40%)"; + }); assert_equals(anim.rangeStart, 'normal','rangeStart set to normal'); assert_timeline_offset( anim.rangeEnd, diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-block.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-block.html new file mode 100644 index 00000000000..43b717560dd --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-block.html @@ -0,0 +1,94 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + height: 500px; + overflow: auto; +} +.space { + height: 500px; +} +#targetp { + background: yellow; + position: sticky; + top: 0px; + bottom: 0px; + height: 50px; +} +#target { + height: 50px; +} + +</style> +</head> +<body> +<div id="container"> + <div class="space"></div> + <div class="space"> + <div style="height: 200px"></div> + <div id="targetp"> + <div id="target">Subject</div> + </div> + </div> + <div class="space"></div> +</div> +<script type="text/javascript"> + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: 0, + endOffset: 1000, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: 50, + endOffset: 950, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: 0, + endOffset: 50, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: 0, + endOffset: 50, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: 950, + endOffset: 1000, + axis: 'block' + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: 950, + endOffset: 1000, + axis: 'block' + }); +}, 'View timeline with sticky target, block axis.' ); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-inline.html b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-inline.html new file mode 100644 index 00000000000..4dc8331d9fa --- /dev/null +++ b/tests/wpt/web-platform-tests/scroll-animations/view-timelines/view-timeline-sticky-inline.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<html id="top"> +<head> +<meta charset="utf-8"> +<title>View timeline with sticky</title> +<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#viewtimeline-interface"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/web-animations/testcommon.js"></script> +<script src="/scroll-animations/scroll-timelines/testcommon.js"></script> +<script src="/scroll-animations/view-timelines/testcommon.js"></script> +<style> + +#container { + width: 500px; + height: 500px; + overflow: auto; + white-space: nowrap; +} +.space { + display: inline-block; + width: 500px; + height: 400px; + white-space: nowrap; +} +#target { + display: inline-block; + background: yellow; + position: sticky; + left: 0px; + right: 0px; + width: 50px; + height: 400px; +} + +</style> +</head> +<body> +<div id="container"><!-- + --><div class="space"></div><!-- + --><div class="space"><!-- + --><div style="display:inline-block; width:200px"></div><!-- + --><div id="target"></div><!-- + --></div><!-- + --><div class="space"></div><!-- +--></div> +<script type="text/javascript"> + +promise_test(async t => { + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'cover', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'cover', offset: CSS.percent(100) }, + startOffset: 0, + endOffset: 1000 + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'contain', offset: CSS.percent(0) } , + rangeEnd: { rangeName: 'contain', offset: CSS.percent(100) }, + startOffset: 50, + endOffset: 950 + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry', offset: CSS.percent(100) }, + startOffset: 0, + endOffset: 50 + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'entry-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'entry-crossing', offset: CSS.percent(100) }, + startOffset: 0, + endOffset: 50 + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit', offset: CSS.percent(100) }, + startOffset: 950, + endOffset: 1000 + }); + await runTimelineRangeTest(t, { + rangeStart: { rangeName: 'exit-crossing', offset: CSS.percent(0) }, + rangeEnd: { rangeName: 'exit-crossing', offset: CSS.percent(100) }, + startOffset: 950, + endOffset: 1000 + }); +}, 'View timeline with sticky target, block axis.' ); + +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shared-storage/resources/util.js b/tests/wpt/web-platform-tests/shared-storage/resources/util.js index 838885a5657..2ad668c85a1 100644 --- a/tests/wpt/web-platform-tests/shared-storage/resources/util.js +++ b/tests/wpt/web-platform-tests/shared-storage/resources/util.js @@ -84,4 +84,4 @@ async function AreSharedStorageMethodsAllowedByPermissionsPolicy() { return true; return false; -}
\ No newline at end of file +} diff --git a/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-default.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-default.tentative.https.sub.html index 5439df2a068..87fcdfe1870 100644 --- a/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-default.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-default.tentative.https.sub.html @@ -25,5 +25,8 @@ test_feature_availability('shared-storage', t, cross_origin_src, expect_feature_available_default); }, header + ' allows sharedStorage in cross-origin iframes.'); + + // TODO(crbug.com/1434529): Add tests with + // `fetch(<url>, {sharedStorageWritable: true})`. </script> </body> diff --git a/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-none.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-none.tentative.https.sub.html index 17a4bf1803c..1f64d9a538c 100644 --- a/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-none.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-none.tentative.https.sub.html @@ -25,5 +25,8 @@ test_feature_availability('shared-storage', t, cross_origin_src, expect_feature_unavailable_default); }, header + ' disallows sharedStorage in cross-origin iframes.'); + + // TODO(crbug.com/1434529): Add tests with + // `fetch(<url>, {sharedStorageWritable: true})`. </script> </body> diff --git a/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-self.tentative.https.sub.html b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-self.tentative.https.sub.html index 171325cdf8f..d3787f3caa5 100644 --- a/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-self.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/shared-storage/shared-storage-permissions-policy-self.tentative.https.sub.html @@ -25,5 +25,8 @@ test_feature_availability('shared-storage', t, cross_origin_src, expect_feature_unavailable_default); }, header + ' disallows sharedStorage in cross-origin iframes.'); + + // TODO(crbug.com/1434529): Add tests with + // `fetch(<url>, {sharedStorageWritable: true})`, including redirects. </script> </body> diff --git a/tests/wpt/web-platform-tests/shared-storage/shared-storage-writable-insecure-context.tentative.http.sub.html b/tests/wpt/web-platform-tests/shared-storage/shared-storage-writable-insecure-context.tentative.http.sub.html new file mode 100644 index 00000000000..346321a41f4 --- /dev/null +++ b/tests/wpt/web-platform-tests/shared-storage/shared-storage-writable-insecure-context.tentative.http.sub.html @@ -0,0 +1,20 @@ +<!doctype html> +<body> + <script src=/resources/testharness.js></script> + <script src=/resources/testharnessreport.js></script> + <script> + 'use strict'; + + promise_test(async t => { + try { + new Request('./resources/simple-module.js', {sharedStorageWritable: true}); + } catch (e) { + assert_equals(e.name, 'TypeError'); + assert_equals(e.message, `Failed to construct 'Request': sharedStorageWritable: ` + + `sharedStorage operations are only available in secure contexts.`); + return; + } + assert_unreached("did not reject"); + }, 'sharedStorageWritable not allowed in insecure context.'); + </script> +</body> diff --git a/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html b/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html index 27e9bbbd13c..7a2018d20ee 100644 --- a/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html +++ b/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html @@ -12,7 +12,7 @@ <body> <main id=main> <div> - <a id=link><img src="/images/ggrr-256x256.png"></a> + <a id=link><img src="/images/lcp-256x256.png"></a> </div> </main> <script> diff --git a/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html b/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html index 5aa1b1da2ef..501d1c5fb6f 100644 --- a/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html +++ b/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html @@ -12,7 +12,7 @@ <body> <main id=main> <div> - <a id=link><img src="/images/ggrr-256x256.png"></a> + <a id=link><img src="/images/lcp-256x256.png"></a> </div> </main> <script> diff --git a/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html b/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html index 7f5bafb5e68..1489ae1a94a 100644 --- a/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html +++ b/tests/wpt/web-platform-tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html @@ -12,7 +12,7 @@ <body> <main id=main> <div> - <a id=link><img src="/images/ggrr-256x256.png"></a> + <a id=link><img src="/images/lcp-256x256.png"></a> </div> </main> <script> diff --git a/tests/wpt/web-platform-tests/svg/pservers/reftests/pattern-text-01.svg b/tests/wpt/web-platform-tests/svg/pservers/reftests/pattern-text-01.svg new file mode 100644 index 00000000000..16c053590d0 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/pservers/reftests/pattern-text-01.svg @@ -0,0 +1,21 @@ +<svg height="100px" width="100px" viewBox="0 0 1000 300" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml"> + <metadata> + <h:title>pattern on text elements</h:title> + <h:link rel="help" href="https://www.w3.org/TR/SVG2/pservers.html#Patterns"/> + <h:link rel="match" href="reference/green-100x100.svg"/> + <h:link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + </metadata> + <defs> + <pattern id="green" width="10%" height="10%" patternUnits="userSpaceOnUse"> + <rect width="8%" height="8%" fill="green"/> + </pattern> + <pattern id="red" width="10%" height="10%" patternUnits="userSpaceOnUse"> + <rect x="0.5%" y="0.5%" width="7%" height="7%" fill="red"/> + </pattern> + </defs> + <rect fill="green" width="1000" height="300"/> + + <!-- the text should be covered by the rect that follows --> + <text fill="url(#red)" font-family="Ahem" font-size="100px" x="50" y="150">XXXXXXXX</text> + <rect fill="url(#green)" width="1000" height="300"/> +</svg> 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 9ab88012762..59a0000a0e4 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.2 pyyaml==6.0 -requests==2.30.0 -taskcluster==50.1.3 +requests==2.31.0 +taskcluster==51.0.0 diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml b/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml index 9526a8b8fa8..35dbbb1cb64 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml +++ b/tests/wpt/web-platform-tests/tools/ci/tc/tasks/test.yml @@ -4,7 +4,7 @@ components: workerType: ci schedulerId: taskcluster-github deadline: "24 hours" - image: webplatformtests/wpt:0.53 + image: webplatformtests/wpt:0.54 maxRunTime: 7200 artifacts: public/results: @@ -116,6 +116,7 @@ components: - python3.7 - python3.7-distutils - python3.7-dev + - python3.7-venv tox-python3_10: env: @@ -125,6 +126,7 @@ components: - python3.10 - python3.10-distutils - python3.10-dev + - python3.10-venv tests-affected: options: diff --git a/tests/wpt/web-platform-tests/tools/docker/Dockerfile b/tests/wpt/web-platform-tests/tools/docker/Dockerfile index 73db1469994..5fd75c5fc3e 100644 --- a/tests/wpt/web-platform-tests/tools/docker/Dockerfile +++ b/tests/wpt/web-platform-tests/tools/docker/Dockerfile @@ -31,6 +31,7 @@ RUN apt-get -qqy update \ python3 \ python3-dev \ python3-pip \ + python3-venv \ software-properties-common \ qemu-kvm \ tzdata \ @@ -64,7 +65,6 @@ RUN apt-get -qqy install \ RUN apt-get -y autoremove RUN pip install --upgrade pip -RUN pip install virtualenv ENV TZ "UTC" RUN echo "${TZ}" > /etc/timezone \ diff --git a/tests/wpt/web-platform-tests/tools/docker/requirements.txt b/tests/wpt/web-platform-tests/tools/docker/requirements.txt index fee00749e85..88b70f37a0d 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.30.0 +requests==2.31.0 diff --git a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt index b027108a81f..19a81dd3a5c 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt @@ -5,10 +5,10 @@ tomli==2.0.1 typed-ast==1.5.4 types-atomicwrites==1.4.5.1 types-python-dateutil==2.8.19.13 -types-PyYAML==6.0.12.9 -types-requests==2.30.0.0 -types-setuptools==67.7.0.2 +types-PyYAML==6.0.12.10 +types-requests==2.31.0.0 +types-setuptools==67.8.0.0 types-six==1.16.21.8 types-ujson==5.7.0.5 types-urllib3==1.26.25.13 -typing_extensions==4.5.0 +typing_extensions==4.6.2 diff --git a/tests/wpt/web-platform-tests/tools/requirements_pytest.txt b/tests/wpt/web-platform-tests/tools/requirements_pytest.txt index afab5448312..6dc497515bc 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 +pytest-cov==4.1.0 hypothesis==6.75.2 diff --git a/tests/wpt/web-platform-tests/tools/requirements_tests.txt b/tests/wpt/web-platform-tests/tools/requirements_tests.txt index ed41215bcc1..614aa3e8625 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_tests.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_tests.txt @@ -1,5 +1,5 @@ -httpx[http2]==0.24.0 +httpx[http2]==0.24.1 json-e==4.5.2 jsonschema==4.17.3 pyyaml==6.0 -taskcluster==50.1.3 +taskcluster==51.0.0 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 6a02e65ba5a..21c9f720a8e 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 @@ -39,6 +39,10 @@ class MoveTargetOutOfBoundsException(BidiException): error_code = "move target out of bounds" +class NoSuchElementException(BidiException): + error_code = "no such element" + + class NoSuchFrameException(BidiException): error_code = "no such frame" diff --git a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/modules/input.py b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/modules/input.py index 5240bbb5843..0670d1ebab4 100644 --- a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/modules/input.py +++ b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/modules/input.py @@ -317,7 +317,7 @@ class WheelInputSource(InputSource): class Actions: def __init__(self) -> None: self.input_sources: List[InputSource] = [] - self.seen_names: MutableMapping[str, Set[str]] = defaultdict(Set) + self.seen_names: MutableMapping[str, Set[str]] = defaultdict(set) def _add_source(self, cls: Type[InputSourceType], diff --git a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py index 47d0659196c..774c1c56686 100644 --- a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py +++ b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py @@ -74,7 +74,7 @@ class Response: cls_name = self.__class__.__name__ if self.error: return f"<{cls_name} status={self.status} error={repr(self.error)}>" - return f"<{cls_name: }tatus={self.status} body={json.dumps(self.body)}>" + return f"<{cls_name}: status={self.status} body={json.dumps(self.body)}>" def __str__(self): return json.dumps(self.body, indent=2) diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py index e40739e4b74..5e8bfdab160 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/browser.py +++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py @@ -81,6 +81,12 @@ class Browser: def __init__(self, logger): self.logger = logger + def _get_browser_download_dir(self, dest, channel): + if dest is None: + return self._get_browser_binary_dir(dest, channel) + + return dest + def _get_browser_binary_dir(self, dest, channel): if dest is None: # os.getcwd() doesn't include the venv path @@ -108,7 +114,7 @@ class Browser: """ self.logger.info("Downloading from %s" % url) - dest = self._get_browser_binary_dir(dest, channel) + dest = self._get_browser_download_dir(dest, channel) resp = get(url) filename = get_download_filename(resp, default_name) @@ -235,8 +241,7 @@ class Firefox(Browser): } os_key = (self.platform, uname[4]) - if dest is None: - dest = self._get_browser_binary_dir(None, channel) + dest = self._get_browser_download_dir(dest, channel) if channel not in product: raise ValueError("Unrecognised release channel: %s" % channel) @@ -848,8 +853,7 @@ class Chromium(ChromeChromiumBase): return self._build_snapshots_url(revision, filename) def download(self, dest=None, channel=None, rename=None, version=None, revision=None): - if dest is None: - dest = self._get_browser_binary_dir(None, channel) + dest = self._get_browser_download_dir(dest, channel) filename = f"{self._chromium_package_name}.zip" @@ -1739,8 +1743,7 @@ class Safari(Browser): if channel != "preview": raise ValueError(f"can only install 'preview', not '{channel}'") - if dest is None: - dest = self._get_browser_binary_dir(None, channel) + dest = self._get_browser_download_dir(dest, channel) stp_downloads = self._find_downloads() @@ -2019,7 +2022,7 @@ class WebKitTestRunner(Browser): def version(self, binary=None, webdriver_binary=None): dirname = os.path.dirname(binary) - identifier = os.path.join(dirname, "identifier") + identifier = os.path.join(dirname, "..", "identifier") if not os.path.exists(identifier): return None @@ -2057,8 +2060,7 @@ class WebKitGTKMiniBrowser(WebKit): bundle_filename = response.text.strip() bundle_url = base_download_dir + bundle_filename - if dest is None: - dest = self._get_browser_binary_dir(None, channel) + dest = self._get_browser_download_dir(dest, channel) bundle_file_path = os.path.join(dest, bundle_filename) self.logger.info("Downloading WebKitGTK MiniBrowser bundle from %s" % bundle_url) diff --git a/tests/wpt/web-platform-tests/tools/wpt/requirements.txt b/tests/wpt/web-platform-tests/tools/wpt/requirements.txt index becc27ff2e0..2c24336eb31 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.30.0 +requests==2.31.0 diff --git a/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py b/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py index 59f422a6ef5..87f5d4281fe 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py +++ b/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py @@ -1,9 +1,12 @@ # mypy: allow-untyped-defs +import logging import os import shutil +import site import sys -import logging +import sysconfig +from pathlib import Path from shutil import which # The `pkg_resources` module is provided by `setuptools`, which is itself a @@ -27,9 +30,7 @@ class Virtualenv: self.path = path self.skip_virtualenv_setup = skip_virtualenv_setup if not skip_virtualenv_setup: - self.virtualenv = which("virtualenv") - if not self.virtualenv: - raise ValueError("virtualenv must be installed and on the PATH") + self.virtualenv = [sys.executable, "-m", "venv"] self._working_set = None @property @@ -47,7 +48,7 @@ class Virtualenv: if os.path.exists(self.path): shutil.rmtree(self.path) self._working_set = None - call(self.virtualenv, self.path, "-p", sys.executable) + call(*self.virtualenv, self.path) @property def bin_path(self): @@ -59,7 +60,9 @@ class Virtualenv: def pip_path(self): path = which("pip3", path=self.bin_path) if path is None: - raise ValueError("pip3 not found") + path = which("pip", path=self.bin_path) + if path is None: + raise ValueError("pip3 or pip not found") return path @property @@ -100,9 +103,37 @@ class Virtualenv: # https://github.com/web-platform-tests/wpt/issues/27377 # https://github.com/python/cpython/pull/9516 os.environ.pop('__PYVENV_LAUNCHER__', None) - path = os.path.join(self.bin_path, "activate_this.py") - with open(path) as f: - exec(f.read(), {"__file__": path}) + + # Setup the path and site packages as if we'd launched with the virtualenv active + bin_dir = os.path.join(self.path, "bin") + os.environ["PATH"] = os.pathsep.join([bin_dir] + os.environ.get("PATH", "").split(os.pathsep)) + os.environ["VIRTUAL_ENV"] = self.path + + prev_length = len(sys.path) + + schemes = sysconfig.get_scheme_names() + if "venv" in schemes: + scheme = "venv" + else: + scheme = "nt_user" if os.name == "nt" else "posix_user" + sys_paths = sysconfig.get_paths(scheme) + data_path = sys_paths["data"] + added = set() + # Add the venv library paths as sitedirs. + # This converts system paths like /usr/local/lib/python3.10/site-packages + # to venv-relative paths like {self.path}/lib/python3.10/site-packages and adds + # those paths as site dirs to be used for module import. + for key in ["purelib", "platlib"]: + host_path = Path(sys_paths[key]) + relative_path = host_path.relative_to(data_path) + site_dir = os.path.normpath(os.path.normcase(Path(self.path) / relative_path)) + if site_dir not in added: + site.addsitedir(site_dir) + added.add(site_dir) + sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length] + + sys.real_prefix = sys.prefix + sys.prefix = self.path def start(self): if not self.exists or self.broken_link: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt index 28be0b3c6e1..3e5467a5f45 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt @@ -5,6 +5,6 @@ mozlog==7.1.1 mozprocess==1.3.0 packaging==23.1 pillow==9.5.0 -requests==2.30.0 +requests==2.31.0 six==1.16.0 urllib3==2.0.2 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 f7f06f366c4..abc64ec5085 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.1 -requests==2.30.0 +requests==2.31.0 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/actions.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/actions.py index 6a4a0b889e4..f3fe970484e 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/actions.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/actions.py @@ -277,6 +277,85 @@ class SetSPCTransactionModeAction: self.logger.debug("Setting SPC transaction mode to %s" % mode) return self.protocol.spc_transactions.set_spc_transaction_mode(mode) +class CancelFedCMDialogAction: + name = "cancel_fedcm_dialog" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + self.logger.debug("Canceling FedCM dialog") + return self.protocol.fedcm.cancel_fedcm_dialog() + +class SelectFedCMAccountAction: + name = "select_fedcm_account" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + account_index = payload["account_index"] + self.logger.debug(f"Selecting FedCM account of index: {account_index}") + return self.protocol.fedcm.select_fedcm_account(account_index) + +class GetFedCMAccountListAction: + name = "get_fedcm_account_list" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + self.logger.debug("Getting FedCM account list") + return self.protocol.fedcm.get_fedcm_account_list() + +class GetFedCMDialogTitleAction: + name = "get_fedcm_dialog_title" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + self.logger.debug("Getting FedCM dialog title") + return self.protocol.fedcm.get_fedcm_dialog_title() + +class GetFedCMDialogTypeAction: + name = "get_fedcm_dialog_type" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + self.logger.debug("Getting FedCM dialog type") + return self.protocol.fedcm.get_fedcm_dialog_type() + +class SetFedCMDelayEnabledAction: + name = "set_fedcm_delay_enabled" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + enabled = payload["enabled"] + self.logger.debug("Setting FedCM delay enabled as %s" % enabled) + return self.protocol.fedcm.set_fedcm_delay_enabled(enabled) + +class ResetFedCMCooldownAction: + name = "reset_fedcm_cooldown" + + def __init__(self, logger, protocol): + self.logger = logger + self.protocol = protocol + + def __call__(self, payload): + self.logger.debug("Resetting FedCM cooldown") + return self.protocol.fedcm.reset_fedcm_cooldown() + actions = [ClickAction, DeleteAllCookiesAction, GetAllCookiesAction, @@ -296,4 +375,11 @@ actions = [ClickAction, RemoveCredentialAction, RemoveAllCredentialsAction, SetUserVerifiedAction, - SetSPCTransactionModeAction] + SetSPCTransactionModeAction, + CancelFedCMDialogAction, + SelectFedCMAccountAction, + GetFedCMAccountListAction, + GetFedCMDialogTitleAction, + GetFedCMDialogTypeAction, + SetFedCMDelayEnabledAction, + ResetFedCMCooldownAction] diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 9a771f11c6c..46b98d4df13 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -32,6 +32,7 @@ from .protocol import (BaseProtocolPart, WindowProtocolPart, DebugProtocolPart, SPCTransactionsProtocolPart, + FedCMProtocolPart, merge_dicts) from webdriver.client import Session @@ -359,6 +360,34 @@ class WebDriverSPCTransactionsProtocolPart(SPCTransactionsProtocolPart): return self.webdriver.send_session_command("POST", "secure-payment-confirmation/set-mode", body) +class WebDriverFedCMProtocolPart(FedCMProtocolPart): + def setup(self): + self.webdriver = self.parent.webdriver + + def cancel_fedcm_dialog(self): + return self.webdriver.send_session_command("POST", "fedcm/canceldialog") + + def select_fedcm_account(self, account_index): + body = {"accountIndex": account_index} + return self.webdriver.send_session_command("POST", "fedcm/selectaccount", body) + + def get_fedcm_account_list(self): + return self.webdriver.send_session_command("GET", "fedcm/accountlist") + + def get_fedcm_dialog_title(self): + return self.webdriver.send_session_command("GET", "fedcm/gettitle") + + def get_fedcm_dialog_type(self): + return self.webdriver.send_session_command("GET", "fedcm/getdialogtype") + + def set_fedcm_delay_enabled(self, enabled): + body = {"enabled": enabled} + return self.webdriver.send_session_command("POST", "fedcm/setdelayenabled", body) + + def reset_fedcm_cooldown(self): + return self.webdriver.send_session_command("POST", "fedcm/resetcooldown") + + class WebDriverDebugProtocolPart(DebugProtocolPart): def load_devtools(self): raise NotImplementedError() @@ -379,6 +408,7 @@ class WebDriverProtocol(Protocol): WebDriverSetPermissionProtocolPart, WebDriverVirtualAuthenticatorProtocolPart, WebDriverSPCTransactionsProtocolPart, + WebDriverFedCMProtocolPart, WebDriverDebugProtocolPart] def __init__(self, executor, browser, capabilities, **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 4cef0134027..170c27cd687 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 @@ -616,6 +616,52 @@ class SPCTransactionsProtocolPart(ProtocolPart): pass +class FedCMProtocolPart(ProtocolPart): + """Protocol part for Federated Credential Management""" + __metaclass__ = ABCMeta + + name = "fedcm" + + @abstractmethod + def cancel_fedcm_dialog(self): + """Cancel the FedCM dialog""" + pass + + @abstractmethod + def select_fedcm_account(self, account_index): + """Select a FedCM account + + :param int account_index: The index of the account to select""" + pass + + @abstractmethod + def get_fedcm_account_list(self): + """Get the FedCM account list""" + pass + + @abstractmethod + def get_fedcm_dialog_title(self): + """Get the FedCM dialog title""" + pass + + @abstractmethod + def get_fedcm_dialog_type(self): + """Get the FedCM dialog type""" + pass + + @abstractmethod + def set_fedcm_delay_enabled(self, enabled): + """Sets the FedCM delay as enabled or disabled + + :param bool enabled: The delay to set""" + pass + + @abstractmethod + def reset_fedcm_cooldown(self): + """Set the FedCM cooldown""" + pass + + class PrintProtocolPart(ProtocolPart): """Protocol part for rendering to a PDF.""" __metaclass__ = ABCMeta diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py index 0706a2b5c86..5b26557aa17 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py @@ -1,7 +1,5 @@ # mypy: allow-untyped-defs - import importlib -import imp from .browsers import product_list @@ -10,12 +8,7 @@ def product_module(config, product): if product not in product_list: raise ValueError("Unknown product %s" % product) - path = config.get("products", {}).get(product, None) - if path: - module = imp.load_source('wptrunner.browsers.' + product, path) - else: - module = importlib.import_module("wptrunner.browsers." + product) - + module = importlib.import_module("wptrunner.browsers." + product) if not hasattr(module, "__wptrunner__"): raise ValueError("Product module does not define __wptrunner__ variable") diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js index 716da040bbc..b5cc9cdbbbf 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js @@ -268,4 +268,32 @@ window.test_driver_internal.set_spc_transaction_mode = function(mode, context = null) { return create_action("set_spc_transaction_mode", {mode, context}); }; + + window.test_driver_internal.cancel_fedcm_dialog = function(context = null) { + return create_action("cancel_fedcm_dialog", {context}); + }; + + window.test_driver_internal.select_fedcm_account = function(account_index, context = null) { + return create_action("select_fedcm_account", {account_index, context}); + }; + + window.test_driver_internal.get_fedcm_account_list = function(context = null) { + return create_action("get_fedcm_account_list", {context}); + }; + + window.test_driver_internal.get_fedcm_dialog_title = function(context = null) { + return create_action("get_fedcm_dialog_title", {context}); + }; + + window.test_driver_internal.get_fedcm_dialog_type = function(context = null) { + return create_action("get_fedcm_dialog_type", {context}); + }; + + window.test_driver_internal.set_fedcm_delay_enabled = function(enabled, context = null) { + return create_action("set_fedcm_delay_enabled", {enabled, context}); + }; + + window.test_driver_internal.reset_fedcm_cooldown = function(context = null) { + return create_action("reset_fedcm_cooldown", {context}); + }; })(); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py index 30b51366c26..b1346d51df1 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py @@ -1,9 +1,11 @@ # mypy: allow-untyped-defs import threading +import time import traceback from queue import Empty from collections import namedtuple +from typing import Optional from mozlog import structuredlog, capture @@ -962,10 +964,19 @@ class ManagerGroup: self.pool.add(manager) self.wait() - def wait(self): - """Wait for all the managers in the group to finish""" + def wait(self, timeout: Optional[float] = None) -> None: + """Wait for all the managers in the group to finish. + + Arguments: + timeout: Overall timeout (in seconds) for all threads to join. The + default value indicates an indefinite timeout. + """ + deadline = None if timeout is None else time.time() + timeout for manager in self.pool: - manager.join() + manager_timeout = None + if deadline is not None: + manager_timeout = max(0, deadline - time.time()) + manager.join(manager_timeout) def stop(self): """Set the stop flag so that all managers in the group stop as soon 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 1c5895eec6e..1e3ae7a0615 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py @@ -514,11 +514,7 @@ def exe_path(name): if name is None: return - path = which(name) - if path and os.access(path, os.X_OK): - return path - else: - return None + return which(name) def check_paths(kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py index 987cf058cca..687a9d46c8e 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py @@ -267,8 +267,11 @@ def run_test_iteration(test_status, test_loader, test_source_kwargs, test_source handle_interrupt_signals() manager_group.run(tests_to_run) except KeyboardInterrupt: - logger.critical("Main thread got signal") + logger.critical( + "Main thread got signal; " + "waiting for TestRunnerManager threads to exit.") manager_group.stop() + manager_group.wait(timeout=10) raise test_status.total_tests += manager_group.test_count() @@ -277,11 +280,10 @@ def run_test_iteration(test_status, test_loader, test_source_kwargs, test_source test_status.unexpected += len(unexpected_tests) test_status.unexpected_pass += len(unexpected_pass_tests) - logger.suite_end() - return True + def handle_interrupt_signals(): def termination_handler(_signum, _unused_frame): raise KeyboardInterrupt() diff --git a/tests/wpt/web-platform-tests/url/resources/urltestdata.json b/tests/wpt/web-platform-tests/url/resources/urltestdata.json index 58f6b87a862..1aa42a51455 100644 --- a/tests/wpt/web-platform-tests/url/resources/urltestdata.json +++ b/tests/wpt/web-platform-tests/url/resources/urltestdata.json @@ -7756,6 +7756,21 @@ "hash": "" }, { + "input": "blob:http://example.org:88/", + "base": null, + "href": "blob:http://example.org:88/", + "origin": "http://example.org:88", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "http://example.org:88/", + "search": "", + "hash": "" + }, + { "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf", "base": null, "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf", @@ -7785,6 +7800,113 @@ "search": "", "hash": "" }, + "blob: in blob:", + { + "input": "blob:blob:", + "base": null, + "href": "blob:blob:", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blob:", + "search": "", + "hash": "" + }, + { + "input": "blob:blob:https://example.org/", + "base": null, + "href": "blob:blob:https://example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blob:https://example.org/", + "search": "", + "hash": "" + }, + "Non-http(s): in blob:", + { + "input": "blob:about:blank", + "base": null, + "href": "blob:about:blank", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "about:blank", + "search": "", + "hash": "" + }, + { + "input": "blob:file://host/path", + "base": null, + "href": "blob:file://host/path", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "file://host/path", + "search": "", + "hash": "" + }, + { + "input": "blob:ftp://host/path", + "base": null, + "href": "blob:ftp://host/path", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "ftp://host/path", + "search": "", + "hash": "" + }, + { + "input": "blob:ws://example.org/", + "base": null, + "href": "blob:ws://example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "ws://example.org/", + "search": "", + "hash": "" + }, + { + "input": "blob:wss://example.org/", + "base": null, + "href": "blob:wss://example.org/", + "origin": "null", + "protocol": "blob:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "wss://example.org/", + "search": "", + "hash": "" + }, "Invalid IPv4 radix digits", { "input": "http://0x7f.0.0.0x7g", diff --git a/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html b/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html index 5242a02deec..eb6e89b29ae 100644 --- a/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html +++ b/tests/wpt/web-platform-tests/wai-aria/role/fallback-roles.html @@ -13,8 +13,8 @@ <p>Verifies Fallback Roles from <a href="https://w3c.github.io/aria/#document-handling_author-errors_roles">9.1 Roles - handling author errors</a></p> - <navigation role="region group" data-testname="fallback role w/ region with no label" data-expectedrole="group" class="ex">x</nav> - <navigation role="region group" data-testname="fallback role w/ region with label" aria-label="x" data-expectedrole="region" class="ex">x</nav> + <nav role="region group" data-testname="fallback role w/ region with no label" data-expectedrole="group" class="ex">x</nav> + <nav role="region group" data-testname="fallback role w/ region with label" aria-label="x" data-expectedrole="region" class="ex">x</nav> <!-- todo: additional fallback roles: diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js index b41ca90eef4..bb75ab5f7ad 100644 --- a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js +++ b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-list.js @@ -747,7 +747,7 @@ const gCSSProperties2 = { types: [ 'color' ] }, 'line-height': { - // https://w3c.github.io/csswg-drafts/css-inline/#line-height-property + // https://drafts.csswg.org/css-inline/#line-height-property types: [ { type: 'discrete', options: [ [ 'normal', '10px' ], [ 'normal', '10', 'normal', '100px' ] ] } @@ -1172,6 +1172,18 @@ const gCSSProperties2 = { { type: 'discrete', options: [ [ 'auto', 'smooth' ] ] } ] }, + 'scrollbar-gutter': { + // https://drafts.csswg.org/css-overflow/#propdef-scrollbar-gutter + types: [ + { type: 'discrete', options: [ [ 'auto', 'stable' ], [ 'auto', 'stable both-edges' ], [ 'stable', 'stable both-edges' ] ] } + ] + }, + 'scrollbar-width': { + // https://drafts.csswg.org/css-scrollbars/#propdef-scrollbar-width + types: [ + { type: 'discrete', options: [ [ 'auto', 'thin' ], [ 'auto', 'none' ], [ 'thin', 'none' ] ] } + ] + }, 'shape-outside': { // http://dev.w3.org/csswg/css-shapes/#propdef-shape-outside types: [ @@ -1263,6 +1275,12 @@ const gCSSProperties2 = { { type: 'discrete', options: [ [ 'middle', 'end' ] ] } ] }, + 'text-autospace': { + // https://drafts.csswg.org/css-text-4/#text-spacing-property + types: [ + { type: 'discrete', options: [ [ 'auto', 'no-autospace' ] ] } + ] + }, 'text-decoration-color': { // https://drafts.csswg.org/css-text-decor-3/#propdef-text-decoration-color types: [ 'color' ] @@ -1327,6 +1345,12 @@ const gCSSProperties2 = { return element; } }, + 'text-spacing-trim': { + // https://svgwg.org/svg2-draft/painting.html#TextRenderingProperty + types: [ + { type: 'discrete', options: [ [ 'auto', 'space-all' ] ] } + ] + }, 'text-transform': { // https://drafts.csswg.org/css-text-3/#propdef-text-transform types: [ @@ -1411,6 +1435,12 @@ const gCSSProperties2 = { { type: 'discrete', options: [ [ 'pre', 'nowrap' ] ] } ] }, + 'white-space-collapse': { + // https://drafts.csswg.org/css-text-4/#propdef-white-space-collapse + types: [ + { type: 'discrete', options: [ [ 'collapse', 'preserve' ] ] } + ] + }, 'width': { // https://drafts.csswg.org/css21/visudet.html#propdef-width types: [ diff --git a/tests/wpt/web-platform-tests/web-animations/testcommon.js b/tests/wpt/web-platform-tests/web-animations/testcommon.js index 0b318714a51..8597ca28df9 100644 --- a/tests/wpt/web-platform-tests/web-animations/testcommon.js +++ b/tests/wpt/web-platform-tests/web-animations/testcommon.js @@ -164,6 +164,14 @@ function waitForAnimationFramesWithDelay(minDelay) { }); } +function runAndWaitForFrameUpdate(callback) { + return new Promise(resolve => { + window.requestAnimationFrame(() => { + callback(); + window.requestAnimationFrame(resolve); + }); + }); +} // Waits for a requestAnimationFrame callback in the next refresh driver tick. function waitForNextFrame() { @@ -321,3 +329,4 @@ async function waitForCompositorReady(target) { document.body.animate({ opacity: [ 1, 1 ] }, {duration: 1 }); return animation.finished; } + diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/coep.https.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/coep.https.tentative.html index 4029fc6f815..5e48cb73524 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/coep.https.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/coep.https.tentative.html @@ -32,10 +32,7 @@ "resources": [ "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/no-corp.js", "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-same-origin.js", - "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-cross-origin.js", - "uuid-in-package:5eafff38-e0a0-4661-bde0-434255aa9d93", - "uuid-in-package:7e13b47a-8b91-4a0e-997c-993a5e2f3a34", - "uuid-in-package:86d5b696-8867-4454-8b07-51239a0817f7" + "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-cross-origin.js" ] } </script> @@ -64,11 +61,6 @@ const prefix = "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/"; - const no_corp_url = "uuid-in-package:5eafff38-e0a0-4661-bde0-434255aa9d93"; - const corp_same_origin_url = - "uuid-in-package:7e13b47a-8b91-4a0e-997c-993a5e2f3a34"; - const corp_cross_origin_url = - "uuid-in-package:86d5b696-8867-4454-8b07-51239a0817f7"; promise_test(async () => { const report = await expectCOEPReport(async () => { @@ -88,40 +80,5 @@ await addScriptAndWaitForExecution(prefix + "corp-cross-origin.js"); }, "Cross-origin subresource with Cross-Origin-Resource-Policy: cross-origin should be loaded."); - promise_test(async () => { - const report = await expectCOEPReport(async () => { - const iframe = document.createElement("iframe"); - iframe.src = no_corp_url; - document.body.appendChild(iframe); - }); - - assert_equals(report.body.blockedURL, no_corp_url); - assert_equals(report.body.type, "corp"); - assert_equals(report.body.disposition, "enforce"); - assert_equals(report.body.destination, "iframe"); - }, "uuid-in-package iframe without Cross-Origin-Resource-Policy: header should be blocked and generate a report."); - - promise_test(async () => { - const report = await expectCOEPReport(async () => { - const iframe = document.createElement("iframe"); - iframe.src = corp_same_origin_url; - document.body.appendChild(iframe); - }); - - assert_equals(report.body.blockedURL, corp_same_origin_url); - assert_equals(report.body.type, "corp"); - assert_equals(report.body.disposition, "enforce"); - assert_equals(report.body.destination, "iframe"); - }, "uuid-in-package iframe with Cross-Origin-Resource-Policy: same-origin should be blocked and generate a report."); - - promise_test(async () => { - const iframe = document.createElement("iframe"); - iframe.src = corp_cross_origin_url; - await addElementAndWaitForLoad(iframe); - assert_equals( - await evalInIframe(iframe, "location.href"), - corp_cross_origin_url - ); - }, "uuid-in-package iframe with Cross-Origin-Resource-Policy: cross-origin should not be blocked."); </script> </body> diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/corp.https.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/corp.https.tentative.html index ce18544b0bd..3c46de6c768 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/corp.https.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/corp.https.tentative.html @@ -32,10 +32,7 @@ "resources": [ "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/no-corp.js", "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-same-origin.js", - "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-cross-origin.js", - "uuid-in-package:5eafff38-e0a0-4661-bde0-434255aa9d93", - "uuid-in-package:7e13b47a-8b91-4a0e-997c-993a5e2f3a34", - "uuid-in-package:86d5b696-8867-4454-8b07-51239a0817f7" + "https://www1.web-platform.test:8444/web-bundle/resources/wbn/cors/corp-cross-origin.js" ] } </script> @@ -52,22 +49,5 @@ await addScriptAndWaitForExecution(prefix + "corp-cross-origin.js"); }, "Subresource loading from WebBundles should respect Cross-Origin-Resource-Policy header."); - promise_test(async () => { - const no_corp_url = "uuid-in-package:5eafff38-e0a0-4661-bde0-434255aa9d93"; - const corp_same_origin_url = - "uuid-in-package:7e13b47a-8b91-4a0e-997c-993a5e2f3a34"; - const corp_cross_origin_url = - "uuid-in-package:86d5b696-8867-4454-8b07-51239a0817f7"; - await iframeLocationTest(no_corp_url); - await iframeLocationTest(corp_same_origin_url); - await iframeLocationTest(corp_cross_origin_url); - }, "uuid-in-package iframes should not be blocked regardless of the Cross-Origin-Resource-Policy header, if Cross-Origin-Embedder-Policy is not set."); - - async function iframeLocationTest(url) { - const iframe = document.createElement("iframe"); - iframe.src = url; - await addElementAndWaitForLoad(iframe); - assert_equals(await evalInIframe(iframe, "location.href"), url); - } </script> </body> diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-allowed.https.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-allowed.https.tentative.html index 55498eaa4e5..890a5ba5bc9 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-allowed.https.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-allowed.https.tentative.html @@ -13,9 +13,7 @@ https://web-platform.test:8444/resources/testharnessreport.js 'unsafe-inline'; img-src - https://web-platform.test:8444/web-bundle/resources/wbn/pass.png; - frame-src - https://web-platform.test:8444/web-bundle/resources/wbn/uuid-in-package.wbn" + https://web-platform.test:8444/web-bundle/resources/wbn/pass.png" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -29,8 +27,7 @@ <script type="webbundle"> { "source": "../resources/wbn/uuid-in-package.wbn", - "resources": ["uuid-in-package:020111b3-437a-4c5c-ae07-adb6bbffb720", - "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae" + "resources": ["uuid-in-package:020111b3-437a-4c5c-ae07-adb6bbffb720" ] } </script> @@ -59,31 +56,5 @@ }, "URL matching of script-src CSP should be done based on the bundle URL " + "when the subresource URL is uuid-in-package: URL."); - promise_test(async () => { - const frame_url = "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae"; - const iframe = document.createElement("iframe"); - iframe.src = frame_url; - const load_promise = new Promise((resolve) => { - iframe.addEventListener("load", resolve); - }); - document.body.appendChild(iframe); - await load_promise; - assert_equals(await evalInIframe(iframe, "location.href"), frame_url); - }, "URL matching of frame-src CSP should be done based on the bundle URL " + - "when the frame URL is uuid-in-package: URL."); - - async function evalInIframe(iframe, code) { - const message_promise = new Promise((resolve) => { - window.addEventListener( - "message", - (e) => { - resolve(e.data); - }, - { once: true } - ); - }); - iframe.contentWindow.postMessage(code, "*"); - return message_promise; - } </script> </body> diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-blocked.https.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-blocked.https.tentative.html index 6700533b58c..6e5e82d5399 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-blocked.https.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/csp-blocked.https.tentative.html @@ -14,8 +14,6 @@ 'unsafe-inline'; img-src https://web-platform.test:8444/web-bundle/resources/wbn/subresource.wbn; - frame-src - urn:; report-to csp-group" /> @@ -31,8 +29,7 @@ <script type="webbundle"> { "source": "../resources/wbn/uuid-in-package.wbn", - "resources": ["uuid-in-package:020111b3-437a-4c5c-ae07-adb6bbffb720", - "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae"] + "resources": ["uuid-in-package:020111b3-437a-4c5c-ae07-adb6bbffb720"] } </script> <script> @@ -108,33 +105,6 @@ assert_equals(e.violatedDirective, "script-src-elem"); }, "URL matching of script-src CSP should be done based on the bundle URL " + `when the subresource URL is ${params.prefix} URL.`); - - promise_test(async () => { - const urn_uuid = params.prefix + "429fcc4e-0696-4bad-b099-ee9175f023ae"; - const p = expect_violation(); - const iframe = document.createElement("iframe"); - iframe.src = urn_uuid; - const load_promise = new Promise((resolve) => { - iframe.addEventListener("load", resolve); - }); - document.body.appendChild(iframe); - const e = await p; - // Currently Chromium is reporting the bundle URL. - // TODO(crbug.com/1208659): Consider deeper integration with CSP for - // providing the both URLs. - assert_equals(e.blockedURI, params.bundle_url); - assert_equals(e.violatedDirective, "frame-src"); - - // Make sure that the blocked iframe load is finished. - await load_promise; - - // The blocked iframe is cross-origin. So accessing - // iframe.contentWindow.location should throw a SecurityError. - assert_throws_dom("SecurityError", () => { - iframe.contentWindow.location.href; - }); - }, "URL matching of frame-src CSP should be done based on the bundle URL " + - `when the frame URL is ${params.prefix} URL.`); } promise_test(async () => { @@ -144,19 +114,16 @@ const reports = await (await fetch(retrieve_report_url)).json(); sortReportsByEffectiveDirective(reports); - assert_equals(reports.length, 3, "Report count."); - - assert_equals(reports[0].body.blockedURL, uuid_bundle_url); - assert_equals(reports[0].body.effectiveDirective, "frame-src"); + assert_equals(reports.length, 2, "Report count."); assert_equals( - reports[1].body.blockedURL, + reports[0].body.blockedURL, "https://web-platform.test:8444/web-bundle/resources/wbn/fail.png" ); - assert_equals(reports[1].body.effectiveDirective, "img-src"); + assert_equals(reports[0].body.effectiveDirective, "img-src"); - assert_equals(reports[2].body.blockedURL, uuid_bundle_url); - assert_equals(reports[2].body.effectiveDirective, "script-src-elem"); + assert_equals(reports[1].body.blockedURL, uuid_bundle_url); + assert_equals(reports[1].body.effectiveDirective, "script-src-elem"); }, "Check the CSP violation reports."); </script> </body> diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/resource-timing.https.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/resource-timing.https.tentative.html index a2fe38de0f6..c486cf1711f 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/resource-timing.https.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/resource-timing.https.tentative.html @@ -11,14 +11,12 @@ }); promise_test(async (t) => { - const frame_id = "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae"; const script_id = "uuid-in-package:020111b3-437a-4c5c-ae07-adb6bbffb720"; const element = createWebBundleElement( "../resources/wbn/uuid-in-package.wbn", - /*resources=*/ [frame_id, script_id] + /*resources=*/ [script_id] ); document.body.appendChild(element); - let iframe_entries = 0; let script_entries = 0; // Declare the report_result function as outputting into stderr // because it is used in the WebBundle script to report the script load. @@ -33,19 +31,15 @@ continue; } - if (entries[i].name === frame_id) ++iframe_entries; if (entries[i].name === script_id) ++script_entries; } - if (iframe_entries == 1 && script_entries == 1) { + if (script_entries == 1) { resolve(); } }) ).observe({ entryTypes: ["resource"] }); }); - // Add iframe and the script so we get the ResourceTiming - const iframe = document.createElement("iframe"); - iframe.src = frame_id; - document.body.appendChild(iframe); + // Add the script so we get the ResourceTiming const script = document.createElement("script"); script.src = script_id; document.body.appendChild(script); diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/service-worker-controlled.https.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/service-worker-controlled.https.tentative.html index d5c2a068371..b2e9abe5be3 100644 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/service-worker-controlled.https.tentative.html +++ b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/service-worker-controlled.https.tentative.html @@ -73,12 +73,11 @@ assert_array_equals(await getRequestedUrls(worker), [iframe_url]); // Add a web bundle element in the service worker controlled iframe. - const frame_id = "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae"; const script_id = "uuid-in-package:020111b3-437a-4c5c-ae07-adb6bbffb720"; const element = createWebBundleElement( "../../resources/wbn/uuid-in-package.wbn", - /*resources=*/ [frame_id, script_id] + /*resources=*/ [script_id] ); const element_load_promise = new Promise((resolve) => { @@ -105,34 +104,6 @@ // service worker. assert_array_equals(await getRequestedUrls(worker), []); - // Add a uuid-in-package URL iframe element in the service worker controlled - // iframe. - const inner_iframe = iframe.contentDocument.createElement("iframe"); - inner_iframe.src = frame_id; - const load_promise = new Promise((resolve) => { - inner_iframe.addEventListener("load", () => { - resolve(); - }); - }); - iframe.contentDocument.body.appendChild(inner_iframe); - await load_promise; - // The urn uuld URL iframe request should not intercepted by the service - // worker. - assert_array_equals(await getRequestedUrls(worker), []); - - // Check if the uuid-in-package URL iframe element is loaded correctly. - const message_promise = new Promise((resolve) => { - window.addEventListener( - "message", - (e) => { - resolve(e.data); - }, - { once: true } - ); - }); - // location.href is evaluated in the uuid-in-package URL iframe element. - inner_iframe.contentWindow.postMessage("location.href", "*"); - assert_equals(await message_promise, frame_id); }, "Both Web Bundle request and Subresource fetch requests inside the Web " + "Bundle should skip the service worker."); </script> </body> diff --git a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/subframe-from-web-bundle.https.tentative.html b/tests/wpt/web-platform-tests/web-bundle/subresource-loading/subframe-from-web-bundle.https.tentative.html deleted file mode 100644 index 9e08ccdd29c..00000000000 --- a/tests/wpt/web-platform-tests/web-bundle/subresource-loading/subframe-from-web-bundle.https.tentative.html +++ /dev/null @@ -1,134 +0,0 @@ -<!DOCTYPE html> -<title>Subframe loading from Web Bundles</title> -<link - rel="help" - href="https://github.com/WICG/webpackage/blob/main/explainers/subresource-loading.md" -/> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/test-helpers.js"></script> -<body> - <script> - setup(() => { - assert_true(HTMLScriptElement.supports("webbundle")); - }); - - promise_test(async (t) => { - const bundle_url = "../resources/wbn/uuid-in-package.wbn"; - const frame_url = "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae"; - const iframe = await createWebBundleElementAndIframe( - t, - bundle_url, - frame_url - ); - // The iframe is cross-origin. So accessing iframe.contentWindow.location - // should throw a SecurityError. - assert_throws_dom("SecurityError", () => { - iframe.contentWindow.location.href; - }); - }, "The uuid-in-package: URL iframe must be cross-origin."); - - uuid_iframe_test( - "location.href", - "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae", - "location.href in opaque-origin iframe." - ); - - uuid_iframe_test( - "(" + - (() => { - try { - let result = window.localStorage; - return "no error"; - } catch (e) { - return e.name; - } - }).toString() + - ")()", - "SecurityError", - "Accesing window.localStorage should throw a SecurityError." - ); - - uuid_iframe_test( - "(" + - (() => { - try { - let result = window.sessionStorage; - return "no error"; - } catch (e) { - return e.name; - } - }).toString() + - ")()", - "SecurityError", - "Accesing window.sessionStorage should throw a SecurityError." - ); - - uuid_iframe_test( - "(" + - (() => { - try { - let result = document.cookie; - return "no error"; - } catch (e) { - return e.name; - } - }).toString() + - ")()", - "SecurityError", - "Accesing document.cookie should throw a SecurityError." - ); - - uuid_iframe_test( - "(" + - (() => { - try { - let request = window.indexedDB.open("db"); - return "no error"; - } catch (e) { - return e.name; - } - }).toString() + - ")()", - "SecurityError", - "Opening an indexedDB should throw a SecurityError." - ); - - uuid_iframe_test( - "window.caches === undefined", - true, - "window.caches should be undefined." - ); - - function uuid_iframe_test(code, expected, name) { - promise_test(async (t) => { - const bundle_url = "../resources/wbn/uuid-in-package.wbn"; - const frame_url = - "uuid-in-package:429fcc4e-0696-4bad-b099-ee9175f023ae"; - const iframe = await createWebBundleElementAndIframe( - t, - bundle_url, - frame_url - ); - assert_equals(await evalInIframe(iframe, code), expected); - }, name + "uuid-in-package"); - } - - async function createWebBundleElementAndIframe(t, bundle_url, frame_url) { - const element = createWebBundleElement(bundle_url, [frame_url]); - document.body.appendChild(element); - const iframe = document.createElement("iframe"); - t.add_cleanup(() => { - document.body.removeChild(element); - document.body.removeChild(iframe); - }); - iframe.src = frame_url; - const load_promise = new Promise((resolve) => { - iframe.addEventListener("load", resolve); - }); - document.body.appendChild(iframe); - await load_promise; - return iframe; - } - </script> -</body> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html index 300b43622bd..e239a5e86f9 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-1-chan.html @@ -20,7 +20,7 @@ const absoluteThreshold = Math.pow(2, -21); // Fairly arbitrary sample rate, except that we want the rate to be a - // power of two so that 1/sampleRate is exactly respresentable as a + // power of two so that 1/sampleRate is exactly representable as a // single-precision float. let sampleRate = 8192; diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-2-chan.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-2-chan.html index 9baf5f9f8d2..a73eb3f8abb 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-2-chan.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-2-chan.html @@ -20,7 +20,7 @@ const absoluteThreshold = Math.pow(2, -21); // Fairly arbitrary sample rate, except that we want the rate to be a - // power of two so that 1/sampleRate is exactly respresentable as a + // power of two so that 1/sampleRate is exactly representable as a // single-precision float. let sampleRate = 8192; diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-4-chan.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-4-chan.html index cf3986e8d04..f188d87b71f 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-4-chan.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-convolvernode-interface/convolver-response-4-chan.html @@ -20,7 +20,7 @@ const absoluteThreshold = 3 * Math.pow(2, -22); // Fairly arbitrary sample rate, except that we want the rate to be a - // power of two so that 1/sampleRate is exactly respresentable as a + // power of two so that 1/sampleRate is exactly representable as a // single-precision float. let sampleRate = 8192; diff --git a/tests/wpt/web-platform-tests/webdriver/META.yml b/tests/wpt/web-platform-tests/webdriver/META.yml index 8475a173abd..806ba3dec3c 100644 --- a/tests/wpt/web-platform-tests/webdriver/META.yml +++ b/tests/wpt/web-platform-tests/webdriver/META.yml @@ -3,6 +3,7 @@ suggested_reviewers: - AutomatedTester - bwalderman - jgraham + - jrandolf - juliandescottes - sadym-chromium - shs96c diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/invalid.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/invalid.py index b07802292c9..2fb45cd8321 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/invalid.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/invalid.py @@ -4,9 +4,11 @@ from webdriver.bidi.modules.input import Actions, get_element_origin from webdriver.bidi.error import ( InvalidArgumentException, MoveTargetOutOfBoundsException, + NoSuchElementException, NoSuchFrameException, NoSuchNodeException, ) +from webdriver.bidi.modules.script import ContextTarget pytestmark = pytest.mark.asyncio @@ -160,6 +162,51 @@ async def test_params_actions_origin_invalid_value_serialized_element( actions=actions, context=top_context["context"] ) +@pytest.mark.parametrize( + "expression", + [ + "document.querySelector('input#button').attributes[0]", + "document.querySelector('#with-text-node').childNodes[0]", + """document.createProcessingInstruction("xml-stylesheet", "href='foo.css'")""", + "document.querySelector('#with-comment').childNodes[0]", + "document", + "document.doctype", + "document.createDocumentFragment()", + "document.querySelector('#custom-element').shadowRoot", + ], + ids=[ + "attribute", + "text node", + "processing instruction", + "comment", + "document", + "doctype", + "document fragment", + "shadow root", + ] +) +async def test_params_actions_origin_no_such_element( + bidi_session, top_context, get_test_page, expression +): + await bidi_session.browsing_context.navigate( + context=top_context["context"], + url=get_test_page(), + wait="complete", + ) + + node = await bidi_session.script.evaluate( + expression=expression, + target=ContextTarget(top_context["context"]), + await_promise=False, + ) + + actions = Actions() + actions.add_pointer().pointer_move(x=0, y=0, origin=get_element_origin(node)) + with pytest.raises(NoSuchElementException): + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + async def test_params_actions_origin_no_such_node(bidi_session, top_context): actions = Actions() diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key.py index 0521e9ccd42..9189bc96cc4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key.py @@ -1,14 +1,9 @@ -import copy import pytest -from collections import defaultdict - from webdriver.bidi.modules.input import Actions -from webdriver.bidi.modules.script import ContextTarget -from tests.support.helpers import filter_dict, filter_supported_key_events -from tests.support.keys import ALL_EVENTS, Keys, ALTERNATIVE_KEY_NAMES -from .. import get_events, get_keys_value +from tests.support.keys import Keys +from .. import get_keys_value pytestmark = pytest.mark.asyncio @@ -50,263 +45,6 @@ async def test_key_codepoint( assert keys_value == value -@pytest.mark.parametrize( - "key,event", - [ - (Keys.ESCAPE, "ESCAPE"), - (Keys.RIGHT, "RIGHT"), - ], -) -async def test_key_non_printable_key( - bidi_session, top_context, setup_key_test, key, event -): - code = ALL_EVENTS[event]["code"] - value = ALL_EVENTS[event]["key"] - - actions = Actions() - (actions.add_key().key_down(key).key_up(key)) - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - all_events = await get_events(bidi_session, top_context["context"]) - - expected = [ - {"code": code, "key": value, "type": "keydown"}, - {"code": code, "key": value, "type": "keypress"}, - {"code": code, "key": value, "type": "keyup"}, - ] - - # Make a copy for alternate key property values - # Note: only keydown and keyup are affected by alternate key names - alt_expected = copy.deepcopy(expected) - if event in ALTERNATIVE_KEY_NAMES: - alt_expected[0]["key"] = ALTERNATIVE_KEY_NAMES[event] - alt_expected[2]["key"] = ALTERNATIVE_KEY_NAMES[event] - - (_, expected) = filter_supported_key_events(all_events, expected) - (events, alt_expected) = filter_supported_key_events(all_events, alt_expected) - if len(events) == 2: - # most browsers don't send a keypress for non-printable keys - assert events == [expected[0], expected[2]] or events == [ - alt_expected[0], - alt_expected[2], - ] - else: - assert events == expected or events == alt_expected - - keys_value = await get_keys_value(bidi_session, top_context["context"]) - assert len(keys_value) == 0 - - -@pytest.mark.parametrize( - "key, event", - [ - (Keys.ALT, "ALT"), - (Keys.CONTROL, "CONTROL"), - (Keys.META, "META"), - (Keys.SHIFT, "SHIFT"), - (Keys.R_ALT, "R_ALT"), - (Keys.R_CONTROL, "R_CONTROL"), - (Keys.R_META, "R_META"), - (Keys.R_SHIFT, "R_SHIFT"), - ], -) -async def test_key_modifier_key( - bidi_session, top_context, setup_key_test, key, event -): - code = ALL_EVENTS[event]["code"] - value = ALL_EVENTS[event]["key"] - - actions = Actions() - (actions.add_key().key_down(key).key_up(key)) - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - all_events = await get_events(bidi_session, top_context["context"]) - - expected = [ - {"code": code, "key": value, "type": "keydown"}, - {"code": code, "key": value, "type": "keyup"}, - ] - - (events, expected) = filter_supported_key_events(all_events, expected) - assert events == expected - - keys_value = await get_keys_value(bidi_session, top_context["context"]) - assert len(keys_value) == 0 - - -@pytest.mark.parametrize( - "value,code", - [ - ("a", "KeyA"), - ("a", "KeyA"), - ('"', "Quote"), - (",", "Comma"), - ("\u00E0", ""), - ("\u0416", ""), - ("@", "Digit2"), - ("\u2603", ""), - ("\uF6C2", ""), # PUA - ], -) -async def test_key_printable_key( - bidi_session, - top_context, - setup_key_test, - value, - code, -): - actions = Actions() - (actions.add_key().key_down(value).key_up(value)) - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - all_events = await get_events(bidi_session, top_context["context"]) - - expected = [ - {"code": code, "key": value, "type": "keydown"}, - {"code": code, "key": value, "type": "keypress"}, - {"code": code, "key": value, "type": "keyup"}, - ] - - (events, expected) = filter_supported_key_events(all_events, expected) - assert events == expected - - keys_value = await get_keys_value(bidi_session, top_context["context"]) - assert keys_value == value - - -@pytest.mark.parametrize("use_keyup", [True, False]) -async def test_key_printable_sequence( - bidi_session, top_context, setup_key_test, use_keyup -): - actions = Actions() - key_source = actions.add_key() - if use_keyup: - actions.add_key().send_keys("ab") - else: - actions.add_key().key_down("a").key_down("b") - - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - all_events = await get_events(bidi_session, top_context["context"]) - - expected = [ - {"code": "KeyA", "key": "a", "type": "keydown"}, - {"code": "KeyA", "key": "a", "type": "keypress"}, - {"code": "KeyA", "key": "a", "type": "keyup"}, - {"code": "KeyB", "key": "b", "type": "keydown"}, - {"code": "KeyB", "key": "b", "type": "keypress"}, - {"code": "KeyB", "key": "b", "type": "keyup"}, - ] - expected = [e for e in expected if use_keyup or e["type"] is not "keyup"] - - (events, expected) = filter_supported_key_events(all_events, expected) - assert events == expected - - keys_value = await get_keys_value(bidi_session, top_context["context"]) - assert keys_value == "ab" - - -@pytest.mark.parametrize("name,expected", ALL_EVENTS.items()) -async def test_key_special_key_sends_keydown( - bidi_session, - top_context, - setup_key_test, - name, - expected, -): - if name.startswith("F"): - # Prevent default behavior for F1, etc., but only after keydown - # bubbles up to body. (Otherwise activated browser menus/functions - # may interfere with subsequent tests.) - await bidi_session.script.evaluate( - expression=""" - document.body.addEventListener("keydown", - function(e) { e.preventDefault() }); - """, - target=ContextTarget(top_context["context"]), - await_promise=False, - ) - - actions = Actions() - (actions.add_key().key_down(getattr(Keys, name))) - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - # only interested in keydown - all_events = await get_events(bidi_session, top_context["context"]) - first_event = all_events[0] - # make a copy so we can throw out irrelevant keys and compare to events - expected = dict(expected) - - del expected["value"] - - # make another copy for alternative key names - alt_expected = copy.deepcopy(expected) - if name in ALTERNATIVE_KEY_NAMES: - alt_expected["key"] = ALTERNATIVE_KEY_NAMES[name] - - # check and remove keys that aren't in expected - assert first_event["type"] == "keydown" - assert first_event["repeat"] is False - first_event = filter_dict(first_event, expected) - if first_event["code"] is None: - del first_event["code"] - del expected["code"] - del alt_expected["code"] - assert first_event == expected or first_event == alt_expected - # only printable characters should be recorded in input field - keys_value = await get_keys_value(bidi_session, top_context["context"]) - if len(expected["key"]) == 1: - assert keys_value == expected["key"] - else: - assert len(keys_value) == 0 - - -async def test_key_space(bidi_session, top_context, setup_key_test): - actions = Actions() - ( - actions.add_key() - .key_down(Keys.SPACE) - .key_up(Keys.SPACE) - .key_down(" ") - .key_up(" ") - ) - - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - all_events = await get_events(bidi_session, top_context["context"]) - - by_type = defaultdict(list) - for event in all_events: - by_type[event["type"]].append(event) - - for event_type in by_type: - events = by_type[event_type] - assert len(events) == 2 - assert events[0] == events[1] - - -async def test_keyup_only_sends_no_events(bidi_session, top_context, setup_key_test): - actions = Actions() - actions.add_key().key_up("a") - await bidi_session.input.perform_actions( - actions=actions, context=top_context["context"] - ) - - events = await get_events(bidi_session, top_context["context"]) - assert len(events) == 0 - - keys_value = await get_keys_value(bidi_session, top_context["context"]) - assert len(keys_value) == 0 - - async def test_null_response_value(bidi_session, top_context): actions = Actions() actions.add_key().key_down("a").key_up("a") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key_events.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key_events.py new file mode 100644 index 00000000000..8e1075ddc13 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/perform_actions/key_events.py @@ -0,0 +1,270 @@ +import copy +import pytest + +from collections import defaultdict + +from webdriver.bidi.modules.input import Actions +from webdriver.bidi.modules.script import ContextTarget + +from tests.support.helpers import filter_dict, filter_supported_key_events +from tests.support.keys import ALL_EVENTS, Keys, ALTERNATIVE_KEY_NAMES +from .. import get_events, get_keys_value + +pytestmark = pytest.mark.asyncio + + +@pytest.mark.parametrize( + "key,event", + [ + (Keys.ESCAPE, "ESCAPE"), + (Keys.RIGHT, "RIGHT"), + ], +) +async def test_non_printable_key_sends_events( + bidi_session, top_context, setup_key_test, key, event +): + code = ALL_EVENTS[event]["code"] + value = ALL_EVENTS[event]["key"] + + actions = Actions() + (actions.add_key().key_down(key).key_up(key)) + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + all_events = await get_events(bidi_session, top_context["context"]) + + expected = [ + {"code": code, "key": value, "type": "keydown"}, + {"code": code, "key": value, "type": "keypress"}, + {"code": code, "key": value, "type": "keyup"}, + ] + + # Make a copy for alternate key property values + # Note: only keydown and keyup are affected by alternate key names + alt_expected = copy.deepcopy(expected) + if event in ALTERNATIVE_KEY_NAMES: + alt_expected[0]["key"] = ALTERNATIVE_KEY_NAMES[event] + alt_expected[2]["key"] = ALTERNATIVE_KEY_NAMES[event] + + (_, expected) = filter_supported_key_events(all_events, expected) + (events, alt_expected) = filter_supported_key_events(all_events, alt_expected) + if len(events) == 2: + # most browsers don't send a keypress for non-printable keys + assert events == [expected[0], expected[2]] or events == [ + alt_expected[0], + alt_expected[2], + ] + else: + assert events == expected or events == alt_expected + + keys_value = await get_keys_value(bidi_session, top_context["context"]) + assert len(keys_value) == 0 + + +@pytest.mark.parametrize( + "key, event", + [ + (Keys.ALT, "ALT"), + (Keys.CONTROL, "CONTROL"), + (Keys.META, "META"), + (Keys.SHIFT, "SHIFT"), + (Keys.R_ALT, "R_ALT"), + (Keys.R_CONTROL, "R_CONTROL"), + (Keys.R_META, "R_META"), + (Keys.R_SHIFT, "R_SHIFT"), + ], +) +async def test_key_modifier_key( + bidi_session, top_context, setup_key_test, key, event +): + code = ALL_EVENTS[event]["code"] + value = ALL_EVENTS[event]["key"] + + actions = Actions() + (actions.add_key().key_down(key).key_up(key)) + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + all_events = await get_events(bidi_session, top_context["context"]) + + expected = [ + {"code": code, "key": value, "type": "keydown"}, + {"code": code, "key": value, "type": "keyup"}, + ] + + (events, expected) = filter_supported_key_events(all_events, expected) + assert events == expected + + keys_value = await get_keys_value(bidi_session, top_context["context"]) + assert len(keys_value) == 0 + + +@pytest.mark.parametrize( + "value,code", + [ + ("a", "KeyA"), + ("a", "KeyA"), + ('"', "Quote"), + (",", "Comma"), + ("\u00E0", ""), + ("\u0416", ""), + ("@", "Digit2"), + ("\u2603", ""), + ("\uF6C2", ""), # PUA + ], +) +async def test_key_printable_key( + bidi_session, + top_context, + setup_key_test, + value, + code, +): + actions = Actions() + (actions.add_key().key_down(value).key_up(value)) + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + + all_events = await get_events(bidi_session, top_context["context"]) + + expected = [ + {"code": code, "key": value, "type": "keydown"}, + {"code": code, "key": value, "type": "keypress"}, + {"code": code, "key": value, "type": "keyup"}, + ] + + (events, expected) = filter_supported_key_events(all_events, expected) + assert events == expected + + keys_value = await get_keys_value(bidi_session, top_context["context"]) + assert keys_value == value + + +@pytest.mark.parametrize("use_keyup", [True, False]) +async def test_key_printable_sequence( + bidi_session, top_context, setup_key_test, use_keyup +): + actions = Actions() + key_source = actions.add_key() + if use_keyup: + actions.add_key().send_keys("ab") + else: + actions.add_key().key_down("a").key_down("b") + + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + all_events = await get_events(bidi_session, top_context["context"]) + + expected = [ + {"code": "KeyA", "key": "a", "type": "keydown"}, + {"code": "KeyA", "key": "a", "type": "keypress"}, + {"code": "KeyA", "key": "a", "type": "keyup"}, + {"code": "KeyB", "key": "b", "type": "keydown"}, + {"code": "KeyB", "key": "b", "type": "keypress"}, + {"code": "KeyB", "key": "b", "type": "keyup"}, + ] + expected = [e for e in expected if use_keyup or e["type"] is not "keyup"] + + (events, expected) = filter_supported_key_events(all_events, expected) + assert events == expected + + keys_value = await get_keys_value(bidi_session, top_context["context"]) + assert keys_value == "ab" + + +@pytest.mark.parametrize("name,expected", ALL_EVENTS.items()) +async def test_key_special_key_sends_keydown( + bidi_session, + top_context, + setup_key_test, + name, + expected, +): + if name.startswith("F"): + # Prevent default behavior for F1, etc., but only after keydown + # bubbles up to body. (Otherwise activated browser menus/functions + # may interfere with subsequent tests.) + await bidi_session.script.evaluate( + expression=""" + document.body.addEventListener("keydown", + function(e) { e.preventDefault() }); + """, + target=ContextTarget(top_context["context"]), + await_promise=False, + ) + + actions = Actions() + (actions.add_key().key_down(getattr(Keys, name))) + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + + # only interested in keydown + all_events = await get_events(bidi_session, top_context["context"]) + first_event = all_events[0] + # make a copy so we can throw out irrelevant keys and compare to events + expected = dict(expected) + + del expected["value"] + + # make another copy for alternative key names + alt_expected = copy.deepcopy(expected) + if name in ALTERNATIVE_KEY_NAMES: + alt_expected["key"] = ALTERNATIVE_KEY_NAMES[name] + + # check and remove keys that aren't in expected + assert first_event["type"] == "keydown" + assert first_event["repeat"] is False + first_event = filter_dict(first_event, expected) + if first_event["code"] is None: + del first_event["code"] + del expected["code"] + del alt_expected["code"] + assert first_event == expected or first_event == alt_expected + # only printable characters should be recorded in input field + keys_value = await get_keys_value(bidi_session, top_context["context"]) + if len(expected["key"]) == 1: + assert keys_value == expected["key"] + else: + assert len(keys_value) == 0 + + +async def test_key_space(bidi_session, top_context, setup_key_test): + actions = Actions() + ( + actions.add_key() + .key_down(Keys.SPACE) + .key_up(Keys.SPACE) + .key_down(" ") + .key_up(" ") + ) + + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + all_events = await get_events(bidi_session, top_context["context"]) + + by_type = defaultdict(list) + for event in all_events: + by_type[event["type"]].append(event) + + for event_type in by_type: + events = by_type[event_type] + assert len(events) == 2 + assert events[0] == events[1] + + +async def test_keyup_only_sends_no_events(bidi_session, top_context, setup_key_test): + actions = Actions() + actions.add_key().key_up("a") + await bidi_session.input.perform_actions( + actions=actions, context=top_context["context"] + ) + + events = await get_events(bidi_session, top_context["context"]) + assert len(events) == 0 + + keys_value = await get_keys_value(bidi_session, top_context["context"]) + assert len(keys_value) == 0 diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/release_actions/sequence.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/release_actions/sequence.py index 9b4535c1b5f..55bc038a611 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/release_actions/sequence.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/input/release_actions/sequence.py @@ -1,5 +1,5 @@ import pytest -from webdriver.bidi.modules.input import Actions +from webdriver.bidi.modules.input import Actions, get_element_origin from webdriver.bidi.modules.script import ContextTarget from tests.support.helpers import filter_dict, filter_supported_key_events @@ -52,7 +52,7 @@ async def test_release_mouse_sequence_resets_dblclick_state( actions = Actions() actions.add_pointer(pointer_type="mouse").pointer_move( - x=0, y=0, origin=reporter["value"] + x=0, y=0, origin=get_element_origin(reporter) ).pointer_down(button=0).pointer_up(button=0) await bidi_session.input.perform_actions( actions=actions, context=top_context["context"] diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py index ea7472cfd3d..70f4eb2712f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/network/__init__.py @@ -45,7 +45,6 @@ def assert_timing_info(timing_info): "connectStart": any_int, "connectEnd": any_int, "tlsStart": any_int, - "tlsEnd": any_int, "requestStart": any_int, "responseStart": any_int, "responseEnd": any_int, diff --git a/tests/wpt/web-platform-tests/webdriver/tests/accept_alert/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/accept_alert/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/accept_alert/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/accept_alert/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/accept_alert/accept.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/accept_alert/accept.py index b83477e5ca7..b83477e5ca7 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/accept_alert/accept.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/accept_alert/accept.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/add_cookie/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/add_cookie/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/add_cookie/add.py index 3a19432fc6a..3a19432fc6a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/add_cookie/add.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/add_cookie/user_prompts.py index f58aacd02a7..f58aacd02a7 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/add_cookie/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/back/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/back/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/back/back.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/back.py index 62434323e0a..62434323e0a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/back/back.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/back.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/back/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/conftest.py index bd5db0cfeba..bd5db0cfeba 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/back/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/conftest.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/back/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/user_prompts.py index 9d04f0f4ab1..9d04f0f4ab1 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/back/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/back/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/close_window/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/close_window/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/close_window/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/close_window/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/close_window/close.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/close_window/close.py index 7b382fa9bbc..7b382fa9bbc 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/close_window/close.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/close_window/close.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/close_window/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/close_window/user_prompts.py index c0f9cc7610c..c0f9cc7610c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/close_window/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/close_window/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_all_cookies/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_all_cookies/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/delete.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_all_cookies/delete.py index 86d66561b00..86d66561b00 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/delete.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_all_cookies/delete.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_all_cookies/user_prompts.py index dca4f3c8bf6..dca4f3c8bf6 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_all_cookies/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_all_cookies/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_cookie/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_cookie/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_cookie/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_cookie/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_cookie/delete.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_cookie/delete.py index 4b37c0453b9..4b37c0453b9 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_cookie/delete.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_cookie/delete.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_cookie/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_cookie/user_prompts.py index 1ed7db6e8e3..1ed7db6e8e3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_cookie/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_cookie/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_session/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_session/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_session/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_session/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/delete_session/delete.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_session/delete.py index a3032cc1347..a3032cc1347 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/delete_session/delete.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/delete_session/delete.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/dismiss_alert/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/dismiss_alert/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/dismiss_alert/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/dismiss_alert/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/dismiss_alert/dismiss.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/dismiss_alert/dismiss.py index a28dec76875..a28dec76875 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/dismiss_alert/dismiss.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/dismiss_alert/dismiss.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_clear/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_clear/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_clear/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_clear/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_clear/clear.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_clear/clear.py index 9b0d7f2133f..9b0d7f2133f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_clear/clear.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_clear/clear.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_clear/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_clear/user_prompts.py index 7a8564a684a..7a8564a684a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_clear/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_clear/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/bubbling.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/bubbling.py index 7620ec3224f..7620ec3224f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/bubbling.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/bubbling.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/center_point.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/center_point.py index eb5cc19f14f..eb5cc19f14f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/center_point.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/center_point.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/click.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/click.py index 3c3f7d70e6c..3c3f7d70e6c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/click.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/click.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/events.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/events.py index e3d32c1bcb4..30f2dfa0a4a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/events.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/events.py @@ -13,7 +13,9 @@ def element_click(session, element): element_id=element.id)) def test_event_mousemove(session, url): - session.url = url("/webdriver/tests/element_click/support/test_click_wdspec.html") + session.url = url( + "/webdriver/tests/classic/element_click/support/test_click_wdspec.html" + ) element = session.find.css('#outer', all=False) response = element_click(session, element) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/file_upload.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/file_upload.py index 73832d0f85a..73832d0f85a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/file_upload.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/file_upload.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/interactability.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/interactability.py index d55860c8746..d55860c8746 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/interactability.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/interactability.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/navigate.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/navigate.py index 492718292a1..4d1c48235ca 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/navigate.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/navigate.py @@ -15,7 +15,7 @@ def element_click(session, element): def test_numbers_link(session, server_config, inline): - link = "/webdriver/tests/element_click/support/input.html" + link = "/webdriver/tests/classic/element_click/support/input.html" session.url = inline("<a href={url}>123456</a>".format(url=link)) element = session.find.css("a", all=False) response = element_click(session, element) @@ -27,7 +27,7 @@ def test_numbers_link(session, server_config, inline): def test_multi_line_link(session, server_config, inline): - link = "/webdriver/tests/element_click/support/input.html" + link = "/webdriver/tests/classic/element_click/support/input.html" session.url = inline(""" <p style="background-color: yellow; width: 50px;"> <a href={url}>Helloooooooooooooooooooo Worlddddddddddddddd</a> @@ -42,7 +42,7 @@ def test_multi_line_link(session, server_config, inline): def test_link_unload_event(session, server_config, inline): - link = "/webdriver/tests/element_click/support/input.html" + link = "/webdriver/tests/classic/element_click/support/input.html" session.url = inline(""" <body onunload="checkUnload()"> <a href={url}>click here</a> diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/scroll_into_view.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/scroll_into_view.py index c2dc6485286..c2dc6485286 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/scroll_into_view.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/scroll_into_view.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/select.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/select.py index 62d40755b59..62d40755b59 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/select.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/select.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/shadow_dom.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/shadow_dom.py index 18768a60b29..18768a60b29 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/shadow_dom.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/shadow_dom.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/support/input.html b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/support/input.html index e2c6dadd121..e2c6dadd121 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/support/input.html +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/support/input.html diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/support/test_click_wdspec.html b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/support/test_click_wdspec.html index a9451ec82be..a9451ec82be 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/support/test_click_wdspec.html +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/support/test_click_wdspec.html diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_click/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/user_prompts.py index 140aceb3ced..140aceb3ced 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_click/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_click/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/__init__.py index a7facf6fcf7..a7facf6fcf7 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/conftest.py index 17bdd162a77..17bdd162a77 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/conftest.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/content_editable.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/content_editable.py index 9db19d5b8a2..9db19d5b8a2 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/content_editable.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/content_editable.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/events.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/events.py index 4be1432bf3c..4be1432bf3c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/events.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/events.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/file_upload.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/file_upload.py index f62a633c202..f62a633c202 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/file_upload.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/file_upload.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/form_controls.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/form_controls.py index 364d4c28fae..364d4c28fae 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/form_controls.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/form_controls.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/interactability.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/interactability.py index 273843fb7b4..273843fb7b4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/interactability.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/interactability.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/scroll_into_view.py index 7ccaeaf8142..7ccaeaf8142 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/scroll_into_view.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/scroll_into_view.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/send_keys.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/send_keys.py index 281c7ad719d..281c7ad719d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/send_keys.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/send_keys.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/user_prompts.py index c1046840fa4..c1046840fa4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/element_send_keys/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/__init__.py index 9cd37ecdca1..9cd37ecdca1 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/arguments.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/arguments.py index ead6e0c186e..ead6e0c186e 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/arguments.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/arguments.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/collections.py index 5dfbf205947..5dfbf205947 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/collections.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/collections.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/cyclic.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/cyclic.py index ff536f3477c..ff536f3477c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/cyclic.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/cyclic.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/execute_async.py index 42cf4aacee8..42cf4aacee8 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/execute_async.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/node.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/node.py index 53abda4b300..53abda4b300 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/node.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/node.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/objects.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/objects.py index edcf06505aa..edcf06505aa 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/objects.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/objects.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/promise.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/promise.py index d726d0d7128..d726d0d7128 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/promise.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/promise.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/properties.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/properties.py index b9592e7edd4..b9592e7edd4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/properties.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/properties.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/user_prompts.py index e39574fd4ac..e39574fd4ac 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_async_script/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/__init__.py index 1ab36eb0541..1ab36eb0541 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/arguments.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/arguments.py index b8657ce0efa..b8657ce0efa 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/arguments.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/arguments.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/collections.py index ec5d5ee1e32..ec5d5ee1e32 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/collections.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/collections.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/cyclic.py index 29db2f27e66..29db2f27e66 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/cyclic.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/cyclic.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/execute.py index fbccc986338..fbccc986338 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/execute.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/json_serialize_windowproxy.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/json_serialize_windowproxy.py index 8e76feda238..8e76feda238 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/json_serialize_windowproxy.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/json_serialize_windowproxy.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/node.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/node.py index caf85988f15..caf85988f15 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/node.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/node.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/objects.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/objects.py index e254fe275e2..e254fe275e2 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/objects.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/objects.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/promise.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/promise.py index c206674baef..c206674baef 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/promise.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/promise.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/properties.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/properties.py index c3b01dea29b..c3b01dea29b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/properties.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/properties.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/user_prompts.py index 48d735ea754..48d735ea754 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/execute_script/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element/find.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element/find.py index 50de92554bc..50de92554bc 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element/find.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element/user_prompts.py index ada8e8ebee3..ada8e8ebee3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_element/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_element/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_element/find.py index 102704cd8e3..102704cd8e3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_element/find.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_element/user_prompts.py index 0537a786189..0537a786189 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_element/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_shadow_root/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_shadow_root/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_shadow_root/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_shadow_root/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_shadow_root/find.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_shadow_root/find.py index 62a5bc60f54..62a5bc60f54 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_shadow_root/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_shadow_root/find.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_shadow_root/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_shadow_root/user_prompts.py index 3e3381e7853..3e3381e7853 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_shadow_root/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_element_from_shadow_root/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/find.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements/find.py index 0d9ce21186c..0d9ce21186c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements/find.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements/user_prompts.py index f9a45e52751..f9a45e52751 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_element/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_element/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/find.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_element/find.py index fc898bc95af..fc898bc95af 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_element/find.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_element/user_prompts.py index 467bec09a1b..467bec09a1b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_element/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_shadow_root/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_shadow_root/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_shadow_root/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_shadow_root/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_shadow_root/find.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_shadow_root/find.py index db739fd440f..db739fd440f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_shadow_root/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_shadow_root/find.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_shadow_root/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_shadow_root/user_prompts.py index 45986ad6dab..45986ad6dab 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_shadow_root/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/find_elements_from_shadow_root/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/forward/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/forward/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/forward/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/conftest.py index bd5db0cfeba..bd5db0cfeba 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/forward/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/conftest.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/forward/forward.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/forward.py index f27be403f9e..f27be403f9e 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/forward/forward.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/forward.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/forward/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/user_prompts.py index 3eeaf6e71cd..3eeaf6e71cd 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/forward/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/forward/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/fullscreen.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/fullscreen.py index 94f25ed9bdb..94f25ed9bdb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/fullscreen.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/fullscreen.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/stress.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/stress.py index b907a31f17e..b907a31f17e 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/stress.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/stress.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/user_prompts.py index 106bc457f0c..106bc457f0c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/fullscreen_window/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/fullscreen_window/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_active_element/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_active_element/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_active_element/get.py index 1d2960c88c5..1d2960c88c5 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_active_element/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_active_element/user_prompts.py index 1ff77697b70..1ff77697b70 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_active_element/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_active_element/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_alert_text/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_alert_text/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_alert_text/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_alert_text/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_alert_text/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_alert_text/get.py index 7ee7ff1808f..7ee7ff1808f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_alert_text/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_alert_text/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_label/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_label/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_label/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_label/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_label/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_label/get.py index 0dc00a471a9..0dc00a471a9 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_label/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_label/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_role/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_role/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_role/get.py index 51b6a8b3b6d..51b6a8b3b6d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_computed_role/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_computed_role/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/file.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/file.py index ef6ae238355..ef6ae238355 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/file.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/file.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/get.py index baeab0960b6..baeab0960b6 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/iframe.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/iframe.py index 80a960ce8a1..80a960ce8a1 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/iframe.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/iframe.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/user_prompts.py index d657c188241..d657c188241 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_current_url/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_current_url/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_attribute/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_attribute/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_attribute/get.py index 375f25032c0..375f25032c0 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_attribute/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_attribute/user_prompts.py index 009cb1e5fa1..009cb1e5fa1 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_attribute/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_attribute/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_css_value/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_css_value/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_css_value/get.py index 6f0a8a56395..6f0a8a56395 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_css_value/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_css_value/user_prompts.py index b1f9a3fb0a0..b1f9a3fb0a0 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_css_value/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_css_value/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_property/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_property/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_property/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_property/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_property/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_property/get.py index bb63481dfca..bb63481dfca 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_property/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_property/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_property/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_property/user_prompts.py index e5e76947863..e5e76947863 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_property/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_property/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_rect/__init__.py index 8b137891791..8b137891791 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_rect/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_rect/get.py index 942f119f43c..942f119f43c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_rect/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_rect/user_prompts.py index 20131603381..20131603381 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_rect/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_rect/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_shadow_root/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_shadow_root/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_shadow_root/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_shadow_root/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_shadow_root/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_shadow_root/get.py index d9adde0b9e3..d9adde0b9e3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_shadow_root/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_shadow_root/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_shadow_root/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_shadow_root/user_prompts.py index 5b991bac26b..5b991bac26b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_shadow_root/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_shadow_root/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_tag_name/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_tag_name/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_tag_name/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_tag_name/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_tag_name/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_tag_name/get.py index 3bb03d79886..3bb03d79886 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_tag_name/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_tag_name/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_tag_name/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_tag_name/user_prompts.py index 89697d0ad6a..89697d0ad6a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_tag_name/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_tag_name/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_text/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_text/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_text/get.py index e8d559cf661..e8d559cf661 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_text/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_text/user_prompts.py index 9f0bb386cdf..9f0bb386cdf 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_element_text/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_element_text/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_named_cookie/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_named_cookie/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_named_cookie/get.py index d1e83b6a815..d1e83b6a815 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_named_cookie/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_named_cookie/user_prompts.py index 3ef52a58a41..3ef52a58a41 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_named_cookie/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_named_cookie/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_page_source/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_page_source/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/source.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_page_source/source.py index cc4e208835c..cc4e208835c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/source.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_page_source/source.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_page_source/user_prompts.py index 13cb31595e6..13cb31595e6 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_page_source/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_page_source/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_timeouts/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_timeouts/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_timeouts/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_timeouts/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_timeouts/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_timeouts/get.py index aa02c0990e1..aa02c0990e1 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_timeouts/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_timeouts/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_title/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_title/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_title/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/get.py index e696ec34033..e696ec34033 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_title/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_title/iframe.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/iframe.py index 9c5ab0b595d..9c5ab0b595d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_title/iframe.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/iframe.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_title/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/user_prompts.py index 0fd51e46f32..0fd51e46f32 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_title/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_title/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handle/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handle/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handle/get.py index 68441da5ef8..68441da5ef8 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handle/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handle/user_prompts.py index 0bd660cfa1f..0bd660cfa1f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handle/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handles/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handles/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handles/get.py index 8f4361e30c9..8f4361e30c9 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handles/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handles/user_prompts.py index 217e9849b44..217e9849b44 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_handles/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_rect/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_rect/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_rect/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_rect/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_rect/get.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_rect/get.py index f7592a30e06..f7592a30e06 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_rect/get.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_rect/get.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_rect/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_rect/user_prompts.py index 37c8da6bd38..37c8da6bd38 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/get_window_rect/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/get_window_rect/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/idlharness.window.js b/tests/wpt/web-platform-tests/webdriver/tests/classic/idlharness.window.js index e92e151d898..e92e151d898 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/idlharness.window.js +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/idlharness.window.js diff --git a/tests/wpt/web-platform-tests/webdriver/tests/interface/interface.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/interface/interface.py index 6a7afcd2635..6a7afcd2635 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/interface/interface.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/interface/interface.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_enabled/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_enabled/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/enabled.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_enabled/enabled.py index fccff383a55..fccff383a55 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/enabled.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_enabled/enabled.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_enabled/user_prompts.py index 5dd7d582bd3..5dd7d582bd3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/is_element_enabled/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_enabled/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_selected/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_selected/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/is_element_selected/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_selected/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_selected/selected.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_selected/selected.py index 1fb5b9ce86b..1fb5b9ce86b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/is_element_selected/selected.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_selected/selected.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/is_element_selected/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_selected/user_prompts.py index 96da2c08bd7..96da2c08bd7 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/is_element_selected/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/is_element_selected/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/maximize.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/maximize.py index e233e45a10d..e233e45a10d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/maximize.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/maximize.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/stress.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/stress.py index 4527c64a288..4527c64a288 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/stress.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/stress.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/user_prompts.py index 032edc893a5..032edc893a5 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/maximize_window/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/maximize_window/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/minimize.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/minimize.py index 616b250c705..616b250c705 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/minimize.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/minimize.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/stress.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/stress.py index 8990f12669d..8990f12669d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/stress.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/stress.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/user_prompts.py index 19059b3c395..19059b3c395 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/minimize_window/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/minimize_window/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/file.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/file.py index 5dae5f5c4d0..5dae5f5c4d0 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/file.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/file.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/navigate.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/navigate.py index d61377af275..d61377af275 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/navigate.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/navigate.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/user_prompts.py index 682bc40f4fe..682bc40f4fe 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/navigate_to/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/conftest.py index d67fdba449d..d67fdba449d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/conftest.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/create_alwaysMatch.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/create_alwaysMatch.py index a4cc9efc02e..64fd0a74256 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/create_alwaysMatch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/create_alwaysMatch.py @@ -5,7 +5,7 @@ import pytest from .conftest import product, flatten from tests.support.asserts import assert_success -from tests.new_session.support.create import valid_data +from tests.classic.new_session.support.create import valid_data @pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data)) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/create_firstMatch.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/create_firstMatch.py index ec671530f79..d4523f4330c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/create_firstMatch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/create_firstMatch.py @@ -6,7 +6,7 @@ from .conftest import product, flatten from tests.support.asserts import assert_success -from tests.new_session.support.create import valid_data +from tests.classic.new_session.support.create import valid_data @pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data)) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/default_values.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/default_values.py index abd4a5a64c5..abd4a5a64c5 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/default_values.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/default_values.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/invalid_capabilities.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/invalid_capabilities.py index afdcea0daf7..be397edcf0f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/invalid_capabilities.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/invalid_capabilities.py @@ -2,7 +2,7 @@ import pytest from .conftest import product, flatten -from tests.new_session.support.create import invalid_data, invalid_extensions +from tests.classic.new_session.support.create import invalid_data, invalid_extensions from tests.support.asserts import assert_error diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/merge.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/merge.py index 857d289fcaf..857d289fcaf 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/merge.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/merge.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/page_load_strategy.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/page_load_strategy.py index 69288ef4333..69288ef4333 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/page_load_strategy.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/page_load_strategy.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/platform_name.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/platform_name.py index 54fe4743bed..54fe4743bed 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/platform_name.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/platform_name.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/response.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/response.py index 43a8d579311..43a8d579311 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/response.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/response.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/support/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/support/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/create.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/support/create.py index a0d0ce37b57..a0d0ce37b57 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/support/create.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/support/create.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/timeouts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/timeouts.py index 4f2652bba86..4f2652bba86 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/timeouts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/timeouts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_session/websocket_url.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/websocket_url.py index 452decc90aa..452decc90aa 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_session/websocket_url.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_session/websocket_url.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_window/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/__init__.py index e16014597cf..e16014597cf 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_window/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_window/new.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/new.py index fd0a1ffceb8..fd0a1ffceb8 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_window/new.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/new.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_window/new_tab.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/new_tab.py index f6cacf3c358..f6cacf3c358 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_window/new_tab.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/new_tab.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_window/new_window.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/new_window.py index a3fce364ccc..a3fce364ccc 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_window/new_window.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/new_window.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/new_window/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/user_prompts.py index 0d841468ee4..0d841468ee4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/new_window/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/new_window/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/conftest.py index 0694cce494f..0694cce494f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/conftest.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key.py index 6730b1c18bf..6c34452082a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key.py @@ -2,7 +2,7 @@ import pytest from webdriver.error import NoSuchWindowException -from tests.perform_actions.support.refine import get_keys +from tests.classic.perform_actions.support.refine import get_keys from tests.support.keys import Keys diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_events.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_events.py index 472fb54c285..a1cd9cea8e4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_events.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_events.py @@ -4,7 +4,7 @@ from collections import defaultdict import pytest -from tests.perform_actions.support.refine import get_events, get_keys +from tests.classic.perform_actions.support.refine import get_events, get_keys from tests.support.helpers import filter_dict, filter_supported_key_events from tests.support.keys import ALL_EVENTS, ALTERNATIVE_KEY_NAMES, Keys diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_modifiers.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_modifiers.py index 652106f46c2..652106f46c2 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_modifiers.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_modifiers.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_shortcuts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_shortcuts.py index 46bc3c43390..a5e15156967 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_shortcuts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_shortcuts.py @@ -1,4 +1,4 @@ -from tests.perform_actions.support.refine import get_keys +from tests.classic.perform_actions.support.refine import get_keys from tests.support.keys import Keys diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_special_keys.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_special_keys.py index 003bba42941..c55f3a113eb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/key_special_keys.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/key_special_keys.py @@ -2,7 +2,7 @@ import pytest from webdriver import error -from tests.perform_actions.support.refine import get_keys +from tests.classic.perform_actions.support.refine import get_keys @pytest.mark.parametrize("value", [ diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/none.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/none.py index 4fadec40a45..4fadec40a45 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/none.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/none.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_contextmenu.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_contextmenu.py index 2e06e8ca59f..4a48ea0b237 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_contextmenu.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_contextmenu.py @@ -1,6 +1,6 @@ import pytest -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.refine import get_events from tests.support.helpers import filter_dict from tests.support.keys import Keys diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_dblclick.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_dblclick.py index 5be635a4d56..659e27bd5c8 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_dblclick.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_dblclick.py @@ -1,6 +1,6 @@ import pytest -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.refine import get_events from tests.support.asserts import assert_move_to_coordinates from tests.support.helpers import filter_dict diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_modifier_click.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_modifier_click.py index ffba6fc306b..f3e54288474 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_modifier_click.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_modifier_click.py @@ -1,6 +1,6 @@ import pytest -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.refine import get_events from tests.support.helpers import filter_dict from tests.support.keys import Keys diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_mouse.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_mouse.py index 14da9871f40..31d08491ccb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_mouse.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_mouse.py @@ -4,8 +4,11 @@ import pytest from webdriver.error import InvalidArgumentException, NoSuchWindowException, StaleElementReferenceException -from tests.perform_actions.support.mouse import get_inview_center, get_viewport_rect -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.mouse import ( + get_inview_center, + get_viewport_rect, +) +from tests.classic.perform_actions.support.refine import get_events from tests.support.asserts import assert_move_to_coordinates from tests.support.helpers import filter_dict from tests.support.sync import Poll diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_origin.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_origin.py index 8d4dc9045e6..33b8a25959f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_origin.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_origin.py @@ -2,7 +2,10 @@ import pytest from webdriver import MoveTargetOutOfBoundsException -from tests.perform_actions.support.mouse import get_inview_center, get_viewport_rect +from tests.classic.perform_actions.support.mouse import ( + get_inview_center, + get_viewport_rect, +) def get_click_coordinates(session): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_pause_dblclick.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_pause_dblclick.py index d46178a1d65..209de727a6c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_pause_dblclick.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_pause_dblclick.py @@ -1,5 +1,8 @@ -from tests.perform_actions.support.mouse import get_inview_center, get_viewport_rect -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.mouse import ( + get_inview_center, + get_viewport_rect, +) +from tests.classic.perform_actions.support.refine import get_events from tests.support.helpers import filter_dict _DBLCLICK_INTERVAL = 640 diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_pen.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_pen.py index 29d40276b25..e9cd103301e 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_pen.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_pen.py @@ -4,8 +4,11 @@ import pytest from webdriver.error import NoSuchWindowException, StaleElementReferenceException -from tests.perform_actions.support.mouse import get_inview_center, get_viewport_rect -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.mouse import ( + get_inview_center, + get_viewport_rect, +) +from tests.classic.perform_actions.support.refine import get_events def test_null_response_value(session, pen_chain): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_touch.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_touch.py index 03f32af2b48..7f940f6203c 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_touch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_touch.py @@ -3,8 +3,11 @@ import pytest from webdriver.error import NoSuchWindowException, StaleElementReferenceException -from tests.perform_actions.support.mouse import get_inview_center, get_viewport_rect -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.mouse import ( + get_inview_center, + get_viewport_rect, +) +from tests.classic.perform_actions.support.refine import get_events def test_null_response_value(session, touch_chain): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_tripleclick.py index fff70b8fa62..b45709da3cb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/pointer_tripleclick.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/pointer_tripleclick.py @@ -1,6 +1,6 @@ import math -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.refine import get_events from tests.support.asserts import assert_move_to_coordinates from tests.support.helpers import filter_dict diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/sequence.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/sequence.py index 3536abeb12b..f6c12220c45 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/sequence.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/sequence.py @@ -1,6 +1,6 @@ # META: timeout=long -from tests.perform_actions.support.refine import get_events, get_keys +from tests.classic.perform_actions.support.refine import get_events, get_keys def test_perform_no_actions_send_no_events(session, key_reporter, key_chain): diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/support/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/support/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/mouse.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/support/mouse.py index b3672eb213a..b3672eb213a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/mouse.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/support/mouse.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/refine.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/support/refine.py index 35c962b9ecb..35c962b9ecb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/support/refine.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/support/refine.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/user_prompts.py index 6bbd22a2a29..820edbe32cb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/user_prompts.py @@ -2,7 +2,7 @@ import pytest -from tests.perform_actions.support.refine import get_keys +from tests.classic.perform_actions.support.refine import get_keys from tests.support.asserts import assert_error, assert_success, assert_dialog_handled diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/validity.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/validity.py index 9c056b197d2..9c056b197d2 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/validity.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/validity.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/wheel.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/wheel.py index 59da29fe892..7ee0ae79f77 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/perform_actions/wheel.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/perform_actions/wheel.py @@ -2,7 +2,7 @@ import pytest from webdriver.error import InvalidArgumentException, NoSuchWindowException -from tests.perform_actions.support.refine import get_events +from tests.classic.perform_actions.support.refine import get_events from tests.support.asserts import assert_move_to_coordinates from tests.support.helpers import filter_dict diff --git a/tests/wpt/web-platform-tests/webdriver/tests/permissions/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/permissions/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/permissions/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/permissions/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/permissions/set.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/permissions/set.py index 9b71c4486c3..9b71c4486c3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/permissions/set.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/permissions/set.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/print/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/__init__.py index eb9a890cc45..eb9a890cc45 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/print/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/print/background.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/background.py index 22b392db2e3..22b392db2e3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/print/background.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/background.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/print/orientation.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/orientation.py index c2afacf94fb..c2afacf94fb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/print/orientation.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/orientation.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/print/printcmd.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/printcmd.py index f3fe50bd92d..f3fe50bd92d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/print/printcmd.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/printcmd.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/print/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/user_prompts.py index fb13ec2d65a..fb13ec2d65a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/print/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/print/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/refresh/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/refresh/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/refresh/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/refresh/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/refresh/refresh.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/refresh/refresh.py index b3647130c77..b3647130c77 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/refresh/refresh.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/refresh/refresh.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/refresh/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/refresh/user_prompts.py index 7e944b53b09..7e944b53b09 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/refresh/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/refresh/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/conftest.py index 8275efc23b7..8275efc23b7 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/conftest.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/release.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/release.py index 5df1ff4be90..5df1ff4be90 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/release.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/release.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/sequence.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/sequence.py index 24ca16c8604..78912d8b389 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/sequence.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/sequence.py @@ -1,6 +1,6 @@ # META: timeout=long -from tests.release_actions.support.refine import get_events, get_keys +from tests.classic.release_actions.support.refine import get_events, get_keys from tests.support.helpers import filter_dict, filter_supported_key_events diff --git a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/support/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/support/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/support/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/support/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/support/refine.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/support/refine.py index d4052097493..d4052097493 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/release_actions/support/refine.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/release_actions/support/refine.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/send_alert_text/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/send_alert_text/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/conftest.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/send_alert_text/conftest.py index b080761bde8..b080761bde8 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/conftest.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/send_alert_text/conftest.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/send_alert_text/send.py index df218c803bb..df218c803bb 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/send_alert_text/send.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_timeouts/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_timeouts/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_timeouts/set.py index 6620f4df2a8..6620f4df2a8 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_timeouts/set.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_timeouts/user_prompts.py index a98d87e9b2e..a98d87e9b2e 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_timeouts/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_window_rect/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_window_rect/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/set.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_window_rect/set.py index 23382288a3d..23382288a3d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/set.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_window_rect/set.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_window_rect/user_prompts.py index 908a9d920f3..908a9d920f3 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/set_window_rect/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/status/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/status/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/status/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/status/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/status/status.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/status/status.py index 8c7ae22a67b..8c7ae22a67b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/status/status.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/status/status.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/cross_origin.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/cross_origin.py index 633eba3f424..633eba3f424 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/cross_origin.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/cross_origin.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/switch.py index b9cccb3ecc0..b9cccb3ecc0 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/switch.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch_number.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/switch_number.py index c8858e77ff1..c8858e77ff1 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch_number.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/switch_number.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch_webelement.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/switch_webelement.py index ceadccd8121..ceadccd8121 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch_webelement.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_frame/switch_webelement.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_parent_frame/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_parent_frame/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_parent_frame/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_parent_frame/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_parent_frame/switch.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_parent_frame/switch.py index 9c6db8d2cd6..9c6db8d2cd6 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_parent_frame/switch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_parent_frame/switch.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_window/__init__.py index e69de29bb2d..e69de29bb2d 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_window/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/alerts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_window/alerts.py index 2fc390e8641..2fc390e8641 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/alerts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_window/alerts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/switch.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_window/switch.py index 28d432a8b5b..28d432a8b5b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/switch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/switch_to_window/switch.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/__init__.py index 9a82cc48eab..9a82cc48eab 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/iframe.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/iframe.py index e7f1b0c8053..e7f1b0c8053 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/iframe.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/iframe.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/screenshot.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/screenshot.py index ea4cc290db4..ea4cc290db4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/screenshot.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/screenshot.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/user_prompts.py index 39fefe9325a..39fefe9325a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_element_screenshot/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_element_screenshot/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/__init__.py index f3001d946df..f3001d946df 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/__init__.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/__init__.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/iframe.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/iframe.py index 258e764407a..258e764407a 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/iframe.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/iframe.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/screenshot.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/screenshot.py index 9e71a633c70..9e71a633c70 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/screenshot.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/screenshot.py diff --git a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/user_prompts.py index 7d57f8f2716..7d57f8f2716 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/take_screenshot/user_prompts.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/classic/take_screenshot/user_prompts.py diff --git a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget-stats.html b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget-stats.html new file mode 100644 index 00000000000..98ebea27e43 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget-stats.html @@ -0,0 +1,97 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<meta name="timeout" content="long"> +<title>Tests RTCRtpReceiver-jitterBufferTarget verified with stats</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/webrtc/RTCPeerConnection-helper.js"></script> +<body> +<script> +'use strict' + +function async_promise_test(func, name, properties) { + async_test(t => { + Promise.resolve(func(t)) + .catch(t.step_func(e => { throw e; })) + .then(() => t.done()); + }, name, properties); +} + +async_promise_test(t => applyJitterBufferTarget(t, "video", 250), + "measure raising video jitterBufferTarget to 250"); +async_promise_test(t => applyJitterBufferTarget(t, "audio", 250), + "measure raising audio jitterBufferTarget to 250"); +async_promise_test(t => applyJitterBufferTarget(t, "video", 500), + "measure raising video jitterBufferTarget to 500"); +async_promise_test(t => applyJitterBufferTarget(t, "audio", 500), + "measure raising audio jitterBufferTarget to 500"); +async_promise_test(t => applyJitterBufferTarget(t, "video", 250, 150), + "measure lowering video jitterBufferTarget to 150"); +async_promise_test(t => applyJitterBufferTarget(t, "audio", 250, 150), + "measure lowering audio jitterBufferTarget to 150"); +async_promise_test(t => applyJitterBufferTarget(t, "video", 400, 250), + "measure lowering video jitterBufferTarget to 300"); +async_promise_test(t => applyJitterBufferTarget(t, "audio", 400, 250), + "measure lowering audio jitterBufferTarget to 300"); + +async function applyJitterBufferTarget(t, kind, target, targetToLower) { + const caller = new RTCPeerConnection(); + t.add_cleanup(() => caller.close()); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + + const stream = await getNoiseStream({[kind]:true}); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + for (const track of stream.getTracks()) { + caller.addTrack(track, stream); + } + exchangeIceCandidates(caller, callee); + await exchangeOfferAnswer(caller, callee); + const receiver = callee.getReceivers().find(({track}) => track.kind == kind); + t.step(() => assert_equals(receiver.jitterBufferTarget, null, + `jitterBufferTarget supported for ${kind}`)); + receiver.jitterBufferTarget = target; + t.step(() => assert_equals(receiver.jitterBufferTarget, target, + `jitterBufferTarget increase target for ${kind}`)); + const delay = await measureDelayFromStats(t, receiver, callee, target, kind); + + if (targetToLower) { + t.step(() => assert_less_than(targetToLower, delay, "targetToLower represents a decrease")); + receiver.jitterBufferTarget = targetToLower; + t.step(() => assert_equals(receiver.jitterBufferTarget, targetToLower, + `jitterBufferTarget decrease target for ${kind}`)); + await measureDelayFromStats(t, receiver, callee, targetToLower, kind); + } +} + +async function measureDelayFromStats(t, receiver, callee, target, kind) { + const lowerBound = target * 0.7; + const upperBound = target * 1.3; + let delay, oldInboundStats, prevDelay, rateOfChange; + let numDelayMeasurements = 1; + + for (let statChecks = 0; statChecks < 40; statChecks++) { + await new Promise(r => t.step_timeout(r, 1000)); + const statsReport = await callee.getStats(); + const inboundStats = [...statsReport.values()].find(({type}) => type == "inbound-rtp"); + + if (oldInboundStats) { + delay = ((inboundStats.jitterBufferDelay - oldInboundStats.jitterBufferDelay) / + (inboundStats.jitterBufferEmittedCount - oldInboundStats.jitterBufferEmittedCount) * 1000); + if (prevDelay) { + rateOfChange = (delay - prevDelay) / numDelayMeasurements; + numDelayMeasurements++; + } + prevDelay = delay; + if (delay > lowerBound && delay < upperBound) { + break; + } + } + oldInboundStats = inboundStats; + } + t.step(() => assert_between_inclusive(delay , lowerBound, upperBound, + `${kind} delay is within bounds rateOfChange ${rateOfChange} over ${numDelayMeasurements} measurements`)); + return delay; +} +</script> +</body> diff --git a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget.html b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget.html new file mode 100644 index 00000000000..448162d3a2f --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-jitterBufferTarget.html @@ -0,0 +1,130 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Tests for RTCRtpReceiver-jitterBufferTarget attribute</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<script> +'use strict' + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); +}, 'audio jitterBufferTarget is null by default'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 500; + assert_equals(receiver.jitterBufferTarget, 500); +}, 'audio jitterBufferTarget accepts posititve values'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 4000; + assert_throws_js(RangeError, () => { + receiver.jitterBufferTarget = 4001; + }, 'audio jitterBufferTarget doesn\'t accept values greater than 4000 milliseconds'); + assert_equals(receiver.jitterBufferTarget, 4000); +}, 'audio jitterBufferTarget accepts values up to 4000 milliseconds'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 700; + assert_throws_js(RangeError, () => { + receiver.jitterBufferTarget = -500; + }, 'audio jitterBufferTarget doesn\'t accept negative values'); + assert_equals(receiver.jitterBufferTarget, 700); +}, 'audio jitterBufferTarget returns last valid value on throw'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 0; + assert_equals(receiver.jitterBufferTarget, 0); +}, 'audio jitterBufferTarget allows zero value'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 500; + assert_equals(receiver.jitterBufferTarget, 500); + receiver.jitterBufferTarget = null; + assert_equals(receiver.jitterBufferTarget, null); +}, 'audio jitterBufferTarget allows to reset value to null'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); +}, 'video jitterBufferTarget is null by default'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 500; + assert_equals(receiver.jitterBufferTarget, 500); +}, 'video jitterBufferTarget accepts posititve values'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 4000; + assert_throws_js(RangeError, () => { + receiver.jitterBufferTarget = 4001; + }, 'video jitterBufferTarget doesn\'t accept values greater than 4000 milliseconds'); + assert_equals(receiver.jitterBufferTarget, 4000); +}, 'video jitterBufferTarget accepts values up to 4000 milliseconds'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 700; + assert_throws_js(RangeError, () => { + receiver.jitterBufferTarget = -500; + }, 'video jitterBufferTarget doesn\'t accept negative values'); + assert_equals(receiver.jitterBufferTarget, 700); +}, 'video jitterBufferTarget returns last valid value'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 0; + assert_equals(receiver.jitterBufferTarget, 0); +}, 'video jitterBufferTarget allows zero value'); + +test(t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); + assert_equals(receiver.jitterBufferTarget, null); + receiver.jitterBufferTarget = 500; + assert_equals(receiver.jitterBufferTarget, 500); + receiver.jitterBufferTarget = null; + assert_equals(receiver.jitterBufferTarget, null); +}, 'video jitterBufferTarget allows to reset value to null'); +</script> +</body> diff --git a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-playoutDelayHint.html b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-playoutDelayHint.html deleted file mode 100644 index 29dfc19a6b6..00000000000 --- a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpReceiver-playoutDelayHint.html +++ /dev/null @@ -1,113 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Tests for RTCRtpReceiver-playoutDelayHint attribute</title> -<link rel="help" href="https://henbos.github.io/webrtc-extensions/#dom-rtcrtpreceiver-playoutdelayhint"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<body> -<script> -'use strict' - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); - assert_equals(receiver.playoutDelayHint, null); -}, 'audio playoutDelayHint is null by default'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.5; - assert_equals(receiver.playoutDelayHint, 0.5); -}, 'audio playoutDelayHint accepts posititve values'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); - receiver.playoutDelayHint = 20.5; - assert_equals(receiver.playoutDelayHint, 20.5); -}, 'audio playoutDelayHint accepts large positive values'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.7 - assert_throws_js(TypeError, () => { - receiver.playoutDelayHint = -0.5; - }, 'audio playoutDelayHint doesn\'t accept negative values'); - assert_equals(receiver.playoutDelayHint, 0.7); -}, 'audio playoutDelayHint returns last valid value on throw'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.0; - assert_equals(receiver.playoutDelayHint, 0.0); -}, 'audio playoutDelayHint allows zero value'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('audio', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.5; - receiver.playoutDelayHint = null; - assert_equals(receiver.playoutDelayHint, null); -}, 'audio playoutDelayHint allows to reset value to null'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); - assert_equals(receiver.playoutDelayHint, null); -}, 'video playoutDelayHint is null by default'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.5; - assert_equals(receiver.playoutDelayHint, 0.5); -}, 'video playoutDelayHint accepts posititve values'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); - receiver.playoutDelayHint = 20.5; - assert_equals(receiver.playoutDelayHint, 20.5); -}, 'video playoutDelayHint accepts large posititve values'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.7 - assert_throws_js(TypeError, () => { - receiver.playoutDelayHint = -0.5; - }, 'video playoutDelayHint doesn\'t accept negative values'); - assert_equals(receiver.playoutDelayHint, 0.7); -}, 'video playoutDelayHint returns last valid value'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.0; - assert_equals(receiver.playoutDelayHint, 0.0); -}, 'video playoutDelayHint allows zero value'); - -test(t => { - const pc = new RTCPeerConnection(); - t.add_cleanup(() => pc.close()); - const {receiver} = pc.addTransceiver('video', {direction:'recvonly'}); - receiver.playoutDelayHint = 0.5; - receiver.playoutDelayHint = null; - assert_equals(receiver.playoutDelayHint, null); -}, 'video playoutDelayHint allows to reset value to null'); -</script> -</body> diff --git a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-helper.js b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-helper.js index 10cfd651554..c8a3e45aae9 100644 --- a/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-helper.js +++ b/tests/wpt/web-platform-tests/webrtc-extensions/RTCRtpSynchronizationSource-helper.js @@ -7,54 +7,22 @@ var kAbsCaptureTime = 'http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time'; function addHeaderExtensionToSdp(sdp, uri) { - const extmap = new RegExp('a=extmap:(\\d+)'); - let sdpLines = sdp.split('\r\n'); - - // This assumes at most one audio m= section and one video m= section. - // If more are present, only the first section of each kind is munged. - for (const section of ['audio', 'video']) { - let found_section = false; - let maxId = undefined; - let maxIdLine = undefined; - let extmapAllowMixed = false; - - // find the largest header extension id for section. - for (let i = 0; i < sdpLines.length; ++i) { - if (!found_section) { - if (sdpLines[i].startsWith('m=' + section)) { - found_section = true; - } - continue; - } else { - if (sdpLines[i].startsWith('m=')) { - // end of section - break; - } - } - - if (sdpLines[i] === 'a=extmap-allow-mixed') { - extmapAllowMixed = true; - } - let result = sdpLines[i].match(extmap); - if (result && result.length === 2) { - if (maxId == undefined || result[1] > maxId) { - maxId = parseInt(result[1]); - maxIdLine = i; - } - } - } - - if (maxId == 14 && !extmapAllowMixed) { - // Reaching the limit of one byte header extension. Adding two byte header - // extension support. - sdpLines.splice(maxIdLine + 1, 0, 'a=extmap-allow-mixed'); - } - if (maxIdLine !== undefined) { - sdpLines.splice(maxIdLine + 1, 0, - 'a=extmap:' + (maxId + 1).toString() + ' ' + uri); - } - } - return sdpLines.join('\r\n'); + // Find the highest used header extension id by sorting the extension ids used, + // eliminating duplicates and adding one. This is not quite correct + // but this code will go away with the header extension API. + const usedIds = sdp.split('\n') + .filter(line => line.startsWith('a=extmap:')) + .map(line => parseInt(line.split(' ')[0].substring(9), 10)) + .sort((a, b) => a - b) + .filter((item, index, array) => array.indexOf(item) === index); + const nextId = usedIds[usedIds.length - 1] + 1; + const extmapLine = 'a=extmap:' + nextId + ' ' + uri + '\r\n'; + + const sections = sdp.split('\nm=').map((part, index) => { + return (index > 0 ? 'm=' + part : part).trim() + '\r\n'; + }); + const sessionPart = sections.shift(); + return sessionPart + sections.map(mediaSection => mediaSection + extmapLine).join(''); } // TODO(crbug.com/1051821): Use RTP header extension API instead of munging diff --git a/tests/wpt/web-platform-tests/webrtc/protocol/bundle.https.html b/tests/wpt/web-platform-tests/webrtc/protocol/bundle.https.html index 3d2b835baf3..73ea477e047 100644 --- a/tests/wpt/web-platform-tests/webrtc/protocol/bundle.https.html +++ b/tests/wpt/web-platform-tests/webrtc/protocol/bundle.https.html @@ -135,7 +135,7 @@ a=sendonly a=mid:audio a=rtpmap:111 opus/48000/2 a=setup:actpass -m=video 9 UDP/TLS/RTP/SAVPF 100 +m=video 0 UDP/TLS/RTP/SAVPF 100 c=IN IP4 0.0.0.0 a=bundle-only a=sendonly diff --git a/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js b/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js index 4682729233b..3aa0fc42870 100644 --- a/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js +++ b/tests/wpt/web-platform-tests/webrtc/simulcast/simulcast.js @@ -9,8 +9,8 @@ */ const ridExtensions = [ - "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id", - "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id", + 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id', + 'urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id', ]; function ridToMid(description, rids) { @@ -18,28 +18,28 @@ function ridToMid(description, rids) { const dtls = SDPUtils.getDtlsParameters(sections[1], sections[0]); const ice = SDPUtils.getIceParameters(sections[1], sections[0]); const rtpParameters = SDPUtils.parseRtpParameters(sections[1]); - const setupValue = description.sdp.match(/a=setup:(.*)/)[1]; - const directionValue = - sections[1].match(/a=sendrecv|a=sendonly|a=recvonly|a=inactive/)[0]; + const setupValue = SDPUtils.matchPrefix(description.sdp, 'a=setup:')[0].substring(8); + const direction = SDPUtils.getDirection(sections[1]); const mline = SDPUtils.parseMLine(sections[1]); // Skip mid extension; we are replacing it with the rid extmap rtpParameters.headerExtensions = rtpParameters.headerExtensions.filter( - ext => ext.uri != "urn:ietf:params:rtp-hdrext:sdes:mid" + ext => ext.uri != 'urn:ietf:params:rtp-hdrext:sdes:mid' ); for (const ext of rtpParameters.headerExtensions) { - if (ext.uri == "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id") { - ext.uri = "urn:ietf:params:rtp-hdrext:sdes:mid"; + if (ext.uri === 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id') { + ext.uri = 'urn:ietf:params:rtp-hdrext:sdes:mid'; } } // Filter rtx as we have no way to (re)interpret rrid. // Not doing this makes probing use RTX, it's not understood and ramp-up is slower. rtpParameters.codecs = rtpParameters.codecs.filter(c => c.name.toUpperCase() !== 'RTX'); - if (!rids) { - rids = Array.from(description.sdp.matchAll(/a=rid:(.*) send/g)).map(r => r[1]); + rids = SDPUtils.matchPrefix(sections[1], 'a=rid:') + .filter(line => line.endsWith(' send')) + .map(line => line.substring(6).split(' ')[0]); } let sdp = SDPUtils.writeSessionBoilerplate() + @@ -51,7 +51,7 @@ function ridToMid(description, rids) { sdp += baseRtpDescription + 'a=mid:' + rid + '\r\n' + 'a=msid:rid-' + rid + ' rid-' + rid + '\r\n'; - sdp += directionValue + "\r\n"; + sdp += 'a=' + direction + '\r\n'; } return sdp; } @@ -62,8 +62,7 @@ function midToRid(description, localDescription, rids) { const ice = SDPUtils.getIceParameters(sections[1], sections[0]); const rtpParameters = SDPUtils.parseRtpParameters(sections[1]); const setupValue = description.sdp.match(/a=setup:(.*)/)[1]; - const directionValue = - sections[1].match(/a=sendrecv|a=sendonly|a=recvonly|a=inactive/)[0]; + const direction = SDPUtils.getDirection(sections[1]); const mline = SDPUtils.parseMLine(sections[1]); // Skip rid extensions; we are replacing them with the mid extmap @@ -72,12 +71,12 @@ function midToRid(description, localDescription, rids) { ); for (const ext of rtpParameters.headerExtensions) { - if (ext.uri == "urn:ietf:params:rtp-hdrext:sdes:mid") { - ext.uri = "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id"; + if (ext.uri === 'urn:ietf:params:rtp-hdrext:sdes:mid') { + ext.uri = 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id'; } } - const localMid = localDescription ? SDPUtils.getMid(SDPUtils.splitSections(localDescription.sdp)[1]) : "0"; + const localMid = localDescription ? SDPUtils.getMid(SDPUtils.splitSections(localDescription.sdp)[1]) : '0'; if (!rids) { rids = []; @@ -94,11 +93,11 @@ function midToRid(description, localDescription, rids) { // Although we are converting mids to rids, we still need a mid. // The first one will be consistent with trickle ICE candidates. sdp += 'a=mid:' + localMid + '\r\n'; - sdp += directionValue + "\r\n"; + sdp += 'a=' + direction + '\r\n'; for (const rid of rids) { const stringrid = String(rid); // allow integers - const choices = stringrid.split(","); + const choices = stringrid.split(','); choices.forEach(choice => { sdp += 'a=rid:' + choice + ' recv\r\n'; }); @@ -120,22 +119,21 @@ async function doOfferToSendSimulcast(offerer, answerer) { // Renegotiation. Mids must be the same as before, because renegotiation // can never remove or reorder mids, nor can it expand the simulcast // envelope. - mids = [...answerer.localDescription.sdp.matchAll(/a=mid:(.*)/g)].map( - e => e[1] - ); + const sections = SDPUtils.splitSections(answerer.localDescription.sdp); + sections.shift(); + mids = sections.map(section => SDPUtils.getMid(section)); } else { // First negotiation; the mids will be exactly the same as the rids - const simulcastAttr = offerer.localDescription.sdp.match( - /a=simulcast:send (.*)/ - ); + const simulcastAttr = SDPUtils.matchPrefix(offerer.localDescription.sdp, + 'a=simulcast:send ')[0]; if (simulcastAttr) { - mids = simulcastAttr[1].split(";"); + mids = simulcastAttr.split(' ')[1].split(';'); } } const nonSimulcastOffer = ridToMid(offerer.localDescription, mids); await answerer.setRemoteDescription({ - type: "offer", + type: 'offer', sdp: nonSimulcastOffer, }); } @@ -147,7 +145,7 @@ async function doAnswerToRecvSimulcast(offerer, answerer, rids) { offerer.localDescription, rids ); - await offerer.setRemoteDescription({ type: "answer", sdp: simulcastAnswer }); + await offerer.setRemoteDescription({ type: 'answer', sdp: simulcastAnswer }); } async function doOfferToRecvSimulcast(offerer, answerer, rids) { @@ -157,20 +155,20 @@ async function doOfferToRecvSimulcast(offerer, answerer, rids) { answerer.localDescription, rids ); - await answerer.setRemoteDescription({ type: "offer", sdp: simulcastOffer }); + await answerer.setRemoteDescription({ type: 'offer', sdp: simulcastOffer }); } async function doAnswerToSendSimulcast(offerer, answerer) { await answerer.setLocalDescription(); - // See which mids the offerer had; it will barf if we remove or reorder them - const mids = [...offerer.localDescription.sdp.matchAll(/a=mid:(.*)/g)].map( - e => e[1] - ); + // See which mids the offerer had; it will barf if we remove or reorder them. + const sections = SDPUtils.splitSections(offerer.localDescription.sdp); + sections.shift(); + const mids = sections.map(section => SDPUtils.getMid(section)); const nonSimulcastAnswer = ridToMid(answerer.localDescription, mids); await offerer.setRemoteDescription({ - type: "answer", + type: 'answer', sdp: nonSimulcastAnswer, }); } diff --git a/tests/wpt/web-platform-tests/webtransport/bidirectional-cancel-crash.https.html b/tests/wpt/web-platform-tests/webtransport/bidirectional-cancel-crash.https.html new file mode 100644 index 00000000000..6919c90aa84 --- /dev/null +++ b/tests/wpt/web-platform-tests/webtransport/bidirectional-cancel-crash.https.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<html class="test-wait"> +<script src="/common/get-host-info.sub.js"></script> +<script src="resources/webtransport-test-helpers.sub.js"></script> +<script type="module"> + const WT_CODE = 127; + const HTTP_CODE = webtransport_code_to_http_code(WT_CODE); + const wt = new WebTransport( + webtransport_url(`abort-stream-from-server.py?code=${HTTP_CODE}`)); + await wt.ready; + + const bidi = await wt.createBidirectionalStream(); + const writer = bidi.writable.getWriter(); + + const reader = bidi.readable.getReader(); + reader.read(); + + // Write something, to make the stream visible to the server side. + await writer.write(new Uint8Array([64])); + + const e = await reader.closed.catch(e => e); + document.documentElement.classList.remove("test-wait"); +</script> |