diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2018-02-04 20:08:48 -0500 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2018-02-04 21:05:56 -0500 |
commit | cd5bf022bd047cee7dfcbe086b8b615dfb19bb59 (patch) | |
tree | 21f4608d19133802aa7d6967fca78ecc53fc18a7 | |
parent | e54935c25a1bb100ac757aa78ddc0069d66accf0 (diff) | |
download | servo-cd5bf022bd047cee7dfcbe086b8b615dfb19bb59.tar.gz servo-cd5bf022bd047cee7dfcbe086b8b615dfb19bb59.zip |
Update web-platform-tests to revision 68a256f49be380ca4add535ce8ece9de28820e6b
178 files changed, 6070 insertions, 783 deletions
diff --git a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini index 2a478cda6b3..8db1ab505b6 100644 --- a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini +++ b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-drawImage.html.ini @@ -75,3 +75,108 @@ [createImageBitmap from a vector SVGImageElement with negative sw/sh, and drawImage on the created ImageBitmap] expected: FAIL + [createImageBitmap from an HTMLCanvasElement scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLCanvasElement scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLCanvasElement resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement from a data URL, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement from a data URL scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement from a data URL scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement from a data URL resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an HTMLVideoElement from a data URL with negative sw/sh, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap HTMLImageElement scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap HTMLImageElement scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap HTMLImageElement resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a vector HTMLImageElement scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a vector HTMLImageElement scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a vector HTMLImageElement resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap SVGImageElement scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap SVGImageElement scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a bitmap SVGImageElement resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a vector SVGImageElement scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a vector SVGImageElement scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a vector SVGImageElement resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an OffscreenCanvas scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an OffscreenCanvas scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an OffscreenCanvas resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an ImageData scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an ImageData scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an ImageData resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an ImageBitmap scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an ImageBitmap scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from an ImageBitmap resized, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a Blob scaled down, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a Blob scaled up, and drawImage on the created ImageBitmap] + expected: FAIL + + [createImageBitmap from a Blob resized, and drawImage on the created ImageBitmap] + expected: FAIL + diff --git a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini index 2595ee23ece..f46fa170146 100644 --- a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini +++ b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-invalid-args.html.ini @@ -194,16 +194,16 @@ expected: FAIL [createImageBitmap with a a vector HTMLImageElement source and sw set to 0] - expected: TIMEOUT + expected: FAIL [createImageBitmap with a a vector HTMLImageElement source and sh set to 0] - expected: NOTRUN + expected: FAIL [createImageBitmap with a a vector HTMLImageElement source and oversized (unallocatable) crop region] - expected: NOTRUN + expected: FAIL [createImageBitmap with a a bitmap SVGImageElement source and sw set to 0] - expected: NOTRUN + expected: TIMEOUT [createImageBitmap with a a bitmap SVGImageElement source and sh set to 0] expected: NOTRUN @@ -238,3 +238,12 @@ [createImageBitmap with an available but zero width image source.] expected: NOTRUN + [createImageBitmap with a an HTMLVideoElement from a data URL source and sw set to 0] + expected: FAIL + + [createImageBitmap with a an HTMLVideoElement from a data URL source and sh set to 0] + expected: FAIL + + [createImageBitmap with a an HTMLVideoElement from a data URL source and oversized (unallocatable) crop region] + expected: FAIL + diff --git a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-origin.sub.html.ini b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-origin.sub.html.ini index a3d31b14f8e..3daeb953062 100644 --- a/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-origin.sub.html.ini +++ b/tests/wpt/metadata/2dcontext/imagebitmap/createImageBitmap-origin.sub.html.ini @@ -14,3 +14,6 @@ [unclean ImageBitmap] expected: FAIL + [redirected to cross-origin HTMLVideoElement] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/reading-data-section/filereader_readAsBinaryString.html.ini b/tests/wpt/metadata/FileAPI/reading-data-section/filereader_readAsBinaryString.html.ini new file mode 100644 index 00000000000..9647064f4d0 --- /dev/null +++ b/tests/wpt/metadata/FileAPI/reading-data-section/filereader_readAsBinaryString.html.ini @@ -0,0 +1,4 @@ +[filereader_readAsBinaryString.html] + [FileAPI Test: filereader_readAsBinaryString] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini new file mode 100644 index 00000000000..e363bfabdfc --- /dev/null +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -0,0 +1,8 @@ +[url-in-tags-revoke.window.html] + expected: TIMEOUT + [Fetching a blob URL immediately before revoking it works in an iframe.] + expected: FAIL + + [Fetching a blob URL immediately before revoking it works in <script> tags.] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index bd3460282f0..ac47357a908 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -9349,6 +9349,12 @@ {} ] ], + "css/css-scroll-snap/snap-at-user-scroll-end-manual.html": [ + [ + "/css/css-scroll-snap/snap-at-user-scroll-end-manual.html", + {} + ] + ], "css/css-speech/Integer.html": [ [ "/css/css-speech/Integer.html", @@ -114731,6 +114737,18 @@ {} ] ], + "css/css-grid/grid-items/anonymous-grid-item-001.html": [ + [ + "/css/css-grid/grid-items/anonymous-grid-item-001.html", + [ + [ + "/css/css-flexbox/anonymous-flex-item-split-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html": [ [ "/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html", @@ -135807,6 +135825,78 @@ {} ] ], + "css/css-transforms/individual-transform/individual-transform-1.html": [ + [ + "/css/css-transforms/individual-transform/individual-transform-1.html", + [ + [ + "/css/css-transforms/individual-transform/individual-transform-1-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-transforms/individual-transform/individual-transform-2a.html": [ + [ + "/css/css-transforms/individual-transform/individual-transform-2a.html", + [ + [ + "/css/css-transforms/individual-transform/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-transforms/individual-transform/individual-transform-2b.html": [ + [ + "/css/css-transforms/individual-transform/individual-transform-2b.html", + [ + [ + "/css/css-transforms/individual-transform/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-transforms/individual-transform/individual-transform-2c.html": [ + [ + "/css/css-transforms/individual-transform/individual-transform-2c.html", + [ + [ + "/css/css-transforms/individual-transform/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-transforms/individual-transform/individual-transform-2d.html": [ + [ + "/css/css-transforms/individual-transform/individual-transform-2d.html", + [ + [ + "/css/css-transforms/individual-transform/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-transforms/individual-transform/individual-transform-2e.html": [ + [ + "/css/css-transforms/individual-transform/individual-transform-2e.html", + [ + [ + "/css/css-transforms/individual-transform/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-transforms/inline-styles/svg-inline-styles-001.html": [ [ "/css/css-transforms/inline-styles/svg-inline-styles-001.html", @@ -142855,6 +142945,18 @@ {} ] ], + "css/css-transforms/transform-transformed-tr-percent-height-child.html": [ + [ + "/css/css-transforms/transform-transformed-tr-percent-height-child.html", + [ + [ + "/css/css-transforms/transform-transformed-tr-percent-height-child-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-transforms/transform-translate-001.html": [ [ "/css/css-transforms/transform-translate-001.html", @@ -167931,6 +168033,18 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1-ref.html", + "==" + ] + ], + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/multicol-height-002.xht": [ [ "/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/multicol-height-002.xht", @@ -171651,6 +171765,78 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1-ref.html", + "==" + ] + ], + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2a.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2a.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2b.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2b.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2c.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2c.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2d.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2d.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2e.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2e.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html", + "==" + ] + ], + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-containing-block-dynamic-1a.html": [ [ "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-containing-block-dynamic-1a.html", @@ -178923,6 +179109,18 @@ {} ] ], + "svg/path/distance/pathLength-positive-percentage.svg": [ + [ + "/svg/path/distance/pathLength-positive-percentage.svg", + [ + [ + "/svg/path/distance/pathLength-positive-ref.svg", + "==" + ] + ], + {} + ] + ], "svg/path/distance/pathLength-positive.svg": [ [ "/svg/path/distance/pathLength-positive.svg", @@ -178935,6 +179133,18 @@ {} ] ], + "svg/path/distance/pathLength-zero-percentage.svg": [ + [ + "/svg/path/distance/pathLength-zero-percentage.svg", + [ + [ + "/svg/path/distance/pathLength-zero-percentage-ref.svg", + "==" + ] + ], + {} + ] + ], "svg/path/distance/pathLength-zero.svg": [ [ "/svg/path/distance/pathLength-zero.svg", @@ -210375,6 +210585,16 @@ {} ] ], + "content-security-policy/form-action/support/post-message-to-opener.sub.html": [ + [ + {} + ] + ], + "content-security-policy/form-action/support/post-message-to-parent.sub.html": [ + [ + {} + ] + ], "content-security-policy/frame-ancestors/support/frame-ancestors-and-x-frame-options.sub.html": [ [ {} @@ -211010,6 +211230,11 @@ {} ] ], + "content-security-policy/support/dedicated-worker-helper.js": [ + [ + {} + ] + ], "content-security-policy/support/document-write-alert-fail.js": [ [ {} @@ -211140,6 +211365,16 @@ {} ] ], + "content-security-policy/support/service-worker-helper.js": [ + [ + {} + ] + ], + "content-security-policy/support/shared-worker-helper.js": [ + [ + {} + ] + ], "content-security-policy/support/siblingPath.js": [ [ {} @@ -252505,6 +252740,16 @@ {} ] ], + "css/css-transforms/individual-transform/individual-transform-1-ref.html": [ + [ + {} + ] + ], + "css/css-transforms/individual-transform/individual-transform-2-ref.html": [ + [ + {} + ] + ], "css/css-transforms/inline-styles/reference/svg-inline-styles-ref.html": [ [ {} @@ -253625,6 +253870,11 @@ {} ] ], + "css/css-transforms/transform-transformed-tr-percent-height-child-ref.html": [ + [ + {} + ] + ], "css/css-transforms/transform-translate-ref.html": [ [ {} @@ -264395,6 +264645,11 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1-ref.html": [ + [ + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/moz-multicol3-column-balancing-break-inside-avoid-1-ref.html": [ [ {} @@ -265540,6 +265795,16 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1-ref.html": [ + [ + {} + ] + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html": [ + [ + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2-ref.html": [ [ {} @@ -279200,6 +279465,11 @@ {} ] ], + "html/semantics/forms/the-input-element/resources/image-submit-click.html": [ + [ + {} + ] + ], "html/semantics/forms/the-label-element/.gitkeep": [ [ {} @@ -281810,6 +282080,11 @@ {} ] ], + "interfaces/css-typed-om.idl": [ + [ + {} + ] + ], "interfaces/cssom-view.idl": [ [ {} @@ -283665,6 +283940,11 @@ {} ] ], + "picture-in-picture/resources/picture-in-picture-helpers.js": [ + [ + {} + ] + ], "pointerevents/OWNERS": [ [ {} @@ -288410,6 +288690,11 @@ {} ] ], + "service-workers/service-worker/resources/fetch-event-network-fallback-worker.js": [ + [ + {} + ] + ], "service-workers/service-worker/resources/fetch-event-respond-with-argument-iframe.html": [ [ {} @@ -288420,6 +288705,11 @@ {} ] ], + "service-workers/service-worker/resources/fetch-event-respond-with-body-loaded-in-chunk-worker.js": [ + [ + {} + ] + ], "service-workers/service-worker/resources/fetch-event-respond-with-custom-response-worker.js": [ [ {} @@ -288430,6 +288720,11 @@ {} ] ], + "service-workers/service-worker/resources/fetch-event-respond-with-readable-stream-chunk-worker.js": [ + [ + {} + ] + ], "service-workers/service-worker/resources/fetch-event-respond-with-readable-stream-worker.js": [ [ {} @@ -288945,6 +289240,16 @@ {} ] ], + "service-workers/service-worker/resources/range-request-to-different-origins-worker.js": [ + [ + {} + ] + ], + "service-workers/service-worker/resources/range-request-with-different-cors-modes-worker.js": [ + [ + {} + ] + ], "service-workers/service-worker/resources/redirect-worker.js": [ [ {} @@ -290115,6 +290420,11 @@ {} ] ], + "svg/path/distance/pathLength-zero-percentage-ref.svg": [ + [ + {} + ] + ], "svg/path/distance/pathLength-zero-ref.svg": [ [ {} @@ -290955,6 +291265,11 @@ {} ] ], + "webaudio/resources/stereopanner-testing.js": [ + [ + {} + ] + ], "webaudio/the-audio-api/the-analysernode-interface/.gitkeep": [ [ {} @@ -299788,6 +300103,12 @@ {} ] ], + "FileAPI/reading-data-section/filereader_readAsBinaryString.html": [ + [ + "/FileAPI/reading-data-section/filereader_readAsBinaryString.html", + {} + ] + ], "FileAPI/reading-data-section/filereader_readAsDataURL.html": [ [ "/FileAPI/reading-data-section/filereader_readAsDataURL.html", @@ -299852,6 +300173,12 @@ {} ] ], + "FileAPI/url/url-in-tags-revoke.window.js": [ + [ + "/FileAPI/url/url-in-tags-revoke.window.html", + {} + ] + ], "FileAPI/url/url-in-tags.window.js": [ [ "/FileAPI/url/url-in-tags.window.html", @@ -304634,6 +304961,18 @@ {} ] ], + "content-security-policy/form-action/form-action-src-allowed-target-blank.sub.html": [ + [ + "/content-security-policy/form-action/form-action-src-allowed-target-blank.sub.html", + {} + ] + ], + "content-security-policy/form-action/form-action-src-allowed-target-frame.sub.html": [ + [ + "/content-security-policy/form-action/form-action-src-allowed-target-frame.sub.html", + {} + ] + ], "content-security-policy/form-action/form-action-src-allowed.sub.html": [ [ "/content-security-policy/form-action/form-action-src-allowed.sub.html", @@ -304670,6 +305009,18 @@ {} ] ], + "content-security-policy/form-action/form-action-src-redirect-allowed-target-blank.sub.html": [ + [ + "/content-security-policy/form-action/form-action-src-redirect-allowed-target-blank.sub.html", + {} + ] + ], + "content-security-policy/form-action/form-action-src-redirect-allowed-target-frame.sub.html": [ + [ + "/content-security-policy/form-action/form-action-src-redirect-allowed-target-frame.sub.html", + {} + ] + ], "content-security-policy/form-action/form-action-src-redirect-blocked.sub.html": [ [ "/content-security-policy/form-action/form-action-src-redirect-blocked.sub.html", @@ -306272,6 +306623,30 @@ {} ] ], + "content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html", + {} + ] + ], + "content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html", + {} + ] + ], + "content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html", + {} + ] + ], + "content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html", + {} + ] + ], "content-security-policy/worker-src/service-child.https.sub.html": [ [ "/content-security-policy/worker-src/service-child.https.sub.html", @@ -306302,6 +306677,30 @@ {} ] ], + "content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html": [ + [ + "/content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html", + {} + ] + ], + "content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html": [ + [ + "/content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html", + {} + ] + ], + "content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html": [ + [ + "/content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html", + {} + ] + ], + "content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html": [ + [ + "/content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html", + {} + ] + ], "content-security-policy/worker-src/shared-child.sub.html": [ [ "/content-security-policy/worker-src/shared-child.sub.html", @@ -306332,6 +306731,30 @@ {} ] ], + "content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html", + {} + ] + ], + "content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html", + {} + ] + ], + "content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html", + {} + ] + ], + "content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html": [ + [ + "/content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html", + {} + ] + ], "cookie-store/cookieStore_delete_arguments.tentative.window.js": [ [ "/cookie-store/cookieStore_delete_arguments.tentative.window.html", @@ -308476,6 +308899,18 @@ {} ] ], + "css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html": [ + [ + "/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html", + {} + ] + ], + "css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html": [ + [ + "/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html", + {} + ] + ], "css/css-grid/alignment/grid-fit-content-tracks-dont-stretch-001.html": [ [ "/css/css-grid/alignment/grid-fit-content-tracks-dont-stretch-001.html", @@ -308584,6 +309019,18 @@ {} ] ], + "css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html": [ + [ + "/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html", + {} + ] + ], + "css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html": [ + [ + "/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html", + {} + ] + ], "css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-001.html": [ [ "/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-001.html", @@ -309580,12 +310027,24 @@ {} ] ], + "css/css-shapes/parsing/shape-outside-invalid-position.html": [ + [ + "/css/css-shapes/parsing/shape-outside-invalid-position.html", + {} + ] + ], "css/css-shapes/parsing/shape-outside-invalid.html": [ [ "/css/css-shapes/parsing/shape-outside-invalid.html", {} ] ], + "css/css-shapes/parsing/shape-outside-valid-position.html": [ + [ + "/css/css-shapes/parsing/shape-outside-valid-position.html", + {} + ] + ], "css/css-shapes/parsing/shape-outside-valid.html": [ [ "/css/css-shapes/parsing/shape-outside-valid.html", @@ -311782,6 +312241,12 @@ {} ] ], + "css/css-typed-om/interfaces.html": [ + [ + "/css/css-typed-om/interfaces.html", + {} + ] + ], "css/css-typed-om/styleMap-update-function.html": [ [ "/css/css-typed-om/styleMap-update-function.html", @@ -311890,12 +312355,6 @@ {} ] ], - "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-interface.html": [ - [ - "/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-interface.html", - {} - ] - ], "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html": [ [ "/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html", @@ -311920,12 +312379,6 @@ {} ] ], - "css/css-typed-om/stylevalue-subclasses/cssPositionValue-interface.html": [ - [ - "/css/css-typed-om/stylevalue-subclasses/cssPositionValue-interface.html", - {} - ] - ], "css/css-typed-om/stylevalue-subclasses/cssPositionValue-invalid.html": [ [ "/css/css-typed-om/stylevalue-subclasses/cssPositionValue-invalid.html", @@ -311968,27 +312421,27 @@ {} ] ], - "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-interface.html": [ + "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html": [ [ - "/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-interface.html", + "/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html", {} ] ], - "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html": [ + "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html": [ [ - "/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html", + "/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html", {} ] ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.tentative.html": [ + "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html": [ [ - "/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.tentative.html", + "/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html", {} ] ], - "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-interface.html": [ + "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html": [ [ - "/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-interface.html", + "/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html", {} ] ], @@ -312262,12 +312715,6 @@ {} ] ], - "css/css-typed-om/the-stylepropertymap/interface.html": [ - [ - "/css/css-typed-om/the-stylepropertymap/interface.html", - {} - ] - ], "css/css-ui/box-sizing-027.html": [ [ "/css/css-ui/box-sizing-027.html", @@ -327702,6 +328149,12 @@ {} ] ], + "html/semantics/forms/the-input-element/image-click-form-data.html": [ + [ + "/html/semantics/forms/the-input-element/image-click-form-data.html", + {} + ] + ], "html/semantics/forms/the-input-element/input-checkvalidity.html": [ [ "/html/semantics/forms/the-input-element/input-checkvalidity.html", @@ -344726,6 +345179,52 @@ {} ] ], + "picture-in-picture/disable-picture-in-picture.html": [ + [ + "/picture-in-picture/disable-picture-in-picture.html", + { + "testdriver": true + } + ] + ], + "picture-in-picture/enter-picture-in-picture.html": [ + [ + "/picture-in-picture/enter-picture-in-picture.html", + { + "testdriver": true + } + ] + ], + "picture-in-picture/exit-picture-in-picture.html": [ + [ + "/picture-in-picture/exit-picture-in-picture.html", + { + "testdriver": true + } + ] + ], + "picture-in-picture/not-processing-user-gesture.html": [ + [ + "/picture-in-picture/not-processing-user-gesture.html", + {} + ] + ], + "picture-in-picture/picture-in-picture-element.html": [ + [ + "/picture-in-picture/picture-in-picture-element.html", + { + "testdriver": true + } + ] + ], + "picture-in-picture/request-picture-in-picture.html": [ + [ + "/picture-in-picture/request-picture-in-picture.html", + { + "testdriver": true + } + ] + ], "pointerevents/extension/idlharness.html": [ [ "/pointerevents/extension/idlharness.html", @@ -354244,6 +354743,12 @@ {} ] ], + "service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html": [ + [ + "/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html", + {} + ] + ], "service-workers/service-worker/fetch-canvas-tainting-video.https.html": [ [ "/service-workers/service-worker/fetch-canvas-tainting-video.https.html", @@ -354306,6 +354811,12 @@ {} ] ], + "service-workers/service-worker/fetch-event-respond-with-body-loaded-in-chunk.https.html": [ + [ + "/service-workers/service-worker/fetch-event-respond-with-body-loaded-in-chunk.https.html", + {} + ] + ], "service-workers/service-worker/fetch-event-respond-with-custom-response.https.html": [ [ "/service-workers/service-worker/fetch-event-respond-with-custom-response.https.html", @@ -354318,6 +354829,12 @@ {} ] ], + "service-workers/service-worker/fetch-event-respond-with-readable-stream-chunk.https.html": [ + [ + "/service-workers/service-worker/fetch-event-respond-with-readable-stream-chunk.https.html", + {} + ] + ], "service-workers/service-worker/fetch-event-respond-with-readable-stream.https.html": [ [ "/service-workers/service-worker/fetch-event-respond-with-readable-stream.https.html", @@ -358642,12 +359159,54 @@ {} ] ], + "webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html": [ + [ + "/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html", + {} + ] + ], + "webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.html": [ + [ + "/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.html", + {} + ] + ], + "webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning.html": [ + [ + "/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning.html", + {} + ] + ], "webaudio/the-audio-api/the-waveshapernode-interface/curve-tests.html": [ [ "/webaudio/the-audio-api/the-waveshapernode-interface/curve-tests.html", {} ] ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-copy-curve.html": [ + [ + "/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-copy-curve.html", + {} + ] + ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-limits.html": [ + [ + "/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-limits.html", + {} + ] + ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-simple.html": [ + [ + "/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-simple.html", + {} + ] + ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html": [ + [ + "/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html", + {} + ] + ], "webauthn/createcredential-badargs-rp.https.html": [ [ "/webauthn/createcredential-badargs-rp.https.html", @@ -384690,7 +385249,7 @@ "support" ], "./.travis.yml": [ - "ae17735a06f31093f06a10b643099cbedaa3c459", + "975f331eb3438e5b66ccd721e1afce796b6af0d5", "support" ], "./CONTRIBUTING.md": [ @@ -384774,7 +385333,7 @@ "support" ], "2dcontext/building-paths/canvas_complexshapes_arcto_001-ref.htm": [ - "b8a61ac997df38fa8b14ce0024ffa3b4f74bee5d", + "e657cc289d49e8b8e54a7d1405dda6a6a07a8847", "support" ], "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm": [ @@ -387210,11 +387769,11 @@ "testharness" ], "2dcontext/imagebitmap/common.sub.js": [ - "46df9fcac72992d9d47385bfd11854131bcff172", + "03f7c67a1001cdaf46dc5bccb4846ba7d6ab50cd", "support" ], "2dcontext/imagebitmap/createImageBitmap-drawImage.html": [ - "66c294061acec34452fa4d1e9d6743f8f6b2fdf9", + "adef50e6043c6ecb80bdc4a6b7f9d9a599a80656", "testharness" ], "2dcontext/imagebitmap/createImageBitmap-invalid-args.html": [ @@ -387222,7 +387781,7 @@ "testharness" ], "2dcontext/imagebitmap/createImageBitmap-origin.sub.html": [ - "ebd2cd88858411c9dbbcdad0ece647b39b25b368", + "adcaa1b9854555f0cbb804b09ab49f50a5199eb6", "testharness" ], "2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html": [ @@ -389005,6 +389564,10 @@ "66422d5cf81ba73c6bf700eb2e2d755f4d105a54", "testharness" ], + "FileAPI/reading-data-section/filereader_readAsBinaryString.html": [ + "9fc79f63665d48495059542fcb8250f6eb06f17d", + "testharness" + ], "FileAPI/reading-data-section/filereader_readAsDataURL.html": [ "52371f9c51952984ea5cb07e2a6e3d8dfcf50d16", "testharness" @@ -389097,6 +389660,10 @@ "b087f507b342f88240efcee2569da96fee469a5b", "testharness" ], + "FileAPI/url/url-in-tags-revoke.window.js": [ + "b1f54096cb0350066239ec1633be2be6ecb3af00", + "testharness" + ], "FileAPI/url/url-in-tags.window.js": [ "bf67cd8a24215953b0e68e1d046491c7863b05b6", "testharness" @@ -412929,6 +413496,14 @@ "1a4146819d11ae72ddfe1f1eb319aef992af7dda", "testharness" ], + "content-security-policy/form-action/form-action-src-allowed-target-blank.sub.html": [ + "5f65ffa5272178924cff093f16cba217d859d1bb", + "testharness" + ], + "content-security-policy/form-action/form-action-src-allowed-target-frame.sub.html": [ + "1f9935719cc4207260e99bfdfc34be717e115cef", + "testharness" + ], "content-security-policy/form-action/form-action-src-allowed.sub.html": [ "d0c2dcbb18201b72964f4da5f94b8c200fa02cad", "testharness" @@ -412957,10 +413532,26 @@ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" ], + "content-security-policy/form-action/form-action-src-redirect-allowed-target-blank.sub.html": [ + "91f76ecfc3c944449b6a8b886983f05e6dbe1ada", + "testharness" + ], + "content-security-policy/form-action/form-action-src-redirect-allowed-target-frame.sub.html": [ + "4c76e058243d87f4fe6bc49755ce2ee77234e6df", + "testharness" + ], "content-security-policy/form-action/form-action-src-redirect-blocked.sub.html": [ "81d61061da04d7f1e9f4f64a4bd18734a736ca96", "testharness" ], + "content-security-policy/form-action/support/post-message-to-opener.sub.html": [ + "fc8ea73c4dcc9943430416c34278e29bd250d7b9", + "support" + ], + "content-security-policy/form-action/support/post-message-to-parent.sub.html": [ + "948f81f196891230c74999a169c14c84b1ba413b", + "support" + ], "content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-cross-none-block.html": [ "e96b19c03463de925f03a666a173e948c0908302", "testharness" @@ -413638,7 +414229,7 @@ "support" ], "content-security-policy/reporting/report-multiple-violations-02.html": [ - "6c132ba1a1e156e05fa645bc33fb0d33330dee36", + "4f233d54cc5bd28f05227dbbb480c2cd8e48cef0", "testharness" ], "content-security-policy/reporting/report-multiple-violations-02.html.sub.headers": [ @@ -414437,6 +415028,10 @@ "06b0c4f4a36a7bd4d323d1920a1a3e2caa9b52dc", "support" ], + "content-security-policy/support/dedicated-worker-helper.js": [ + "c2ee371b1ca6b56d4579032db79470d38dc7fad9", + "support" + ], "content-security-policy/support/document-write-alert-fail.js": [ "55f9e74adccef83969d5da859a05bf670f711671", "support" @@ -414541,6 +415136,14 @@ "e6e5eb285a3988173c49a116b1ae8a76f9f7ab1a", "support" ], + "content-security-policy/support/service-worker-helper.js": [ + "dada4b697830bd56b771e02de8460dffcb3a494e", + "support" + ], + "content-security-policy/support/shared-worker-helper.js": [ + "7e7b17341425d222d440f2f4607ee40ff020efe6", + "support" + ], "content-security-policy/support/siblingPath.js": [ "1743309038e2aef21670a82973c1cea2fbc01253", "support" @@ -414661,6 +415264,22 @@ "ec579a530ae0f44e387ed400d5b923cdb8203dc7", "testharness" ], + "content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html": [ + "1206a6f00c5cf43da1327625fb7c97ce9f63a868", + "testharness" + ], + "content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html": [ + "abc576c3a0adc9e3a68b5449aeb1477f6b50f6b1", + "testharness" + ], + "content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html": [ + "a5a34c8184397fc38b1949e798f23e0799aade1a", + "testharness" + ], + "content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html": [ + "8fee6e7d738c6cc9a22883cde366e395f346f5d4", + "testharness" + ], "content-security-policy/worker-src/service-child.https.sub.html": [ "0ccf56794d55c4ea8800cbe8f0805fd02450549f", "testharness" @@ -414681,6 +415300,22 @@ "561c9a2ce0d4c1b9e148cad2ca5bad4b17517e9e", "testharness" ], + "content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html": [ + "90d70a062e718daf5013f3b12662066b6edb1692", + "testharness" + ], + "content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html": [ + "0a115336d748892edd4afc99467ae558080789f4", + "testharness" + ], + "content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html": [ + "c770ac48a17b74d54bcde8a8f721fd506da81a6b", + "testharness" + ], + "content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html": [ + "ee7276b72994909e0c504f5d3ef0fe526f898e7a", + "testharness" + ], "content-security-policy/worker-src/shared-child.sub.html": [ "1bc3004b63255bdb75f6660ab81870d08b96e74c", "testharness" @@ -414701,6 +415336,22 @@ "ff4d7ca289ea20fa00bca535fdcf929876a2278b", "testharness" ], + "content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html": [ + "8cc98872cd4fe0ed2e411d74ba4c79684fb1b312", + "testharness" + ], + "content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html": [ + "7ff188d280b8b5af15da54a75201ed5e68804c42", + "testharness" + ], + "content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html": [ + "d1a3d6e2848bd03fb46ad4be6e312ddc501e9f5c", + "testharness" + ], + "content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html": [ + "599143e3733f0ea7dc3cbaa6b03de0a7b8e93acf", + "testharness" + ], "cookie-store/OWNERS": [ "9e68d9eb0784e10786bd8b0c6009afb42516acdc", "support" @@ -484590,7 +485241,7 @@ "support" ], "css/css-fonts/font-feature-settings-serialization-001.html": [ - "51a64b41a9a6bc085804710cf3ab80d860964c71", + "d1032e08aee1e9a7d1309ad94bd5633535ce9315", "testharness" ], "css/css-fonts/font-features-across-space-1-ref.html": [ @@ -492233,6 +492884,14 @@ "6c58deabf758bee4d8223403d0f7edffede54f64", "testharness" ], + "css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html": [ + "86c3702fc643b0a45a7f5e3588e51cdca3038fcc", + "testharness" + ], + "css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html": [ + "7d1a1c21880b25fe0126affa850fb13bdf80470b", + "testharness" + ], "css/css-grid/alignment/grid-content-distribution-001.html": [ "5622a264eb2dbd6cf621ac97aa4a8ae5db82c6b3", "reftest" @@ -492541,6 +493200,14 @@ "c75eb3edc97f8f01429a26698337c6e3b869563b", "testharness" ], + "css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html": [ + "17b27d1784ada1d09a6e1ae42b6a9c8225699948", + "testharness" + ], + "css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html": [ + "7f95db93458af40478ad2cd6b473e8f34f62f3e8", + "testharness" + ], "css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-001.html": [ "cafc54256ea9d0cbf8990a0e04904c7ada8c5894", "testharness" @@ -492997,6 +493664,10 @@ "7d6dc5106777942ad83e6bc570368af113f32d5f", "support" ], + "css/css-grid/grid-items/anonymous-grid-item-001.html": [ + "1d684c1f3ba7867f711e0bec65f4f665ab6e67dd", + "reftest" + ], "css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html": [ "2d713db8aa5f79164259a2c7b2b3f6b89f8aeed4", "reftest" @@ -499433,6 +500104,10 @@ "de66dba5bce15b7403e9e582d982d4e3e4aed552", "testharness" ], + "css/css-scroll-snap/snap-at-user-scroll-end-manual.html": [ + "51f08f58135901b332ff43d15fbdc8d0a22f962c", + "manual" + ], "css/css-shapes/OWNERS": [ "d26aa70436055346420fd8bae6fd174daf090124", "support" @@ -499461,10 +500136,18 @@ "bf937f106b1d6e5b15abce0971da8773777a0ac0", "testharness" ], + "css/css-shapes/parsing/shape-outside-invalid-position.html": [ + "3f9db0d5ae274b76c5474a097560f97b7f32d80d", + "testharness" + ], "css/css-shapes/parsing/shape-outside-invalid.html": [ "024c4a2789493964b162397bc994b699274e1423", "testharness" ], + "css/css-shapes/parsing/shape-outside-valid-position.html": [ + "be19a2491b17f77d9dfda2fe03f6f099d7fe7d9b", + "testharness" + ], "css/css-shapes/parsing/shape-outside-valid.html": [ "5b90c13064455cff16f5a4d54a6343c76775f3cc", "testharness" @@ -508529,6 +509212,38 @@ "c5ae01fe9d9c6a3561394184bc9e131f92ed9bc6", "reftest" ], + "css/css-transforms/individual-transform/individual-transform-1-ref.html": [ + "0fd0f22afe7bdb81b7a40326c172e5ee1c68ccb3", + "support" + ], + "css/css-transforms/individual-transform/individual-transform-1.html": [ + "7a809a56f60c1b9d9306ca3c9b403b5705be2629", + "reftest" + ], + "css/css-transforms/individual-transform/individual-transform-2-ref.html": [ + "3fbb0ac60628d611fb5a88e316bafda37b28324b", + "support" + ], + "css/css-transforms/individual-transform/individual-transform-2a.html": [ + "80c017a0ffd11dd8063839c46390ee1ac2b4753d", + "reftest" + ], + "css/css-transforms/individual-transform/individual-transform-2b.html": [ + "b09793a0629e5b5827b1b1db648f0226b11bd824", + "reftest" + ], + "css/css-transforms/individual-transform/individual-transform-2c.html": [ + "24998fae87313108ed068e7c138e6425331743c9", + "reftest" + ], + "css/css-transforms/individual-transform/individual-transform-2d.html": [ + "220eec725cf95a8adcd5ff71a7fa8a8026671411", + "reftest" + ], + "css/css-transforms/individual-transform/individual-transform-2e.html": [ + "00cc130b13377d1583000a5d8e269fe13d307e81", + "reftest" + ], "css/css-transforms/inline-styles/reference/svg-inline-styles-ref.html": [ "e6192d166eaa89627b7abb4aba6f268c55b167da", "support" @@ -511765,6 +512480,14 @@ "7d8d62227d3ee736db2c7477a96ea1e5056ea405", "reftest" ], + "css/css-transforms/transform-transformed-tr-percent-height-child-ref.html": [ + "f7b62cbb0097798a6ed70f7667b45846e17f5a29", + "support" + ], + "css/css-transforms/transform-transformed-tr-percent-height-child.html": [ + "24b9da4401ca71ace4aebefd5f3881384c23fd4f", + "reftest" + ], "css/css-transforms/transform-translate-001.html": [ "f7f3a85ab0cd4a84b5cd7e31a60a22845941fab1", "reftest" @@ -513729,6 +514452,10 @@ "4bcfaa7a22cbe8fa2ca234583403d26bd520474c", "testharness" ], + "css/css-typed-om/interfaces.html": [ + "b594b1907b2ca95278b8fc643b97480d693bab9f", + "testharness" + ], "css/css-typed-om/resources/1x1-green.png": [ "51e7b6974a09eda6cb31337717c5eaeb9c44b443", "support" @@ -513790,7 +514517,7 @@ "testharness" ], "css/css-typed-om/stylevalue-serialization/cssMathValue.tentative.html": [ - "4c5bf7630548c90a1397b6f1f215bd3be76b6cf6", + "a71f7f5afdd97a55eeef2adc89914194ad5ecb0a", "testharness" ], "css/css-typed-om/stylevalue-serialization/cssPositionValue.html": [ @@ -513802,7 +514529,7 @@ "testharness" ], "css/css-typed-om/stylevalue-serialization/cssUnitValue.tentative.html": [ - "022aec2fac9ccdda36adf97bd47aa407e2825f6e", + "e1c27e0baa33d990c83ee3d562a3eeae3106b833", "testharness" ], "css/css-typed-om/stylevalue-serialization/cssUnparsedValue.html": [ @@ -513813,10 +514540,6 @@ "7b7fa7d06c5dcf614864bab0adef083359278ab6", "testharness" ], - "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-interface.html": [ - "53394d04d67fa9526240c2c0af8b71f54a60a0c3", - "testharness" - ], "css/css-typed-om/stylevalue-subclasses/cssKeywordValue-invalid.html": [ "63600cc74e62ecbaf98bf786de17362764ec947e", "testharness" @@ -513833,10 +514556,6 @@ "95faef2381452acfdaa8b200fb91d0f4f70bfd92", "testharness" ], - "css/css-typed-om/stylevalue-subclasses/cssPositionValue-interface.html": [ - "dc32e826e1f840c99f3b4bad4f03bd0f9573ce4e", - "testharness" - ], "css/css-typed-om/stylevalue-subclasses/cssPositionValue-invalid.html": [ "799985863b303910386137217d3641cb5fa550a4", "testharness" @@ -513865,20 +514584,20 @@ "700fae462f258404f3d0b8fad290613fc1929e1d", "testharness" ], - "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-interface.html": [ - "aeab5e92558f5b61ab99cab0ed1537e7fcb1092b", - "testharness" - ], "css/css-typed-om/stylevalue-subclasses/cssUnparsedValue.html": [ "cf1e8d553a9ebc111a1a81de48a821f7f7ad0bf1", "testharness" ], - "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.tentative.html": [ - "292ae5c272bbe9eee02ab7da2a465c7e941ab562", + "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html": [ + "5565653081f6615d8d88323b98ed670a653bef9b", + "testharness" + ], + "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html": [ + "2d776d5a92feebe4803434878c3f76973313063b", "testharness" ], - "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-interface.html": [ - "0dbf7bb1047b3be816ae6773218788cdf27529cb", + "css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html": [ + "286ec3f30141247b58facd09a17879d29109950c", "testharness" ], "css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-invalid.html": [ @@ -513894,7 +514613,7 @@ "testharness" ], "css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative.html": [ - "3d527c8633229d53635adff6e425a8af2b56302e", + "1490c7159f3daf01195daf92d869e2f8fa2ca70a", "testharness" ], "css/css-typed-om/stylevalue-subclasses/numeric-objects/create-a-type.tentative.html": [ @@ -513914,7 +514633,7 @@ "testharness" ], "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html": [ - "a46c2ff1bf221cd52b4546f7c07af90849d3096f", + "9d855c711332b344078fc89bac6ed67091fa1ddd", "testharness" ], "css/css-typed-om/stylevalue-subclasses/numeric-objects/cssnumericvalue-multiply-two-types.tentative.html": [ @@ -514065,10 +514784,6 @@ "30ee6179d77f18692867217c18852db94b1d10bb", "testharness" ], - "css/css-typed-om/the-stylepropertymap/interface.html": [ - "b4561da47301cde30c37e4f77ff6870b4b6d10b4", - "testharness" - ], "css/css-ui/OWNERS": [ "beeb8a77d396e48731fd1e69a922b6e2c84c2caa", "support" @@ -527286,7 +528001,7 @@ "testharness" ], "css/selectors/invalidation/matches.html": [ - "7c0c602803f2de72e1c0ee4977a04c5054fb03c5", + "8b517e6bc3465a2e8569bfe79dcb92aad38b5e78", "testharness" ], "css/selectors/invalidation/quirks-mode-stylesheet-dynamic-add-001.html": [ @@ -528326,99 +529041,99 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001-ref.html": [ - "df4d7e713c84009826a38155db2e1feca17b87d5", + "ebc61b763e8ad3c809376aa7e436800e45cf4d4f", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001.html": [ - "24d9a60f895669b90d17ffd46874f34cf0e0a4bf", + "3fe1e59ca39fa5624af76f607e756c6bac28d20a", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002-ref.html": [ - "3ff3c3fc34cb9b0b2f9ebf5ce50ff0561fc2caad", + "010a452f17fcce2a5821e0b50ba2bdb62115af3b", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002.html": [ - "bf34963d5516a632fceb9a0df203b41637734250", + "a011b5b839efdfbaf54a23eceafae3135f323ea7", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001-ref.html": [ - "671120ce75717e5d922aa5e50cd23bb0bb99440f", + "35974e8e9e3606548d3fe84c64e6f28f30297c1f", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001.html": [ - "8a7e029632f276be5672be8503a735cb93145ec1", + "09cf8775eac24d4c01b33d8f0f9fc29a4f343b0c", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002-ref.html": [ - "0d6b49d619c70c2c3812763c0515e281c68c1167", + "590adc398556a887cc05f3f37bff3557d195a81c", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002.html": [ - "258958b3a4ef48ccc7ff2ff727b9a7b103eaad79", + "c2a0549ec642d8785e18c0d254b44824f0dc0bdc", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001-ref.html": [ - "1676f2c62c37502b918a8f07574e29bb582bf434", + "8c5574d316afff4c6763d5752861d30d870b4897", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001.html": [ - "10264b8fd4f45e54d41f5529d2f2916c1e0e5d31", + "67b0ca09d6550bfee48fced29085eaa2d74afea4", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002-ref.html": [ - "f98979fb7f26d6d5c5e52db6b3777f0dd520cac8", + "4487634fc067804526dcc8c80840db66f8510843", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002.html": [ - "afce74c97255827757f29b4d19fd987248653a13", + "1eace13a5914ab6e0a295150e0c176108af837f4", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003-ref.html": [ - "8817d61abda7c77afc608798aa1ae628638cec29", + "7a6a10cc35ad9d6d0f69d2970456700d20a0f8b8", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003.html": [ - "0d9e70415f27a4d4f1447a2d6af9544cad92c024", + "1badba0c31003af31a4f949c73163e9ef08d670c", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004-ref.html": [ - "151e078eb255e7c77822701f5c79804b2afcbebf", + "60140d2dad0b5084903d37415bc95854e60b9adf", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004.html": [ - "9637f0d340d72ee5edea76e2bed4e6182cbb0c53", + "453fcaff8730433686a71aeac0268eeecaadabb8", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001-ref.html": [ - "8ef906b99dfab87396ea783505dd774f961cd14d", + "d7ad2e115df3e1f89ff603c6e015bc66dff0140f", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001.html": [ - "60c2ed16e28326f3e3f1b39b092b931c12ef93b0", + "c7fe198018916bf65e3aa552af24b2f31b55374c", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002-ref.html": [ - "8ef906b99dfab87396ea783505dd774f961cd14d", + "d7ad2e115df3e1f89ff603c6e015bc66dff0140f", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002.html": [ - "56533e4323a6326e300e432afddbd4afc790d754", + "f05e0fe981e1973c70ee7eee943b9e5bf756d59e", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003-ref.html": [ - "32036492ab25b6deb98775c58491ae492be57179", + "e0c0d19423366fc808a21af30928f5647c5715e6", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003.html": [ - "6f5954ff299e9faa9bd80753741946e46e52da72", + "6fcbb2f5218c8b1dd2c2835482d36e25f4403a7b", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004-ref.html": [ - "32036492ab25b6deb98775c58491ae492be57179", + "e0c0d19423366fc808a21af30928f5647c5715e6", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004.html": [ - "f486a79118363126e2b1d65434b2de0ee59bbfc5", + "6e33ad8a2bd85ad27e3d4ac0ac18c4f2490417a8", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/align3/reftest.list": [ @@ -530234,11 +530949,11 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004-ref.xhtml": [ - "934704e84a55fa4726c621a076aa9dff3bc45901", + "2c9b638ec5ab37bd8521437ad17ddaffcef1ccc0", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004.xhtml": [ - "1b3807a2c535091e47e5b7a4000be3d9426d0b75", + "f6895c5cddcf0e71999253b508622876ddc25252", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-height-auto-001-ref.html": [ @@ -532305,6 +533020,14 @@ "3c4a32d58a8f34a6074efc77bd3d00c21f4ea253", "support" ], + "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1-ref.html": [ + "134248109744dc452beb87c08bb37fe6fba34b06", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1.html": [ + "e7a7dba52f30626eb256bd6832fd70eea4e23e4b", + "reftest" + ], "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/moz-multicol3-column-balancing-break-inside-avoid-1-ref.html": [ "e4c519e59544140de558aff7b13b6ac3e19651c8", "support" @@ -532322,7 +533045,7 @@ "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/reftest.list": [ - "a425424ad71bb67ef8559d032227f383dafb7115", + "a434982c43b87a029e43679270492884ae2937b9", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/reftest.list": [ @@ -534465,6 +535188,38 @@ "1c7fb64084e36d93aec54a7326ffa89d5e60f871", "support" ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1-ref.html": [ + "0fd0f22afe7bdb81b7a40326c172e5ee1c68ccb3", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1.html": [ + "7a809a56f60c1b9d9306ca3c9b403b5705be2629", + "reftest" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html": [ + "3fbb0ac60628d611fb5a88e316bafda37b28324b", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2a.html": [ + "80c017a0ffd11dd8063839c46390ee1ac2b4753d", + "reftest" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2b.html": [ + "b09793a0629e5b5827b1b1db648f0226b11bd824", + "reftest" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2c.html": [ + "24998fae87313108ed068e7c138e6425331743c9", + "reftest" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2d.html": [ + "220eec725cf95a8adcd5ff71a7fa8a8026671411", + "reftest" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2e.html": [ + "00cc130b13377d1583000a5d8e269fe13d307e81", + "reftest" + ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-containing-block-dynamic-1a.html": [ "6a4dd7a18cd9d400fb704eaa8ceb0e63607eb207", "reftest" @@ -534490,7 +535245,7 @@ "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list": [ - "8b00eba5392307c2842c05d18764682c27b625d9", + "a5c020f3f28e25a1540fde327c56df33b89be873", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/transform-containing-block-dynamic-1a.html": [ @@ -535894,7 +536649,7 @@ "testharness" ], "custom-elements/Document-createElement.html": [ - "14960ee9498f6ff23c1c94d3351a8ef383e60067", + "2275720296bd3ea4ef012ed5ef3ea63a4c5f953d", "testharness" ], "custom-elements/Document-createElementNS.html": [ @@ -535994,7 +536749,7 @@ "testharness" ], "custom-elements/reactions/CSSStyleDeclaration.html": [ - "11d4f8979af248f2c4d5dc28e93e5d15822d2c78", + "cbd44b985a25eeee1c00b5c8e58a6fc0080d2551", "testharness" ], "custom-elements/reactions/ChildNode.html": [ @@ -536026,11 +536781,11 @@ "testharness" ], "custom-elements/reactions/HTMLElement.html": [ - "4c54b3e179c23375334d2b6d667ab17781c2c127", + "4682575e319941a1ccd62a3e1c8c97ac092bdbcc", "testharness" ], "custom-elements/reactions/HTMLInputElement.html": [ - "ad2bdba330235b320eda6636cd30b320d607d74f", + "ee56f4ab2948a3c536a80c9d8954f7e8baee06a4", "testharness" ], "custom-elements/reactions/HTMLOptionElement.html": [ @@ -536210,7 +536965,7 @@ "support" ], "docs/_running-tests/chrome_android.md": [ - "fab045301c74644f3feeed712b43707cac13db53", + "32e0d149423f84c3602ee1f87a83746bf331f582", "support" ], "docs/_running-tests/index.md": [ @@ -557081,6 +557836,10 @@ "3cc3df0d6b19a14ab979e2fffedce95e8380fca8", "testharness" ], + "html/semantics/forms/the-input-element/image-click-form-data.html": [ + "c258a5ee47cf843585bb65d81841a121eec5316c", + "testharness" + ], "html/semantics/forms/the-input-element/image01-ref.html": [ "9ff11164254c68977111a83071345360b0789812", "support" @@ -557205,6 +557964,10 @@ "4ae5c353389d6b5776acd56a0cdb4bb1a405e6cf", "testharness" ], + "html/semantics/forms/the-input-element/resources/image-submit-click.html": [ + "cf227a340c0a552c665880d1c517cd572d1cf38b", + "support" + ], "html/semantics/forms/the-input-element/search_input.html": [ "09007bf5a204053412838612e97d64c21a596315", "testharness" @@ -561698,7 +562461,7 @@ "testharness" ], "html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html": [ - "8bbb29655a28bc76708e802d617a5a6046b4e4b0", + "98839f498553aba4667c2dce4503f8ccc5189895", "testharness" ], "html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events-attached-in-event.html": [ @@ -562249,6 +563012,10 @@ "14a90aae85ba0822b3dc7113a42cded55395765b", "support" ], + "interfaces/css-typed-om.idl": [ + "de163687e4848c63126511aff81a80eabe2cd9c0", + "support" + ], "interfaces/cssom-view.idl": [ "3f575def818098d376ddf069673692530fcf8896", "support" @@ -563318,7 +564085,7 @@ "testharness" ], "media-source/mediasource-endofstream.html": [ - "652c8d980e48fc79525f3adc2931af9c3a23d464", + "ca2fc793b97e552b0250e3df9877e10cde930735", "testharness" ], "media-source/mediasource-errors.html": [ @@ -572157,6 +572924,34 @@ "dc978fd8669d67118109fcab245010fdd7d799b0", "testharness" ], + "picture-in-picture/disable-picture-in-picture.html": [ + "887338e9330b4d94d007685c2a511cf285bb0c3e", + "testharness" + ], + "picture-in-picture/enter-picture-in-picture.html": [ + "c0d29867a380b7e780ed14c229fa5598626a75aa", + "testharness" + ], + "picture-in-picture/exit-picture-in-picture.html": [ + "b1103b96927872de07fc6eb5f34668a0267da6a2", + "testharness" + ], + "picture-in-picture/not-processing-user-gesture.html": [ + "0bfb194f9fd96db340177d8ff9e62becb1dd9f5e", + "testharness" + ], + "picture-in-picture/picture-in-picture-element.html": [ + "72f2d3b885be8f7268df828f7758b1bc05334d5e", + "testharness" + ], + "picture-in-picture/request-picture-in-picture.html": [ + "19af9c84b70782925a2f8dad4f712fad94b69c14", + "testharness" + ], + "picture-in-picture/resources/picture-in-picture-helpers.js": [ + "84462753efc9803a053e3675b850654c0e57ca93", + "support" + ], "pointerevents/OWNERS": [ "e76cae8532b1259fa8665b515468d0b25b0a9bb3", "support" @@ -580662,7 +581457,7 @@ "testharness" ], "resource-timing/resource_TAO_origin.htm": [ - "bd7572f9790c69cf76e31c2c1cc7d4c3bd35da4c", + "7e5ddf2c6f14b47b01cf5baa8981f56eba29c48b", "testharness" ], "resource-timing/resource_TAO_origin_uppercase.htm": [ @@ -580678,7 +581473,7 @@ "testharness" ], "resource-timing/resource_TAO_zero.htm": [ - "174444cc2f9b8e505bcf35343522f74c792bd997", + "9a726de380cf901dd8af2d20d6ab7741640bba65", "testharness" ], "resource-timing/resource_cached.htm": [ @@ -582297,6 +583092,10 @@ "68deaada4bc6996777980c0b0b69bf9da4689eb4", "testharness" ], + "service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html": [ + "d47dca843653f7ab564d2e006067f756ae1efe97", + "testharness" + ], "service-workers/service-worker/fetch-canvas-tainting-video.https.html": [ "54838009a0f9d724f0088adab56173526597385b", "testharness" @@ -582337,6 +583136,10 @@ "ce7e7cf76aace24a92d455cdb6b54fc9048960e8", "testharness" ], + "service-workers/service-worker/fetch-event-respond-with-body-loaded-in-chunk.https.html": [ + "ce480de45a03c7c9f6b58cf4a91359ffb9a29e74", + "testharness" + ], "service-workers/service-worker/fetch-event-respond-with-custom-response.https.html": [ "fc304fa03a33021e4141d940835824883415279e", "testharness" @@ -582345,6 +583148,10 @@ "c0e976149cf49c09f52b81159d2a48c301a4aa4b", "testharness" ], + "service-workers/service-worker/fetch-event-respond-with-readable-stream-chunk.https.html": [ + "3d70e8ed429f0711f480bb3f0c6e01b49cefffa1", + "testharness" + ], "service-workers/service-worker/fetch-event-respond-with-readable-stream.https.html": [ "37c7959e58af70f3feea0f4fb46d778734a0296b", "testharness" @@ -582418,7 +583225,7 @@ "testharness" ], "service-workers/service-worker/fetch-request-resources.https.html": [ - "cb072581704868845fe1ec57b3e7c70d53bac543", + "d21ef5a4263e26cd3053a89171e2597424eaad82", "testharness" ], "service-workers/service-worker/fetch-request-xhr-sync.https.html": [ @@ -582774,7 +583581,7 @@ "testharness" ], "service-workers/service-worker/request-end-to-end.https.html": [ - "ee9f8140b492daf89cb715643ee40557f6ed904e", + "e93efe04f35ff8c9ce15969a7b3f6373b098c4a8", "testharness" ], "service-workers/service-worker/resource-timing.https.html": [ @@ -582878,7 +583685,7 @@ "support" ], "service-workers/service-worker/resources/client-navigate-worker.js": [ - "876f60f8c7112cc0a7a2df2fe2b298a3c9504214", + "6d4712b6398cdafa95fc5101e9fffe10eb43311f", "support" ], "service-workers/service-worker/resources/client-navigated-frame.html": [ @@ -583006,7 +583813,7 @@ "support" ], "service-workers/service-worker/resources/fetch-access-control.py": [ - "be1cb7ce3d6346a98d35a6c19d7a3bf656f9373b", + "7e5031aa9ab0cb40b037f517f620fad3d0314269", "support" ], "service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html": [ @@ -583049,6 +583856,10 @@ "95ae0c97941a6b1645690e8504e7de8c6be634b1", "support" ], + "service-workers/service-worker/resources/fetch-event-network-fallback-worker.js": [ + "de6a6c51a341e60590752c4a147527777146d333", + "support" + ], "service-workers/service-worker/resources/fetch-event-respond-with-argument-iframe.html": [ "6ae750c3e69e6fecde17ba1d026391b151bc0ebb", "support" @@ -583057,6 +583868,10 @@ "b58b92a145a89f71c414de5e837c1db026beb1d6", "support" ], + "service-workers/service-worker/resources/fetch-event-respond-with-body-loaded-in-chunk-worker.js": [ + "b044c62224d56bfd1e3b25ce4e2700ed6231f0ed", + "support" + ], "service-workers/service-worker/resources/fetch-event-respond-with-custom-response-worker.js": [ "a5d0d55ccfa7c3c4c285153aa14b81ef205329c9", "support" @@ -583065,6 +583880,10 @@ "6054d723ad0d0d310b02841b696d2357e7137398", "support" ], + "service-workers/service-worker/resources/fetch-event-respond-with-readable-stream-chunk-worker.js": [ + "fc2c81a984f43bb1a83ed1e830c7a35c0b5f7538", + "support" + ], "service-workers/service-worker/resources/fetch-event-respond-with-readable-stream-worker.js": [ "052da5a0a6b26098fe745fd6d9ca8de0f4dfdc5b", "support" @@ -583182,7 +584001,7 @@ "support" ], "service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html": [ - "72a1a0895f9b511075f77c618c8ab0aabd177346", + "2879ba75fc0135aa9220f5eb5d7e00b8bcf1cbcc", "support" ], "service-workers/service-worker/resources/fetch-request-xhr-sync-iframe.html": [ @@ -583477,6 +584296,14 @@ "4ccc1681cd016327aafed77210afe6ed1cc8c04a", "support" ], + "service-workers/service-worker/resources/range-request-to-different-origins-worker.js": [ + "7f6473346cc122121af96a81709bee384da50ea9", + "support" + ], + "service-workers/service-worker/resources/range-request-with-different-cors-modes-worker.js": [ + "5bd4a3d199a24ea091b28bc7d211bdf8612cd10f", + "support" + ], "service-workers/service-worker/resources/redirect-worker.js": [ "1b3f47b922f1bdd14adfdf6eca5bc308a4186301", "support" @@ -583494,7 +584321,7 @@ "support" ], "service-workers/service-worker/resources/register-closed-window-iframe.html": [ - "18ee27c8d6a5497bf16b3315ba9eee2b474154b5", + "aa9a0825844b3bc13eee96dc6eeffcf887ee2b72", "support" ], "service-workers/service-worker/resources/register-iframe.html": [ @@ -588213,6 +589040,10 @@ "62c6ecf218173f1273cbd2bd12f01dcf666170a4", "reftest" ], + "svg/path/distance/pathLength-positive-percentage.svg": [ + "f76d370e573ed5fadcee8e2bd4bb531f969d53e6", + "reftest" + ], "svg/path/distance/pathLength-positive-ref.svg": [ "051786ae8a8510f97dec152a88541f8d16c6767f", "support" @@ -588221,6 +589052,14 @@ "33dc24b00e6ad879519fcfd593179ee2c1903006", "reftest" ], + "svg/path/distance/pathLength-zero-percentage-ref.svg": [ + "eaaf5697c4770475c4db221879e2d6a45e373d8e", + "support" + ], + "svg/path/distance/pathLength-zero-percentage.svg": [ + "64d4bdf51da60cd990774284a7ffc58d9c6409f6", + "reftest" + ], "svg/path/distance/pathLength-zero-ref.svg": [ "b47a9aa3a1a5901e97a5f92d056221b8882a2a19", "support" @@ -590550,11 +591389,11 @@ "testharness" ], "web-animations/animation-model/animation-types/property-list.js": [ - "a3a0b0e9232416125e385dcf4df0812a2fce39e2", + "d43568b85e47f0284d1084134e043cb04e67d948", "support" ], "web-animations/animation-model/animation-types/property-types.js": [ - "ceaeb9c4a67019e68423f7cde888067c3384d756", + "d5ccae3dd857f15eab45de2e70b332aaa126a575", "support" ], "web-animations/animation-model/animation-types/visibility.html": [ @@ -590774,7 +591613,7 @@ "support" ], "web-animations/testcommon.js": [ - "de3f89d5ed07d00d453746df5d13387d15f05016", + "6f3e85e7ae7786ad9ff3aaec8c6343642d2510c5", "support" ], "web-animations/timing-model/animation-effects/active-time.html": [ @@ -591041,6 +591880,10 @@ "70e0f890a721786f8afa4cd032e75ef85b5fc6bb", "support" ], + "webaudio/resources/stereopanner-testing.js": [ + "dc02b4fad40f381d924db447a3d955e4455fd561", + "support" + ], "webaudio/the-audio-api/the-analysernode-interface/.gitkeep": [ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" @@ -591249,6 +592092,18 @@ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" ], + "webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html": [ + "b3525a2c459125281196201216417c39030e79a8", + "testharness" + ], + "webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.html": [ + "5654219a5816d603260c33b4d72030e89e8c63d9", + "testharness" + ], + "webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning.html": [ + "4f49a7d5726c922676d350613679c9c441ff6c65", + "testharness" + ], "webaudio/the-audio-api/the-waveshapernode-interface/.gitkeep": [ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" @@ -591257,6 +592112,22 @@ "f88431616d6a8084a3434c1606e3543178d019fb", "testharness" ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-copy-curve.html": [ + "28cc01fdd27a3ff88f2e886bc625d4dfd15db742", + "testharness" + ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-limits.html": [ + "0f0bc85ae22f33e920c3970dd5ffe48507b3e587", + "testharness" + ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-simple.html": [ + "cb83468955273ba4f280fe99088d724f1da58476", + "testharness" + ], + "webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html": [ + "84975ca29be6d977ed238a46ff6597959ab05047", + "testharness" + ], "webauthn/OWNERS": [ "368ab4153a7f6843ce65ce924a3b4af92f3488ee", "support" @@ -592442,7 +593313,7 @@ "testharness" ], "webrtc/historical.html": [ - "918bdc69f500ff726dc98643b418f14ac5ba3c3a", + "d0579ad82d492ba5cd957561ca70b5b8a344452c", "testharness" ], "webrtc/identity-helper.js": [ @@ -593890,7 +594761,7 @@ "testharness" ], "webvtt/api/VTTRegion/constructor.html": [ - "c002fac0ad6077fe44987393159f7d86c1226e84", + "501828089ebb3d3521045c392230379668529f42", "testharness" ], "webvtt/api/VTTRegion/id.html": [ @@ -593898,7 +594769,7 @@ "testharness" ], "webvtt/api/VTTRegion/lines.html": [ - "590cec0b814df0bca2760cde94b2f74b4c9defca", + "ac35f25e77c0430b4776435c07f908f990de1fb0", "testharness" ], "webvtt/api/VTTRegion/non-visible-cue-with-region.html": [ diff --git a/tests/wpt/metadata/css/css-fonts/font-feature-settings-serialization-001.html.ini b/tests/wpt/metadata/css/css-fonts/font-feature-settings-serialization-001.html.ini index 3efcba59161..c35d38b9e91 100644 --- a/tests/wpt/metadata/css/css-fonts/font-feature-settings-serialization-001.html.ini +++ b/tests/wpt/metadata/css/css-fonts/font-feature-settings-serialization-001.html.ini @@ -2,3 +2,6 @@ [font-feature-settings should have its feature tag serialized with double quotes] expected: FAIL + [font-feature-settings should be serialized with double quotes, and the default value of 1 should be omitted] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-1.html.ini b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-1.html.ini new file mode 100644 index 00000000000..f10a8cf7451 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-1.html.ini @@ -0,0 +1,2 @@ +[individual-transform-1.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2a.html.ini b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2a.html.ini new file mode 100644 index 00000000000..7d934b36ae2 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2a.html.ini @@ -0,0 +1,2 @@ +[individual-transform-2a.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2b.html.ini b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2b.html.ini new file mode 100644 index 00000000000..bf8df442cb5 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2b.html.ini @@ -0,0 +1,2 @@ +[individual-transform-2b.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2c.html.ini b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2c.html.ini new file mode 100644 index 00000000000..fb9e5d4d3a9 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2c.html.ini @@ -0,0 +1,2 @@ +[individual-transform-2c.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2d.html.ini b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2d.html.ini new file mode 100644 index 00000000000..414a8fd4963 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2d.html.ini @@ -0,0 +1,2 @@ +[individual-transform-2d.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2e.html.ini b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2e.html.ini new file mode 100644 index 00000000000..b20094b7cc1 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/individual-transform/individual-transform-2e.html.ini @@ -0,0 +1,2 @@ +[individual-transform-2e.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/transform-transformed-tr-percent-height-child.html.ini b/tests/wpt/metadata/css/css-transforms/transform-transformed-tr-percent-height-child.html.ini new file mode 100644 index 00000000000..e26a0479b33 --- /dev/null +++ b/tests/wpt/metadata/css/css-transforms/transform-transformed-tr-percent-height-child.html.ini @@ -0,0 +1,2 @@ +[transform-transformed-tr-percent-height-child.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini deleted file mode 100644 index 26435e28b09..00000000000 --- a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[vh_not_refreshing_on_chrome.html] - expected: FAIL diff --git a/tests/wpt/metadata/css/selectors/invalidation/matches.html.ini b/tests/wpt/metadata/css/selectors/invalidation/matches.html.ini index 197e801c83b..73b8f36c9b9 100644 --- a/tests/wpt/metadata/css/selectors/invalidation/matches.html.ini +++ b/tests/wpt/metadata/css/selectors/invalidation/matches.html.ini @@ -8,3 +8,12 @@ [Invalidate :matches() for compound selector arguments.] expected: FAIL + [Invalidate :matches() for complex selector arguments.] + expected: FAIL + + [Invalidate nested :matches().] + expected: FAIL + + [Test specificity of :matches().] + expected: FAIL + diff --git a/tests/wpt/metadata/custom-elements/Document-createElement.html.ini b/tests/wpt/metadata/custom-elements/Document-createElement.html.ini new file mode 100644 index 00000000000..b3c0d410753 --- /dev/null +++ b/tests/wpt/metadata/custom-elements/Document-createElement.html.ini @@ -0,0 +1,4 @@ +[Document-createElement.html] + [document.createElement with unknown "is" value should create "undefined" state element] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/image-click-form-data.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/image-click-form-data.html.ini new file mode 100644 index 00000000000..f2e2235e321 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/image-click-form-data.html.ini @@ -0,0 +1,5 @@ +[image-click-form-data.html] + expected: TIMEOUT + [Image submit button should not add extra form data if 'value' attribute is present with non-empty value] + expected: TIMEOUT + diff --git a/tests/wpt/web-platform-tests/.travis.yml b/tests/wpt/web-platform-tests/.travis.yml index 287c6337cbd..7e81ffcfe10 100644 --- a/tests/wpt/web-platform-tests/.travis.yml +++ b/tests/wpt/web-platform-tests/.travis.yml @@ -73,7 +73,7 @@ matrix: python: "2.7" env: - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:MicrosoftEdge:14.14393 PLATFORM='Windows 10' + - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:MicrosoftEdge:16.16299 PLATFORM='Windows 10' - python: 2.7 env: JOB=tools_unittest TOXENV=py27 HYPOTHESIS_PROFILE=ci SCRIPT=tools/ci/ci_tools_unittest.sh - python: 3.6 @@ -97,7 +97,7 @@ matrix: - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=chrome:dev - env: - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:MicrosoftEdge:14.14393 PLATFORM='Windows 10' + - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:MicrosoftEdge:16.16299 PLATFORM='Windows 10' - env: - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=sauce:safari:11.0 PLATFORM='macOS 10.12' diff --git a/tests/wpt/web-platform-tests/2dcontext/building-paths/canvas_complexshapes_arcto_001-ref.htm b/tests/wpt/web-platform-tests/2dcontext/building-paths/canvas_complexshapes_arcto_001-ref.htm index 5a1ea381aaf..6fc212ea482 100644 --- a/tests/wpt/web-platform-tests/2dcontext/building-paths/canvas_complexshapes_arcto_001-ref.htm +++ b/tests/wpt/web-platform-tests/2dcontext/building-paths/canvas_complexshapes_arcto_001-ref.htm @@ -4,7 +4,6 @@ <title>HTML5 Canvas Test: arcTo() adds to subpath if same point</title> <link rel="author" title="Microsoft" href="http://www.microsoft.com" /> </head> - lol <body> <p>Description: If x1,y1 and x2,y2 are the same point, then arcTo must add x1,y1 to the subpath, and connect that point to x0,y0 with a straight line.</p> <div><img src="/images/canvas-line.png" alt="line" /></div> diff --git a/tests/wpt/web-platform-tests/2dcontext/imagebitmap/common.sub.js b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/common.sub.js index d76a42d5a1f..d4d84193919 100644 --- a/tests/wpt/web-platform-tests/2dcontext/imagebitmap/common.sub.js +++ b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/common.sub.js @@ -43,13 +43,34 @@ function makeVideo() { }); } +function makeDataUrlVideo() { + const toDataUrl = (type, buffer) => { + const encoded = btoa(String.fromCodePoint(...new Uint8Array(buffer))); + return `data:${type};base64,${encoded}` + }; + + return fetch(getVideoURI("/images/pattern")) + .then(response => Promise.all([response.headers.get("Content-Type"), response.arrayBuffer()])) + .then(([type, data]) => { + return new Promise(function(resolve, reject) { + var video = document.createElement("video"); + video.oncanplaythrough = function() { + resolve(video); + }; + video.onerror = reject; + video.src = toDataUrl(type, data); + }); + }); +} + function makeMakeHTMLImage(src) { return function() { - return new Promise(resolve => { + return new Promise((resolve, reject) => { var img = new Image(); img.onload = function() { resolve(img); }; + img.onerror = reject; img.src = src; }); } @@ -115,6 +136,7 @@ function makeBlob() { var imageSourceTypes = [ { name: 'an HTMLCanvasElement', factory: makeCanvas }, { name: 'an HTMLVideoElement', factory: makeVideo }, + { name: 'an HTMLVideoElement from a data URL', factory: makeDataUrlVideo }, { name: 'a bitmap HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.png") }, { name: 'a vector HTMLImageElement', factory: makeMakeHTMLImage("/images/pattern.svg") }, { name: 'a bitmap SVGImageElement', factory: makeMakeSVGImage("/images/pattern.png") }, diff --git a/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html index 4fe8a83d87e..9146a3704ba 100644 --- a/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html +++ b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html @@ -10,25 +10,28 @@ <link rel="stylesheet" href="/common/canvas-tests.css"> <body> <script> -function testCanvasDisplayingPattern(canvas) +function testCanvasDisplayingPattern(canvas, width, height) { - var tolerance = 5; // for creating ImageBitmap from a video, the tolerance needs to be high - _assertPixelApprox(canvas, 5,5, 255,0,0,255, "5,5", "255,0,0,255", tolerance); - _assertPixelApprox(canvas, 15,5, 0,255,0,255, "15,5", "0,255,0,255", tolerance); - _assertPixelApprox(canvas, 5,15, 0,0,255,255, "5,15", "0,0,255,255", tolerance); - _assertPixelApprox(canvas, 15,15, 0,0,0,255, "15,15", "0,0,0,255", tolerance); + var tolerance = 10; // for creating ImageBitmap from a video, the tolerance needs to be high + const check = (x, y, r, g, b, a) => + _assertPixelApprox(canvas, x,y, r,g,b,a, `${x},${y}`, `${r},${g},${b},${a}`, tolerance); + check(1 * width / 4, 1 * height / 4, 255,0,0,255); + check(3 * width / 4, 1 * height / 4, 0,255,0,255); + check(1 * width / 4, 3 * height / 4, 0,0,255,255); + check(3 * width / 4, 3 * height / 4, 0,0,0,255); } -function testDrawImageBitmap(source, args = []) +function testDrawImageBitmap(source, args = [], { resizeWidth = 20, resizeHeight = 20 } = {}) { var canvas = document.createElement("canvas"); - canvas.width = 20; - canvas.height = 20; + canvas.width = resizeWidth; + canvas.height = resizeHeight; var ctx = canvas.getContext("2d"); - ctx.clearRect(0, 0, canvas.width, canvas.height); return createImageBitmap(source, ...args).then(imageBitmap => { + assert_equals(imageBitmap.width, resizeWidth); + assert_equals(imageBitmap.height, resizeHeight); ctx.drawImage(imageBitmap, 0, 0); - testCanvasDisplayingPattern(canvas); + testCanvasDisplayingPattern(canvas, resizeWidth, resizeHeight); }); } @@ -41,6 +44,27 @@ for (let { name, factory } of imageSourceTypes) { promise_test(function() { return factory().then(function(img) { + const options = { resizeWidth: 10, resizeHeight: 10 }; + return testDrawImageBitmap(img, [options], options); + }); + }, `createImageBitmap from ${name} scaled down, and drawImage on the created ImageBitmap`); + + promise_test(function() { + return factory().then(function(img) { + const options = { resizeWidth: 40, resizeHeight: 40 }; + return testDrawImageBitmap(img, [options], options); + }); + }, `createImageBitmap from ${name} scaled up, and drawImage on the created ImageBitmap`); + + promise_test(function() { + return factory().then(function(img) { + const options = { resizeWidth: 10, resizeHeight: 40 }; + return testDrawImageBitmap(img, [options], options); + }); + }, `createImageBitmap from ${name} resized, and drawImage on the created ImageBitmap`); + + promise_test(function() { + return factory().then(function(img) { return testDrawImageBitmap(img, [20, 20, -20, -20]); }); }, `createImageBitmap from ${name} with negative sw/sh, and drawImage on the created ImageBitmap`); diff --git a/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html index 1b24bca92bd..7f5588eb6d5 100644 --- a/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html +++ b/tests/wpt/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html @@ -59,6 +59,18 @@ const arguments = [ }, { + name: "redirected to cross-origin HTMLVideoElement", + factory: () => { + return new Promise((resolve, reject) => { + const video = document.createElement("video"); + video.oncanplaythrough = () => resolve(video); + video.onerror = reject; + video.src = "/common/redirect.py?location=" + getVideoURI("http://{{domains[www1]}}:{{ports[http][0]}}/media/movie_300"); + }); + }, + }, + + { name: "unclean HTMLCanvasElement", factory: () => { return makeImage().then(image => { diff --git a/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html b/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html new file mode 100644 index 00000000000..b550e4d0a96 --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_readAsBinaryString.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>FileAPI Test: filereader_readAsBinaryString</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<link rel="help" href="https://w3c.github.io/FileAPI/#readAsBinaryString"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + +async_test(t => { + const blob = new Blob(["σ"]); + const reader = new FileReader(); + + reader.onload = t.step_func_done(() => { + assert_equals(typeof reader.result, "string", "The result is string"); + assert_equals(reader.result.length, 2, "The result length is 2"); + assert_equals(reader.result, "\xcf\x83", "The result is \xcf\x83"); + assert_equals(reader.readyState, reader.DONE); + }); + + reader.onloadstart = t.step_func(() => { + assert_equals(reader.readyState, reader.LOADING); + }); + + reader.onprogress = t.step_func(() => { + assert_equals(reader.readyState, reader.LOADING); + }); + + reader.readAsBinaryString(blob); +}); + +</script> diff --git a/tests/wpt/web-platform-tests/FileAPI/url/url-in-tags-revoke.window.js b/tests/wpt/web-platform-tests/FileAPI/url/url-in-tags-revoke.window.js new file mode 100644 index 00000000000..e610e0bff28 --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/url/url-in-tags-revoke.window.js @@ -0,0 +1,33 @@ +async_test(t => { + const run_result = 'test_frame_OK'; + const blob_contents = '<!doctype html>\n<meta charset="utf-8">\n' + + '<script>window.test_result = "' + run_result + '";</script>'; + const blob = new Blob([blob_contents], {type: 'text/html'}); + const url = URL.createObjectURL(blob); + + const frame = document.createElement('iframe'); + frame.setAttribute('src', url); + frame.setAttribute('style', 'display:none;'); + document.body.appendChild(frame); + URL.revokeObjectURL(url); + + frame.onload = t.step_func_done(() => { + assert_equals(frame.contentWindow.test_result, run_result); + }); +}, 'Fetching a blob URL immediately before revoking it works in an iframe.'); + +async_test(t => { + const run_result = 'test_script_OK'; + const blob_contents = 'window.script_test_result = "' + run_result + '";'; + const blob = new Blob([blob_contents]); + const url = URL.createObjectURL(blob); + + const e = document.createElement('script'); + e.setAttribute('src', url); + e.onload = t.step_func_done(() => { + assert_equals(window.script_test_result, run_result); + }); + + document.body.appendChild(e); + URL.revokeObjectURL(url); +}, 'Fetching a blob URL immediately before revoking it works in <script> tags.'); diff --git a/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-allowed-target-blank.sub.html b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-allowed-target-blank.sub.html new file mode 100644 index 00000000000..46747b76885 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-allowed-target-blank.sub.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>form-action-src-redirect-allowed-target-blank</title> + <meta http-equiv="Content-Security-Policy" content="form-action 'self'"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + function OnDocumentLoaded() { + let test = async_test("form submission targetting _blank allowed after a redirect"); + window.addEventListener("message", function(event) { + if (event.data == "DocumentNotBlocked") { + event.source.close(); + test.done(); + } + }); + + let form = document.getElementById("form"); + form.action = + "/content-security-policy/form-action/support/post-message-to-opener.sub.html"; + + let submit = document.getElementById("submit"); + submit.click(); + } + </script> +</head> +<body onload="OnDocumentLoaded();"> + <form id="form" method="GET" target="_blank"> + <input type="hidden" name="message" value="DocumentNotBlocked"> + <input type="submit" id="submit"> + </form> +</body> +</html> + diff --git a/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-allowed-target-frame.sub.html b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-allowed-target-frame.sub.html new file mode 100644 index 00000000000..81921d395e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-allowed-target-frame.sub.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>form-action-src-allowed-target-frame</title> + <meta http-equiv="Content-Security-Policy" content="form-action 'self'"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + function OnDocumentLoaded() { + let test = async_test("form submission targetting a frame allowed"); + window.addEventListener("message", function(event) { + if (event.data == "DocumentNotBlocked") { + test.done(); + } + }); + + let form = document.getElementById("form"); + form.action = + "/content-security-policy/form-action/support/post-message-to-parent.sub.html"; + + let submit = document.getElementById("submit"); + submit.click(); + } + </script> +</head> +<body onload="OnDocumentLoaded();"> + <form id="form" method="GET" target="frame"> + <input type="hidden" name="message" value="DocumentNotBlocked"> + <input type="submit" id="submit"> + </form> + <iframe name="frame"></iframe> +</body> +</html> + diff --git a/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-redirect-allowed-target-blank.sub.html b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-redirect-allowed-target-blank.sub.html new file mode 100644 index 00000000000..41c68b68f9e --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-redirect-allowed-target-blank.sub.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>form-action-src-redirect-allowed-target-blank</title> + <meta http-equiv="Content-Security-Policy" content="form-action 'self'"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + function OnDocumentLoaded() { + let test = async_test("form submission targetting _blank allowed after a redirect"); + window.addEventListener("message", function(event) { + if (event.data == "DocumentNotBlocked") { + event.source.close(); + test.done(); + } + }); + + let form = document.getElementById("form"); + let final_url = "/content-security-policy/form-action/support/post-message-to-opener.sub.html?message=DocumentNotBlocked"; + let redirect_url = "/common/redirect.py?location="; + form.action = redirect_url + encodeURIComponent(final_url); + + let submit = document.getElementById("submit"); + submit.click(); + } + </script> +</head> +<body onload="OnDocumentLoaded();"> + <form id="form" method="POST" target="_blank"> + <input type="submit" id="submit"> + </form> +</body> +</html> + diff --git a/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-redirect-allowed-target-frame.sub.html b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-redirect-allowed-target-frame.sub.html new file mode 100644 index 00000000000..6afd4459b0f --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/form-action/form-action-src-redirect-allowed-target-frame.sub.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title>form-action-src-redirect-allowed-target-frame</title> + <meta http-equiv="Content-Security-Policy" content="form-action 'self'"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + function OnDocumentLoaded() { + let test = async_test("form submission targetting a frame allowed after a redirect"); + window.addEventListener("message", function(event) { + if (event.data == "DocumentNotBlocked") { + test.done(); + } + }); + + let form = document.getElementById("form"); + let final_url = "/content-security-policy/form-action/support/post-message-to-parent.sub.html?message=DocumentNotBlocked"; + let redirect_url = "/common/redirect.py?location="; + form.action = redirect_url + encodeURIComponent(final_url); + + let submit = document.getElementById("submit"); + submit.click(); + } + </script> +</head> +<body onload="OnDocumentLoaded();"> + <form id="form" method="POST" target="frame"> + <input type="submit" id="submit"> + </form> + <iframe name="frame"></iframe> +</body> +</html> + diff --git a/tests/wpt/web-platform-tests/content-security-policy/form-action/support/post-message-to-opener.sub.html b/tests/wpt/web-platform-tests/content-security-policy/form-action/support/post-message-to-opener.sub.html new file mode 100644 index 00000000000..0348139057d --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/form-action/support/post-message-to-opener.sub.html @@ -0,0 +1,3 @@ +<script> + opener.postMessage("{{GET[message]}}", "*"); +</script> diff --git a/tests/wpt/web-platform-tests/content-security-policy/form-action/support/post-message-to-parent.sub.html b/tests/wpt/web-platform-tests/content-security-policy/form-action/support/post-message-to-parent.sub.html new file mode 100644 index 00000000000..63e464be21a --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/form-action/support/post-message-to-parent.sub.html @@ -0,0 +1,3 @@ +<script> + parent.postMessage("{{GET[message]}}", "*"); +</script> diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-multiple-violations-02.html b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-multiple-violations-02.html index f604e75cb89..d9f7da33388 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-multiple-violations-02.html +++ b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-multiple-violations-02.html @@ -12,7 +12,7 @@ <body> <script> for (var i = 0; i<5; i++) - setTimeout("alert('PASS: setTimeout #" + i + " executed.');", 0); + setTimeout("document.body.innerHTML += ('<p>PASS: setTimeout #" + i + " executed.');", 0); </script> <script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=script-src%20%27unsafe-inline%27%20%27self%27&reportCount=1'></script> </body> diff --git a/tests/wpt/web-platform-tests/content-security-policy/support/dedicated-worker-helper.js b/tests/wpt/web-platform-tests/content-security-policy/support/dedicated-worker-helper.js new file mode 100644 index 00000000000..c1ed208e931 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/support/dedicated-worker-helper.js @@ -0,0 +1,2 @@ +var url = new URL("../support/ping.js", document.baseURI).toString(); +assert_worker_is_loaded(url, document.getElementById("foo").getAttribute("data-desc-fallback"));
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/support/service-worker-helper.js b/tests/wpt/web-platform-tests/content-security-policy/support/service-worker-helper.js new file mode 100644 index 00000000000..4e8f8b5f5d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/support/service-worker-helper.js @@ -0,0 +1,2 @@ +var url = new URL("../support/ping.js", document.baseURI).toString(); +assert_service_worker_is_loaded(url, document.getElementById("foo").getAttribute("data-desc-fallback"));
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/support/shared-worker-helper.js b/tests/wpt/web-platform-tests/content-security-policy/support/shared-worker-helper.js new file mode 100644 index 00000000000..d0637ec4717 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/support/shared-worker-helper.js @@ -0,0 +1,2 @@ +var url = new URL("../support/ping.js", document.baseURI).toString(); +assert_shared_worker_is_loaded(url, document.getElementById("foo").getAttribute("data-desc-fallback"));
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html new file mode 100644 index 00000000000..9c37dfb6301 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for dedicated worker allowed by child-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.--> +<meta http-equiv="Content-Security-Policy" content="child-src 'self'; script-src 'none' 'nonce-foo'; default-src 'none'; "> +<script src="../support/dedicated-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by child-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html new file mode 100644 index 00000000000..5bded3f59a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for dedicated worker allowed by default-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<meta http-equiv="Content-Security-Policy" content="default-src 'self'"> +<script src="../support/dedicated-worker-helper.js" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by default-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html new file mode 100644 index 00000000000..ca922076762 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for dedicated worker allowed by script-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<meta http-equiv="Content-Security-Policy" content="script-src 'self'; default-src 'none'; "> +<script src="../support/dedicated-worker-helper.js" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by script-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html new file mode 100644 index 00000000000..06e79db0062 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for dedicated worker allowed by worker-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.--> +<meta http-equiv="Content-Security-Policy" content="worker-src 'self'; child-src 'none'; script-src 'none' 'nonce-foo'; default-src 'none'; "> +<script src="../support/dedicated-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by worker-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html new file mode 100644 index 00000000000..0053b1098aa --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for service worker allowed by child-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.--> +<meta http-equiv="Content-Security-Policy" content="child-src 'self'; script-src 'none' 'nonce-foo'; default-src 'none'; "> +<script src="../support/service-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin service worker allowed by child-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html new file mode 100644 index 00000000000..f9df743909f --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for service worker allowed by default-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<meta http-equiv="Content-Security-Policy" content="default-src 'self'"> +<script src="../support/service-worker-helper.js" id="foo" data-desc-fallback="Same-origin service worker allowed by default-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html new file mode 100644 index 00000000000..ce03f24f176 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for service worker allowed by script-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<meta http-equiv="Content-Security-Policy" content="script-src 'self'; default-src 'none'; "> +<script src="../support/service-worker-helper.js" id="foo" data-desc-fallback="Same-origin service worker allowed by script-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html new file mode 100644 index 00000000000..58bc8cdb7a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for service worker allowed by worker-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.--> +<meta http-equiv="Content-Security-Policy" content="worker-src 'self'; child-src 'none'; script-src 'none' 'nonce-foo'; default-src 'none'; "> +<script src="../support/service-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin service worker allowed by worker-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html new file mode 100644 index 00000000000..53510852ef0 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for shared worker allowed by child-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.--> +<meta http-equiv="Content-Security-Policy" content="child-src 'self'; script-src 'none' 'nonce-foo'; default-src 'none'; "> +<script src="../support/shared-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin shared worker allowed by child-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html new file mode 100644 index 00000000000..4a07db76aae --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for shared worker allowed by default-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<meta http-equiv="Content-Security-Policy" content="default-src 'self'"> +<script src="../support/shared-worker-helper.js" id="foo" data-desc-fallback="Same-origin shared worker allowed by default-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html new file mode 100644 index 00000000000..0a854da3ad2 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html @@ -0,0 +1,8 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for shared worker allowed by script-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<meta http-equiv="Content-Security-Policy" content="script-src 'self'; default-src 'none'; "> +<script src="../support/shared-worker-helper.js" id="foo" data-desc-fallback="Same-origin shared worker allowed by script-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html new file mode 100644 index 00000000000..353a3a0d51b --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html @@ -0,0 +1,9 @@ +<!doctype html> +<meta charset=utf-8> +<title>Web platform test for shared worker allowed by worker-src self</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src="../support/testharness-helper.js"></script> +<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.--> +<meta http-equiv="Content-Security-Policy" content="worker-src 'self'; child-src 'none'; script-src 'none' 'nonce-foo'; default-src 'none'; "> +<script src="../support/shared-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin shared worker allowed by worker-src 'self'."></script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-fonts/font-feature-settings-serialization-001.html b/tests/wpt/web-platform-tests/css/css-fonts/font-feature-settings-serialization-001.html index 025afa2e963..bccc3cf202f 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/font-feature-settings-serialization-001.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/font-feature-settings-serialization-001.html @@ -20,7 +20,7 @@ const div = document.querySelector("#test"); const div1 = document.querySelector("#test1"); test(function() { - assert_equals(getComputedStyle(div).fontFeatureSettings, '"vert" 1'); - assert_equals(getComputedStyle(div1).fontFeatureSettings, '"vert" 1'); - }, "font-feature-settings should have its feature tag serialized with double quotes"); + assert_equals(getComputedStyle(div).fontFeatureSettings, '"vert"'); + assert_equals(getComputedStyle(div1).fontFeatureSettings, '"vert"'); + }, "font-feature-settings should be serialized with double quotes, and the default value of 1 should be omitted"); </script> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html new file mode 100644 index 00000000000..975360f4c14 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-001.html @@ -0,0 +1,75 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Self-Alignment along column axis of stcky positioned items</title> +<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#column-align"> +<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self"> +<link rel="stylesheet" href="../../support/alignment.css"> +<meta name="assert" content="Sticky positioned grid items are aligned correcly."> +<style> +.container { + border: solid 1px; + overflow: auto; + height: 500px; +} +.grid { + position: relative; + float: left; + display: grid; + grid-template-columns: 75px 75px 75px 75px; + grid-template-rows: 100px 100px 100px 300px; + background: grey; + height: 400px; + margin-right: 20px; +} +.sticky { + position: -webkit-sticky; + position: sticky; + width: 20px; + height: 20px; + background-color: #cae8ca; +} +.item1 { + top: 0px; + grid-column: 1; + grid-row: 1; +} +.item2 { + top: 0px; + grid-column: 2; + grid-row: 2; +} +.item3 { + top: 0px; + grid-column: 3; + grid-row: 3; +} +.item4 { + grid-column: 4; + grid-row: 4; + background: lightgrey; +} +.scroll { overflow: auto; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.grid')"> +<div class="container"> + <div style="height:30px"></div> + <div class="grid"> + <div class="item1 sticky alignSelfStart" data-offset-x="0" data-offset-y="0"></div> + <div class="item2 sticky alignSelfCenter" data-offset-x="75" data-offset-y="140"></div> + <div class="item3 sticky alignSelfEnd" data-offset-x="150" data-offset-y="280"></div> + <div class="item4"></div> + </div> + <div class="grid scroll"> + <div class="item1 sticky alignSelfStart" data-offset-x="0" data-offset-y="0"></div> + <div class="item2 sticky alignSelfCenter" data-offset-x="75" data-offset-y="140"></div> + <div class="item3 sticky alignSelfEnd" data-offset-x="150" data-offset-y="280"></div> + <div class="item4"></div> + </div> + <div style="height:2000px"></div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html new file mode 100644 index 00000000000..357cbe13e25 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-column-axis-alignment-sticky-positioned-items-002.html @@ -0,0 +1,75 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Self-Alignment along column axis of stcky positioned items</title> +<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#column-align"> +<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-align-self"> +<link rel="stylesheet" href="../../support/alignment.css"> +<meta name="assert" content="Sticky positioned grid items are aligned correcly, but preserving non-static positions when required."> +<style> +.container { + border: solid 1px; + overflow: auto; + height: 500px; +} +.grid { + position: relative; + float: left; + display: grid; + grid-template-columns: 75px 75px 75px 75px; + grid-template-rows: 100px 100px 100px 300px; + background: grey; + height: 400px; + margin-right: 20px; +} +.sticky { + position: -webkit-sticky; + position: sticky; + width: 20px; + height: 20px; + background-color: #cae8ca; +} +.item1 { + top: 40px; + grid-column: 1; + grid-row: 1; +} +.item2 { + top: 100px; + grid-column: 2; + grid-row: 2; +} +.item3 { + top: 290px; + grid-column: 3; + grid-row: 3; +} +.item4 { + grid-column: 4; + grid-row: 4; + background: lightgrey; +} +.scroll { overflow: auto; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.grid')"> +<div class="container"> + <div style="height:30px"></div> + <div class="grid"> + <div class="item1 sticky alignSelfStart" data-offset-x="0" data-offset-y="10"></div> + <div class="item2 sticky alignSelfCenter" data-offset-x="75" data-offset-y="140"></div> + <div class="item3 sticky alignSelfEnd" data-offset-x="150" data-offset-y="280"></div> + <div class="item4"></div> + </div> + <div class="grid scroll"> + <div class="item1 sticky alignSelfStart" data-offset-x="0" data-offset-y="40"></div> + <div class="item2 sticky alignSelfCenter" data-offset-x="75" data-offset-y="140"></div> + <div class="item3 sticky alignSelfEnd" data-offset-x="150" data-offset-y="290"></div> + <div class="item4"></div> + </div> + <div style="height:2000px"></div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html new file mode 100644 index 00000000000..31d06b80621 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-001.html @@ -0,0 +1,75 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Self-Alignment along row axis of stcky positioned items</title> +<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#row-align"> +<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self"> +<link rel="stylesheet" href="../../support/alignment.css"> +<meta name="assert" content="Sticky positioned grid items are aligned correcly."> +<style> +.container { + border: solid 1px; + overflow: auto; + width: 500px; +} +.grid { + position: relative; + display: grid; + grid-template-columns: 100px 100px 100px 300px; + grid-template-rows: 75px 75px 75px 75px; + background: grey; + width: 400px; + margin-bottom: 20px; +} +.sticky { + position: -webkit-sticky; + position: sticky; + width: 20px; + height: 20px; + background-color: #cae8ca; +} +.item1 { + left: 0px; + grid-column: 1; + grid-row: 1; +} +.item2 { + left: 0px; + grid-column: 2; + grid-row: 2; +} +.item3 { + left: 0px; + grid-column: 3; + grid-row: 3; +} +.item4 { + grid-column: 4; + grid-row: 4; + background: lightgrey; +} +.scroll { overflow: auto; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.grid')"> +<div class="container"> + <div style="width: 30px; float:left; height: 10px;"></div> + <div class="grid"> + <div class="item1 sticky justifySelfStart" data-offset-x="0" data-offset-y="0"></div> + <div class="item2 sticky justifySelfCenter" data-offset-x="140" data-offset-y="75"></div> + <div class="item3 sticky justifySelfEnd" data-offset-x="280" data-offset-y="150"></div> + <div class="item4"></div> + </div> + <div style="width: 30px; float:left; height: 10px;"></div> + <div class="grid scroll"> + <div class="item1 sticky justifySelfStart" data-offset-x="0" data-offset-y="0"></div> + <div class="item2 sticky justifySelfCenter" data-offset-x="140" data-offset-y="75"></div> + <div class="item3 sticky justifySelfEnd" data-offset-x="280" data-offset-y="150"></div> + <div class="item4"></div> + </div> + <div style="width: 2000px; height: 10px;"></div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html new file mode 100644 index 00000000000..cf14691161a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-row-axis-alignment-sticky-positioned-items-002.html @@ -0,0 +1,75 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Layout Test: Self-Alignment along row axis of stcky positioned items</title> +<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#row-align"> +<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-justify-self"> +<link rel="stylesheet" href="../../support/alignment.css"> +<meta name="assert" content="Sticky positioned grid items are aligned correcly, but preserving non-static positions when required."> +<style> +.container { + border: solid 1px; + overflow: auto; + width: 500px; +} +.grid { + position: relative; + display: grid; + grid-template-columns: 100px 100px 100px 300px; + grid-template-rows: 75px 75px 75px 75px; + background: grey; + width: 400px; + margin-bottom: 20px; +} +.sticky { + position: -webkit-sticky; + position: sticky; + width: 20px; + height: 20px; + background-color: #cae8ca; +} +.item1 { + left: 40px; + grid-column: 1; + grid-row: 1; +} +.item2 { + left: 100px; + grid-column: 2; + grid-row: 2; +} +.item3 { + left: 290px; + grid-column: 3; + grid-row: 3; +} +.item4 { + grid-column: 4; + grid-row: 4; + background: lightgrey; +} +.scroll { overflow: auto; } +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<body onload="checkLayout('.grid')"> +<div class="container"> + <div style="width: 30px; float:left; height: 10px;"></div> + <div class="grid"> + <div class="item1 sticky justifySelfStart" data-offset-x="10" data-offset-y="0"></div> + <div class="item2 sticky justifySelfCenter" data-offset-x="140" data-offset-y="75"></div> + <div class="item3 sticky justifySelfEnd" data-offset-x="280" data-offset-y="150"></div> + <div class="item4"></div> + </div> + <div style="width: 30px; float:left; height: 10px;"></div> + <div class="grid scroll"> + <div class="item1 sticky justifySelfStart" data-offset-x="40" data-offset-y="0"></div> + <div class="item2 sticky justifySelfCenter" data-offset-x="140" data-offset-y="75"></div> + <div class="item3 sticky justifySelfEnd" data-offset-x="290" data-offset-y="150"></div> + <div class="item4"></div> + </div> + <div style="width: 2000px; height: 10px;"></div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html new file mode 100644 index 00000000000..db88ce54b38 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Grid Test: Anonymous grid items - non-contiguous text runs - position:absolute</title> +<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-items"> +<link rel="match" href="/css/css-flexbox/anonymous-flex-item-split-ref.html"> +<p>The words "Two" and "lines" should not be on the same line.</p> +<div style="display:grid">Two <span style="position:absolute"></span>lines</div> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-at-user-scroll-end-manual.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-at-user-scroll-end-manual.html new file mode 100644 index 00000000000..d1e4be5a20a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-at-user-scroll-end-manual.html @@ -0,0 +1,86 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1" /> +<title>Tests that window should snap at user scroll end.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> +body { + margin: 0px; + overflow: scroll; + scroll-snap-type: both mandatory; +} +#content { + width: 2000px; + height: 2000px; + padding: 0px; + margin: 0px; +} +#target { + position: relative; + left: 400px; + top: 400px; + width: 400px; + height: 400px; + background-color: lightblue; + scroll-snap-align: start; +} +#i1 { + color: red; + font-weight: bold; +} +</style> + +<div id="content"> + <div id="target"> + <h1>CSSScrollSnap</h1> + <h4>Tests that the window can snap at user scroll end.</h4> + <ol> + <li id="i1" style="color: red"> + Scroll the page vertically and horizontally. + Keep scrolling until background has turned yellow.</li> + <li id="i2"> Press the button "Done"</li> + </ol> + <input type="button" id="btn" value="DONE" style="width: 100px; height: 50px;"/> + </div> +</div> + +<script> +var body = document.body; +var button = document.getElementById("btn"); +var target = document.getElementById("target"); +var instruction1 = document.getElementById("i1"); +var instruction2 = document.getElementById("i2"); +var scrolled_x = false; +var scrolled_y = false; +var start_x = window.scrollX; +var start_y = window.scrollY; + +window.onscroll = function() { + if (scrolled_x && scrolled_y) { + body.style.backgroundColor = "yellow"; + instruction1.style.color = "black"; + instruction1.style.fontWeight = "normal"; + instruction2.style.color = "red"; + instruction2.style.fontWeight = "bold"; + return; + } + + scrolled_x |= window.scrollX != start_x; + scrolled_y |= window.scrollY != start_y; +} + +button.onclick = function() { + if (!scrolled_x || !scrolled_y) + return; + + assert_equals(window.scrollX, target.offsetLeft, + "window.scrollX should be at snapped position."); + assert_equals(window.scrollY, target.offsetTop, + "window.scrollY should be at snapped position."); + // To make the test result visible. + var content = document.getElementById("content"); + body.removeChild(content); + done(); +} + +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html new file mode 100644 index 00000000000..4815402949a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-invalid-position.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Shapes Module Level 1: parsing shape-outside with invalid position values</title> +<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-values-4/#typedef-position"> +<meta name="assert" content="shape-outside positions support only the '<position>' grammar."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/parsing-testcommon.js"></script> +</head> +<body> +<script> +// The following were supported in an earlier version of the spec. +// https://github.com/w3c/csswg-drafts/issues/2140 +// Deprecated in Blink with support to be removed in M68, around July 2018. +test_invalid_value("shape-outside", "circle(at center left 1px)"); +test_invalid_value("shape-outside", "circle(at center top 2px)"); +test_invalid_value("shape-outside", "circle(at right 3% center)"); +test_invalid_value("shape-outside", "circle(at left 4px top)"); +test_invalid_value("shape-outside", "circle(at right top 5px)"); +test_invalid_value("shape-outside", "circle(at bottom 6% center)"); +test_invalid_value("shape-outside", "circle(at bottom 7% left)"); +test_invalid_value("shape-outside", "circle(at bottom right 8%)"); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html new file mode 100644 index 00000000000..ca01b352b63 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-shapes/parsing/shape-outside-valid-position.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Shapes Module Level 1: parsing shape-outside with valid position values</title> +<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-values-4/#typedef-position"> +<meta name="assert" content="shape-outside positions support the full '<position>' grammar."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/parsing-testcommon.js"></script> +</head> +<body> +<script> +// First serialization is being returned by Firefox/Edge, second by Blink/WebKit. +test_valid_value("shape-outside", "circle(at 10%)", ["circle(at 10%)", "circle(at 10% 50%)"]); +test_valid_value("shape-outside", "circle(at 20% 30px)"); +test_valid_value("shape-outside", "circle(at 30px center)", ["circle(at 30px center)", "circle(at 30px 50%)"]); +test_valid_value("shape-outside", "circle(at 40px top)", ["circle(at 40px top)", "circle(at 40px 0%)"]); +test_valid_value("shape-outside", "circle(at bottom 10% right 20%)", ["circle(at bottom 10% right 20%)", "circle(at 80% 90%)"]); +test_valid_value("shape-outside", "circle(at bottom right)", ["circle(at bottom right)", "circle(at 100% 100%)"]); +test_valid_value("shape-outside", "circle(at center)", ["circle(at center)", "circle(at 50% 50%)"]); +test_valid_value("shape-outside", "circle(at center 50px)", ["circle(at center 50px)", "circle(at 50% 50px)"]); +test_valid_value("shape-outside", "circle(at center bottom)", ["circle(at center bottom)", "circle(at 50% 100%)"]); +test_valid_value("shape-outside", "circle(at center center)", ["circle(at center center)", "circle(at 50% 50%)"]); +test_valid_value("shape-outside", "circle(at center left)", ["circle(at center left)", "circle(at 0% 50%)"]); +test_valid_value("shape-outside", "circle(at left)", ["circle(at left)", "circle(at 0% 50%)"]); +test_valid_value("shape-outside", "circle(at left bottom)", ["circle(at left bottom)", "circle(at 0% 100%)"]); +test_valid_value("shape-outside", "circle(at left center)", ["circle(at left center)", "circle(at 0% 50%)"]); +test_valid_value("shape-outside", "circle(at right 40%)", ["circle(at right 40%)", "circle(at 100% 40%)"]); +test_valid_value("shape-outside", "circle(at right 30% top 60px)", ["circle(at right 30% top 60px)", "circle(at 70% 60px)"]); +test_valid_value("shape-outside", "circle(at top)", ["circle(at top)", "circle(at 50% 0%)"]); +test_valid_value("shape-outside", "circle(at top center)", ["circle(at top center)", "circle(at 50% 0%)"]); +</script> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-1-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-1-ref.html new file mode 100644 index 00000000000..8a568d25d92 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-1-ref.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: compare individual transform with transform functions</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <meta name="assert" content="Tests whether individaul transform works correctlyi by compare the rendering result with transfrom functions of the 'transform' property."/> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + } + .row_1 { + top: 100px; + } + .scale_1{ + left: 100px; + width: 50px; + height: 100px; + transform: scaleX(2); + } + .translate_1 { + left: 150px; + transform: translateX(150px); + } + .rotate_1 { + left: 450px; + transform-origin: 50% 50%; + transform: rotate(90deg); + } + + .row_2 { + top: 250px; + } + .scale_2{ + left: 100px; + width: 50px; + height: 50px; + transform: scale(2, 2); + } + .translate_2 { + left: 150px; + top: 200px; + transform: translate(150px, 50px); + } + .rotate_2 { + left: 450px; + transform-origin: 50% 50%; + transform: rotate3d(0, 0, 1, 90deg); + } + .row_3 { + transform: perspective(500px); + top: 400px; + } + .scale_3{ + left: 100px; + width: 50px; + height: 50px; + transform: scale3d(2, 2, 2); + } + .translate_3 { + left: 150px; + transform: translate3d(150px, 10px, 10px); + } + .rotate_3 { + left: 450px; + transform-origin: 50% 50%; + transform: rotate3d(0, 1, 0, 45deg); + } + </style> + </head> + <body> + <div class="scale_1 row_1"></div> + <div class="translate_1 row_1"></div> + <div class="rotate_1 row_1"></div> + <div class="scale_2 row_2"></div> + <div class="translate_2 row_2"></div> + <div class="rotate_2 row_2"></div> + <div class="scale_3 row_3"></div> + <div class="translate_3 row_3"></div> + <div class="rotate_3 row_3"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-1.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-1.html new file mode 100644 index 00000000000..4f83e2eac47 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-1.html @@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: compare individual transform with transform functions</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <meta name="assert" content="Tests whether individaul transform works correctlyi by compare the rendering result with transfrom functions of the 'transform' property."/> + <link rel="match" href="individual-transform-1-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + } + .row_1 { + top: 100px; + } + .scale_1{ + left: 100px; + width: 50px; + height: 100px; + /* test 'scale: <number>' */ + scale: 2; + } + .translate_1 { + left: 150px; + /* test 'translate: <length-percentage>' */ + translate: 150px; + } + .rotate_1 { + left: 450px; + transform-origin: 50% 50%; + /* test 'rota: te<angle>' */ + rotate: 90deg; + } + + .row_2 { + top: 250px; + } + .scale_2{ + left: 100px; + width: 50px; + height: 50px; + /* test 'scale: <number>{2}'' */ + scale: 2 2; + } + .translate_2 { + left: 150px; + top: 200px; + /* test 'translate: <length-percentage><length-percentage>' */ + translate: 150px 50px; + } + .rotate_2 { + left: 450px; + transform-origin: 50% 50%; + /* test 'rotate: <number>{3}<angle>'*/ + rotate: 0 0 1 90deg; + } + .row_3 { + transform: perspective(500px); + top: 400px; + } + .scale_3{ + left: 100px; + width: 50px; + height: 50px; + /* test 'scale: <number>{3}'' */ + scale: 2 2 2; + } + .translate_3 { + left: 150px; + /* test 'translate: <length-percentage><length>' */ + translate: 150px 10px 10px; + } + .rotate_3 { + left: 450px; + transform-origin: 50% 50%; + /* test 'rotate: <number>{3}<angle>'*/ + rotate: 0 1 0 45deg; + } + </style> + </head> + <body> + <div class="scale_1 row_1"></div> + <div class="translate_1 row_1"></div> + <div class="rotate_1 row_1"></div> + <div class="scale_2 row_2"></div> + <div class="translate_2 row_2"></div> + <div class="rotate_2 row_2"></div> + <div class="scale_3 row_3"></div> + <div class="translate_3 row_3"></div> + <div class="rotate_3 row_3"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2-ref.html new file mode 100644 index 00000000000..ee956aa301f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2-ref.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + transform: translate(50px, 50px) rotate(45deg) scale(2, 2); + } + + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2a.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2a.html new file mode 100644 index 00000000000..3f6c97386ba --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2a.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 50px 50px; + rotate: 45deg; + scale: 2 2; + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2b.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2b.html new file mode 100644 index 00000000000..94dac2f10ff --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2b.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + rotate: 45deg; + scale: 2 2; + translate: 50px 50px; + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2c.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2c.html new file mode 100644 index 00000000000..f84ae228065 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2c.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 50px 50px; + rotate: 45deg; + transform: scale(2, 2); + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2d.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2d.html new file mode 100644 index 00000000000..5b5694f544e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2d.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 50px 50px; + transform: rotate(45deg) scale(2, 2); + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2e.html b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2e.html new file mode 100644 index 00000000000..0350137bede --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/individual-transform/individual-transform-2e.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 0px 50px; + transform: translateX(50px) rotate(45deg) scale(2, 2); + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child-ref.html b/tests/wpt/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child-ref.html new file mode 100644 index 00000000000..7e1ac99ba89 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child-ref.html @@ -0,0 +1,38 @@ +<!doctype HTML> + +<title>CSS Test (Transforms): Transformed tr with percent height abspos child reference.</title> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<style> +.table { + width: 100px; + height: 100px; + background-color: lightblue; +} +.tr { + height: 50px; + background-color: lightgrey; +} +.contblock { + transform: translateX(10px); + width: 200px; + height: 200px; + background-color: lightyellow; +} +.abspos { + position: absolute; + top: 20px; + left: 20px; + width: 100%; + height: 100%; + background-color: blue; +} +</style> + +<div class="contblock"> + <div class="table"> + <div class="tr" style="width: 50px;"></div> + <div class="tr" style="width: 100px; transform: translateX(10px)"> + <div class="abspos"></div> + </div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child.html b/tests/wpt/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child.html new file mode 100644 index 00000000000..91f2a5f0588 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/transform-transformed-tr-percent-height-child.html @@ -0,0 +1,48 @@ +<!doctype HTML> + +<title>CSS Test (Transforms): Transformed tr with percent height abspos child.</title> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-rendering"> +<meta name="assert" content="This test ensures that transformed tr's percent height abspos child uses tr's height as reference."> +<link rel="match" href="transform-transformed-tr-percent-height-child-ref.html"> +<style> + table, td, tr { + margin: 0px; + padding: 0px; + border-spacing: 0px; + } + table { + background-color: lightblue; + } + td { + width: 50px; + height: 50px; + background-color: lightgrey; + } + .contblock { + transform: translateX(10px); + width: 200px; + height: 200px; + background-color: lightyellow; + } + .abspos { + position: absolute; + top: 20px; + left: 20px; + width: 100%; + height: 100%; + background-color: blue; + } +</style> + +<div class="contblock"> + <table> + <tr> + <td></td> + </tr> + <tr style="transform: translateX(10px)"> + <td></td> + <td><div class="abspos"></div></td> + </tr> + </table> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/interfaces.html b/tests/wpt/web-platform-tests/css/css-typed-om/interfaces.html new file mode 100644 index 00000000000..e5a3638b8e6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/interfaces.html @@ -0,0 +1,28 @@ +<!doctype html> +<meta charset=utf-8> +<title>CSS Typed OM IDL</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#idl-index"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/WebIDLParser.js"></script> +<script src="/resources/idlharness.js"></script> +<script> +'use strict'; + +promise_test(t => { + return fetch('/interfaces/css-typed-om.idl') + .then(response => response.text()) + .then(idls => { + var idl_array = new IdlArray(); + idl_array.add_idls(idls); + idl_array.add_untested_idls('interface Element {};'); + idl_array.add_untested_idls('interface CSSStyleRule {};'); + idl_array.add_untested_idls('interface ElementCSSInlineStyle {};'); + idl_array.add_objects({ + // TODO: Add more objects. + }); + idl_array.test(); + t.done(); + }); +}, 'CSS Typed OM IDL test'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssMathValue.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssMathValue.tentative.html index 814812e6a8d..fd9fce861ef 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssMathValue.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssMathValue.tentative.html @@ -1,8 +1,6 @@ <!doctype html> <meta charset="utf-8"> <title>IDL-constructed CSSMathValue serialization tests</title> -<!-- Tentative because this depends on css-values-4 spec, which is still WIP: - https://drafts.csswg.org/css-values-4/#calc-notation --> <link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#calc-serialization"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -12,69 +10,104 @@ const gTestCases = [ { - description: 'CSSMathSum with 1 argument', - value: new CSSMathSum(CSS.px(1)), - cssText: 'calc(1px)', + description: 'CSSMathMax with one argument', + value: new CSSMathMax(1), + cssText: 'max(1)', }, { - description: 'CSSMathSum with 2 arguments', - value: new CSSMathSum(CSS.px(1), CSS.px(2)), - cssText: 'calc(1px + 2px)', + description: 'CSSMathMax with more than one argument', + value: new CSSMathMax(1, 2, 3), + cssText: 'max(1, 2, 3)', }, { - description: 'CSSMathSum with more than 2 arguments', - value: new CSSMathSum(CSS.px(1), CSS.px(2), CSS.px(3)), - cssText: 'calc((1px + 2px) + 3px)', + description: 'CSSMathMax containing nested CSSMathValues', + value: new CSSMathMax(new CSSMathSum(1, 2), 3), + cssText: 'max(1 + 2, 3)', }, { - description: 'CSSMathProduct with 1 argument', - value: new CSSMathProduct(CSS.px(1)), - cssText: 'calc(1px)', + description: 'CSSMathMin with one argument', + value: new CSSMathMin(1), + cssText: 'min(1)', }, { - description: 'CSSMathProduct with 2 arguments', - value: new CSSMathProduct(CSS.px(1), 2), - cssText: 'calc(1px * 2)', + description: 'CSSMathMin with more than one argument', + value: new CSSMathMin(1, 2, 3), + cssText: 'min(1, 2, 3)', }, { - description: 'CSSMathProduct with more than 2 arguments', - value: new CSSMathProduct(CSS.px(1), 2, 3), - cssText: 'calc((1px * 2) * 3)', + description: 'CSSMathMin containing nested CSSMathValues', + value: new CSSMathMin(new CSSMathSum(1, 2), 3), + cssText: 'min(1 + 2, 3)', }, { - description: 'CSSMathProduct of two different base types', - value: new CSSMathProduct(CSS.px(1), CSS.s(1)), - cssText: 'calc(1px * 1s)', + description: 'CSSMathSum with one argument', + value: new CSSMathSum(1), + cssText: 'calc(1)', }, { - description: 'CSSMathMax with one argument', - value: new CSSMathMax(CSS.px(2)), - cssText: 'max(1px)', + description: 'CSSMathSum with more than one argument', + value: new CSSMathSum(1, 2, 3), + cssText: 'calc(1 + 2 + 3)', }, { - description: 'CSSMathMax with more than one argument', - value: new CSSMathMax(CSS.px(2), CSS.px(1)), - cssText: 'max(1px, 1s)', + description: 'CSSMathSum with a CSSMathNegate as first value', + value: new CSSMathSum(new CSSMathNegate(1), 2, 3), + cssText: 'calc((-1) + 2 + 3)', }, { - description: 'CSSMathMin with one argument', - value: new CSSMathMin(CSS.px(1)), - cssText: 'min(1px)', + description: 'CSSMathSum containing a CSSMathNegate after first value', + value: new CSSMathSum(1, new CSSMathNegate(2), 3), + cssText: 'calc(1 - 2 + 3)', }, { - description: 'CSSMathMin with more than one argument', - value: new CSSMathMin(CSS.px(1), CSS.px(2)), - cssText: 'min(1px, 2px)', + description: 'CSSMathSum nested inside a CSSMathValue', + value: new CSSMathSum(new CSSMathSum(1, 2), 3), + cssText: 'calc((1 + 2) + 3)', }, { description: 'CSSMathNegate', - value: new CSSMathNegate(CSS.px(1)), - cssText: 'calc(- 1px)', + value: new CSSMathNegate(1), + cssText: 'calc(-1)', + }, + { + description: 'CSSMathNegate nested inside a CSSMathValue', + value: new CSSMathProduct(new CSSMathNegate(1)), + cssText: 'calc((-1))', + }, + { + description: 'CSSMathProduct with one argument', + value: new CSSMathProduct(1), + cssText: 'calc(1)', + }, + { + description: 'CSSMathProduct with more than one argument', + value: new CSSMathProduct(1, 2, 3), + cssText: 'calc(1 * 2 * 3)', + }, + { + description: 'CSSMathProduct with a CSSMathInvert as first value', + value: new CSSMathProduct(new CSSMathInvert(1), 2, 3), + cssText: 'calc((1 / 1) * 2 * 3)', + }, + { + description: 'CSSMathProduct containing a CSSMathInvert after first value', + value: new CSSMathProduct(1, new CSSMathInvert(2), 3), + cssText: 'calc(1 / 2 * 3)', + }, + { + description: 'CSSMathProduct nested inside a CSSMathValue', + value: new CSSMathProduct(new CSSMathProduct(1, 2), 3), + cssText: 'calc((1 * 2) * 3)', }, { description: 'CSSMathInvert', - value: new CSSMathInvert(CSS.px(1)), - cssText: 'calc(1 / 1px)', + value: new CSSMathInvert(1), + cssText: 'calc(1 / 1)', + }, + { + description: 'CSSMathInvert nested inside a CSSMathValue', + value: new CSSMathSum(new CSSMathInvert(1)), + cssText: 'calc((1 / 1))', }, ]; diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUnitValue.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUnitValue.tentative.html index 652e0e61350..fc798ddbbfa 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUnitValue.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-serialization/cssUnitValue.tentative.html @@ -34,22 +34,10 @@ test(() => { assert_equals(result.toString(), '3.14px'); }, 'CSSKeywordValue from DOMString modified by "value" setter serializes correctly'); -test(() => { - let result = CSSStyleValue.parse('width', '1px'); - result.unit = 's'; - assert_equals(result.toString(), '1s'); -}, 'CSSKeywordValue from DOMString modified by "unit" setter serializes correctly'); - test(t => { let result = createInlineStyleMap(t, 'width: 1px').get('width'); result.value = 3.14; assert_equals(result.toString(), '3.14px'); }, 'CSSKeywordValue from CSSOM modified by "value" setter serializes correctly'); -test(t => { - let result = createInlineStyleMap(t, 'width: 1px').get('width'); - result.unit = 's'; - assert_equals(result.toString(), '1s'); -}, 'CSSKeywordValue from CSSOM modified by "unit" setter serializes correctly'); - </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssPositionValue-interface.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssPositionValue-interface.html deleted file mode 100644 index 0ea8632ce48..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssPositionValue-interface.html +++ /dev/null @@ -1,26 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>CSSPositionValue IDL</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#positionvalue-objects"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/WebIDLParser.js"></script> -<script src="/resources/idlharness.js"></script> -<script type="text/plain" id="idl"> -[Constructor(CSSNumericValue x, CSSNumericValue y)] -interface CSSPositionValue : CSSStyleValue { - attribute CSSNumericValue x; - attribute CSSNumericValue y; -}; -</script> -<script> -'use strict'; -const idlArray = new IdlArray(); -idlArray.add_untested_idls('interface CSSStyleValue { stringifier; };'); -idlArray.add_untested_idls('interface CSSNumericValue : CSSStyleValue { };'); -idlArray.add_idls(document.getElementById('idl').textContent); -idlArray.add_objects({ - CSSPositionValue: ['new CSSPositionValue(new CSSUnitValue(0, "px"), new CSSUnitValue(0, "px"))'] -}); -idlArray.test(); -</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-interface.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-interface.html deleted file mode 100644 index b20d0549b39..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUnparsedValue-interface.html +++ /dev/null @@ -1,30 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>CSSUnparsedValue IDL</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssunparsedvalue"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/WebIDLParser.js"></script> -<script src="/resources/idlharness.js"></script> -<script type="text/plain" id="idl"> -[Constructor((DOMString or CSSVariableReferenceValue)... members)] -interface CSSUnparsedValue : CSSStyleValue { - iterable<(DOMString or CSSVariableReferenceValue)>; - readonly attribute unsigned long length; - getter (DOMString or CSSVariableReferenceValue) (unsigned long index); -}; -</script> -<script> -'use strict'; -const idlArray = new IdlArray(); -idlArray.add_untested_idls('interface CSSStyleValue { stringifier; };'); -idlArray.add_untested_idls('interface CSSVariableReferenceValue : CSSStyleValue { };'); -idlArray.add_idls(document.getElementById('idl').textContent); -idlArray.add_objects({ - CSSUnparsedValue: [ - 'new CSSUnparsedValue()', - 'new CSSUnparsedValue("foo")', - ] -}); -idlArray.test(); -</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-interface.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html index 444e08093ed..ed86054026f 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssKeywordValue-interface.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-interface.html @@ -1,24 +1,22 @@ <!doctype html> <meta charset=utf-8> -<title>CSSKeywordValue IDL</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#keywordvalue-objects"> +<title>CSSURLImageValue IDL</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssurlimagevalue"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> <script type="text/plain" id="idl"> -[Constructor(DOMString value)] -interface CSSKeywordValue : CSSStyleValue { - attribute DOMString value; +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(USVString url)] +interface CSSURLImageValue : CSSImageValue { + readonly attribute USVString url; }; </script> <script> 'use strict'; const idlArray = new IdlArray(); -idlArray.add_untested_idls('interface CSSStyleValue { stringifier; };'); +idlArray.add_untested_idls('interface CSSImageValue { stringifier; };'); idlArray.add_idls(document.getElementById('idl').textContent); -idlArray.add_objects({ - CSSKeywordValue: ['new CSSKeywordValue("auto")'] -}); idlArray.test(); </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html new file mode 100644 index 00000000000..8d6370a223a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue-invalid.html @@ -0,0 +1,17 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSURLImageValue Error Handling</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#imagevalue-objects"> +<meta name="assert" content="Test CSSURLImageValue constructor error handling" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body> +<div id="log"> +<script> +'use strict'; + +test(() => { + assert_throws(new TypeError(), () => new CSSURLImageValue("file://:invalid url")); +}, 'Constructing a CSSURLImageValue with an invalid URL throws a TypeError'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html new file mode 100644 index 00000000000..5025859d1bb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.html @@ -0,0 +1,81 @@ +<!doctype html> +<meta charset="utf-8"> +<title>CSSURLImageValue</title> +<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#imagevalue-objects"> +<meta name="assert" content="Test CSSURLImageValue constructor and attributes" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../resources/testhelper.js"></script> +<body> +<div id="log"> +<script> +'use strict'; + +const gTestUrl = '../resources/1x1-green.png'; +const gBase64TestUrl = 'data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA='; +const gBadTestUrl = document.location.href; + +test(() => { + const result = new CSSURLImageValue(gTestUrl); + + assert_not_equals(result, null, + 'A CSSURLImageValue should be created'); + assert_equals(result.url, gTestUrl, + 'url member should be same as passed in the constructor'); + assert_equals(result.intrinsicWidth, null, 'intrinsicWidth'); + assert_equals(result.intrinsicHeight, null, 'intrinsicHeight'); + assert_equals(result.intrinsicRatio, null, 'intrinsicRatio'); + assert_equals(result.state, 'unloaded', 'state'); +}, 'Constructing a CSSURLImageValue with a valid URL puts it in an ' + + 'unloaded state'); + +async_test(t => { + const result = new CSSURLImageValue(gTestUrl); + let image = loadImageResource(t, result); + + image.addEventListener('load', t.step_func_done(() => { + assert_equals(result.url, gTestUrl, + 'url member should be same as passed in the constructor'); + assert_equals(result.state, 'loaded', 'state'); + assert_equals(result.intrinsicWidth, 1, + 'intrinsicWidth member should be width of loaded image'); + assert_equals(result.intrinsicHeight, 1, + 'intrinsicHeight member should be height of loaded image'); + assert_equals(result.intrinsicRatio, 1, + 'intrinsicRatio member should be ratio of loaded image'); + })); +}, 'Constructing a CSSURLImageValue from a URL sets its state to loaded'); + +async_test(t => { + const result = new CSSURLImageValue(gBase64TestUrl); + let image = loadImageResource(t, result); + + image.addEventListener('load', t.step_func_done(() => { + assert_equals(result.url, gBase64TestUrl, + 'url member should be same as passed in the constructor'); + assert_equals(result.state, 'loaded', 'state'); + assert_equals(result.intrinsicWidth, 1, + 'intrinsicWidth member should be width of loaded image'); + assert_equals(result.intrinsicHeight, 1, + 'intrinsicHeight member should be height of loaded image'); + assert_equals(result.intrinsicRatio, 1, + 'intrinsicRatio member should be ratio of loaded image'); + })); +}, 'Constructing a CSSURLImageValue from a base64 URL sets its state to loaded'); + +async_test(t => { + const result = new CSSURLImageValue(gBadTestUrl); + let image = loadImageResource(t, result); + + image.addEventListener('error', t.step_func_done(() => { + assert_equals(result.url, gBadTestUrl, + 'url member should be same as passed in the constructor'); + assert_equals(result.state, 'error', 'state'); + assert_equals(result.intrinsicWidth, null, 'intrinsicWidth'); + assert_equals(result.intrinsicHeight, null, 'intrinsicHeight'); + assert_equals(result.intrinsicRatio, null, 'intrinsicRatio'); + })); +}, 'Constructing a CSSURLImageValue from a URL to an invalid image sets ' + + 'its state to error'); + +</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.tentative.html deleted file mode 100644 index 0f0625b4231..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssUrlImageValue.tentative.html +++ /dev/null @@ -1,73 +0,0 @@ -<!doctype html> -<meta charset="utf-8"> -<title>CSSURLImageValue tests</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#imagevalue-objects"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="../resources/testhelper.js"></script> -<body> -<script> -'use strict'; - -const gTestUrl = '../resources/1x1-green.png'; -const gBase64TestUrl = 'data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA='; -const gBadTestUrl = document.location.href; - -test(() => { - assert_throws(new TypeError(), () => new CSSURLImageValue("file://:This is invalid url")); -}, 'Constructing a CSSURLImageValue with an invalid URL throws a TypeError'); - -test(() => { - const result = new CSSURLImageValue(gTestUrl); - assert_equals(result.url, gTestUrl); - assert_equals(result.intrinsicWidth, null); - assert_equals(result.intrinsicHeight, null); - assert_equals(result.intrinsicRatio, null); - assert_equals(result.state, 'unloaded'); -}, 'Constructing a CSSURLImageValue with a valid URL puts it in an unloaded state'); - -test(() => { - let result = new CSSURLImageValue(gTestUrl); - assert_throws(new TypeError(), () => result.url = gBase64TestUrl); -}, 'CSSURLImageValue.url is readonly'); - -async_test(t => { - const result = new CSSURLImageValue(gTestUrl); - let image = loadImageResource(t, result); - - image.addEventListener('load', t.step_func_done(() => { - assert_equals(result.url, gTestUrl); - assert_equals(result.state, 'loaded'); - assert_equals(result.intrinsicWidth, 1); - assert_equals(result.intrinsicHeight, 1); - assert_equals(result.intrinsicRatio, 1); - })); -}, 'Loading a CSSURLImageValue from a URL sets its state to loaded'); - -async_test(t => { - const result = new CSSURLImageValue(gBase64TestUrl); - let image = loadImageResource(t, result); - - image.addEventListener('load', t.step_func_done(() => { - assert_equals(result.url, gBase64TestUrl); - assert_equals(result.state, 'loaded'); - assert_equals(result.intrinsicWidth, 1); - assert_equals(result.intrinsicHeight, 1); - assert_equals(result.intrinsicRatio, 1); - })); -}, 'Loading a CSSURLImageValue from a base64 URL sets its state to loaded'); - -async_test(t => { - const result = new CSSURLImageValue(gBadTestUrl); - let image = loadImageResource(t, result); - - image.addEventListener('error', t.step_func_done(() => { - assert_equals(result.url, gBadTestUrl); - assert_equals(result.state, 'error'); - assert_equals(result.intrinsicWidth, null); - assert_equals(result.intrinsicHeight, null); - assert_equals(result.intrinsicRatio, null); - })); -}, 'Loading a CSSURLImageValue from a URL to an invalid image sets its state to error'); - -</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-interface.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-interface.html deleted file mode 100644 index 15db3276fb4..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/cssVariableReferenceValue-interface.html +++ /dev/null @@ -1,26 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>CSSVariableReferenceValue IDL</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#cssvariablereferencevalue"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/WebIDLParser.js"></script> -<script src="/resources/idlharness.js"></script> -<script type="text/plain" id="idl"> -[Constructor(DOMString variable, optional CSSUnparsedValue fallback)] -interface CSSVariableReferenceValue { - attribute DOMString variable; - readonly attribute CSSUnparsedValue? fallback; -}; -</script> -<script> -'use strict'; -const idlArray = new IdlArray(); -idlArray.add_idls(document.getElementById('idl').textContent); -idlArray.add_objects({ - CSSVariableReferenceValue: [ - 'new CSSVariableReferenceValue("--foo")', - ] -}); -idlArray.test(); -</script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative.html index 4ba27517976..d58bb075ce2 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/arithmetic.tentative.html @@ -144,4 +144,10 @@ test(() => { new CSSMathProduct(CSS.number(2), CSS.number(0.5), new CSSMathInvert(CSS.px(2)), CSS.number(2), new CSSMathInvert(new CSSMathSum(2)))); }, 'Calling CSSNumericValue.div inverts all argument values'); +test(() => { + assert_throws(new RangeError(), () => CSS.number(2).div(CSS.number(0))); + assert_throws(new RangeError(), () => CSS.number(3).div(CSS.px(10) ,CSS.number(0))); + assert_throws(new RangeError(), () => CSS.number(2).div(CSS.number(0), CSS.number(0))); +}, 'Can not divide with CSSUnitValue which has zero value and number type'); + </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html index 9e7401293e3..24769b3774e 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-typed-om/stylevalue-subclasses/numeric-objects/cssUnitValue.tentative.html @@ -19,26 +19,12 @@ for (const {unit, desc} of gInvalidTestUnits) { }, 'Constructing CSSUnitValue with ' + desc + ' as the unit throws a TypeError'); } -for (const {unit, desc} of gInvalidTestUnits) { - test(() => { - let result = new CSSUnitValue(0, 'px'); - assert_throws(new TypeError(), () => result.unit = unit); - assert_equals(result.unit, 'px'); - }, 'Updating CSSUnitValue.unit with ' + desc + ' throws a TypeError'); -} - for (const unit of gValidUnits) { test(() => { const result = new CSSUnitValue(-3.14, unit); assert_equals(result.value, -3.14); assert_equals(result.unit, unit.toLowerCase()); }, 'CSSUnitValue can be constructed with ' + unit); - - test(() => { - let result = new CSSUnitValue(-3.14, 'px'); - result.unit = unit - assert_equals(result.unit, unit.toLowerCase()); - }, 'CSSUnitValue.unit can be updated to ' + unit); } </script> diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/interface.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/interface.html deleted file mode 100644 index 6e0301093b1..00000000000 --- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/interface.html +++ /dev/null @@ -1,47 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>StylePropertyMap IDL</title> -<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#the-stylepropertymap"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/WebIDLParser.js"></script> -<script src="/resources/idlharness.js"></script> -<script type="text/plain" id="idl"> -interface StylePropertyMapReadOnly { - CSSStyleValue? get(DOMString property); - sequence<CSSStyleValue> getAll(DOMString property); - boolean has(DOMString property); - iterable<DOMString, (CSSStyleValue or sequence<CSSStyleValue>)>; - sequence<DOMString> getProperties(); - stringifier; -}; - -callback UpdateFunction = CSSStyleValue (CSSStyleValue oldValue); - -interface StylePropertyMap : StylePropertyMapReadOnly { - void append(DOMString property, (CSSStyleValue or DOMString)... values); - void delete(DOMString property); - void set(DOMString property, (CSSStyleValue or DOMString)... values); - void update(DOMString property, UpdateFunction updateFunction); -}; - -partial interface Element { - StylePropertyMapReadOnly computedStyleMap(); -}; - -partial interface CSSStyleRule { - [SameObject] readonly attribute StylePropertyMap styleMap; -}; - -partial interface Element { - [SameObject] readonly attribute StylePropertyMap attributeStyleMap; -}; -</script> -<script> -'use strict'; -const idlArray = new IdlArray(); -idlArray.add_idls(document.getElementById('idl').textContent); -idlArray.add_untested_idls('interface Element {};'); -idlArray.add_untested_idls('interface CSSStyleRule {};'); -idlArray.test(); -</script> diff --git a/tests/wpt/web-platform-tests/css/selectors/invalidation/matches.html b/tests/wpt/web-platform-tests/css/selectors/invalidation/matches.html index 6fd5b1fc6d9..ae5531ac5ca 100644 --- a/tests/wpt/web-platform-tests/css/selectors/invalidation/matches.html +++ b/tests/wpt/web-platform-tests/css/selectors/invalidation/matches.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> - <title>CSS Selectors Invalidation: :any-link</title> + <title>CSS Selectors Invalidation: :matches()</title> <link rel="author" title="Victoria Su" href="mailto:victoriaytsu@google.com"> <link rel="help" href="https://drafts.csswg.org/selectors-4/#matches"> <meta name="assert" content="This tests that the :matches() selector is effective"> @@ -9,15 +9,38 @@ <script src="/resources/testharnessreport.js"></script> <style> .b { - color: rgb(255, 255, 0); /* yellow */ + color: yellow; } /*Simple selector arguments */ .a :matches(.b, .c) { - color: rgb(255, 0, 0); /* red */ + color: red; } /*Compound selector arguments */ .a :matches(.c#d, .e) { - color: rgb(0, 255, 0); /* green */ + color: green; + } + /* Complex selector arguments */ + .a .g>.b { + color: black; + } + .a :matches(.e+.f, .g>.b, .h) { + color: blue; + } + .g>.b { + color: black; + } + .a .h { + color: black; + } + /* Nested */ + .a+.c>.e { + color: black; + } + .a+:matches(.b+.f, :matches(.c>.e, .g)) { + color: red; + } + .c>.e { + color: black; } </style> </head> @@ -38,29 +61,73 @@ <div class="f" id="f1"> Blue </div> + <div class="g"> + <div class="b" id="b2"> + Blue + <div class="b" id="b3"> + Red + </div> + </div> + </div> + <div class="h" id="h1"> + Black + </div> + </div> + <div class="c" id="c2"> + <div class="e" id="e2"> + Red + </div> </div> <script> document.body.offsetTop; + var black = "rgb(0, 0, 0)"; + var blue = "rgb(0, 0, 255)"; + var green = "rgb(0, 128, 0)"; + var red = "rgb(255, 0, 0)"; + var yellow = "rgb(255, 255, 0)"; + test(() => { - assert_equals(getComputedStyle(b1).color, "rgb(255, 255, 0)"); - assert_equals(getComputedStyle(c1).color, "rgb(0, 0, 0)"); - assert_equals(getComputedStyle(d).color, "rgb(0, 0, 0)"); - assert_equals(getComputedStyle(e1).color, "rgb(0, 0, 0)"); - assert_equals(getComputedStyle(f1).color, "rgb(0, 0, 0)"); + assert_equals(getComputedStyle(b1).color, yellow); + assert_equals(getComputedStyle(b2).color, black); + assert_equals(getComputedStyle(b3).color, yellow); + assert_equals(getComputedStyle(c1).color, black); + assert_equals(getComputedStyle(d).color, black); + assert_equals(getComputedStyle(e1).color, black); + assert_equals(getComputedStyle(e2).color, black); + assert_equals(getComputedStyle(f1).color, black); + assert_equals(getComputedStyle(h1).color, black); }, "Preconditions."); test(() => { a1.className = "a"; - assert_equals(getComputedStyle(b1).color, "rgb(255, 0, 0)"); - assert_equals(getComputedStyle(c1).color, "rgb(255, 0, 0)"); + assert_equals(getComputedStyle(b1).color, red); + assert_equals(getComputedStyle(b3).color, red); + assert_equals(getComputedStyle(c1).color, red); }, "Invalidate :matches() for simple selector arguments."); test(() => { a1.className = "a"; - assert_equals(getComputedStyle(d).color, "rgb(0, 255, 0)"); + assert_equals(getComputedStyle(d).color, green); }, "Invalidate :matches() for compound selector arguments."); + test(() => { + a1.className = "a"; + assert_equals(getComputedStyle(b2).color, blue); + assert_equals(getComputedStyle(b3).color, red); + assert_equals(getComputedStyle(f1).color, blue); + }, "Invalidate :matches() for complex selector arguments."); + + test(() => { + a1.className = "a"; + assert_equals(getComputedStyle(e2).color, red); + }, "Invalidate nested :matches()."); + + test(() => { + a1.className = "a"; + assert_equals(getComputedStyle(b2).color, blue); + assert_equals(getComputedStyle(h1).color, black); + }, "Test specificity of :matches()."); </script> </body> </html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001-ref.html index 0b87de98813..6d197e490fe 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001-ref.html @@ -53,6 +53,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -75,6 +79,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001.html index 3fa15f1d645..99cfcbb9b4e 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-001.html @@ -54,6 +54,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -76,6 +80,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002-ref.html index 592cf8933c0..741a795f20e 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002-ref.html @@ -51,6 +51,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -73,6 +77,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002.html index 8db71d35221..b82d308af1b 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-002.html @@ -53,6 +53,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -75,6 +79,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001-ref.html index 2fcc585581a..78d621219ab 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001-ref.html @@ -54,6 +54,12 @@ <div class="container"><img src="support/colors-8x16.png" class="alignStart"><!--stretch--></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + class="alignStart"><!--baseline--></div> + <div class="container"><img src="support/colors-8x16.png" + class="alignEnd"><!--last baseline--></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><img src="support/colors-8x16.png" class="alignCenter"><!--center--></div> @@ -88,6 +94,12 @@ <div class="container"><img src="support/colors-8x16.png" class="alignStart"><!--stretch--></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + class="alignStart"><!--baseline--></div> + <div class="container"><img src="support/colors-8x16.png" + class="alignEnd"><!--last baseline--></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><img src="support/colors-8x16.png" class="alignCenter"><!--center--></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001.html index ad392ccc213..fdd4f6220be 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-001.html @@ -53,6 +53,12 @@ <div class="container"><img src="support/colors-8x16.png" style="justify-self: stretch"></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: baseline"></div> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: last baseline"></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><img src="support/colors-8x16.png" style="justify-self: center"></div> @@ -87,6 +93,12 @@ <div class="container"><img src="support/colors-8x16.png" style="justify-self: stretch"></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: baseline"></div> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: last baseline"></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><img src="support/colors-8x16.png" style="justify-self: center"></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002-ref.html index 65badb02a48..a1d4e8163fd 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002-ref.html @@ -52,6 +52,12 @@ <div class="container"><img src="support/colors-8x16.png" class="alignStart"><!--stretch--></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + class="alignStart"><!--baseline--></div> + <div class="container"><img src="support/colors-8x16.png" + class="alignEnd"><!--last baseline--></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><img src="support/colors-8x16.png" class="alignCenter"><!--center--></div> @@ -86,6 +92,12 @@ <div class="container"><img src="support/colors-8x16.png" class="alignStart"><!--stretch--></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + class="alignStart"><!--baseline--></div> + <div class="container"><img src="support/colors-8x16.png" + class="alignEnd"><!--last baseline--></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><img src="support/colors-8x16.png" class="alignCenter"><!--center--></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002.html index c1747102918..61c1b97b51f 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-img-002.html @@ -52,6 +52,12 @@ <div class="container"><img src="support/colors-8x16.png" style="justify-self: stretch"></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: baseline"></div> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: last baseline"></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><img src="support/colors-8x16.png" style="justify-self: center"></div> @@ -86,6 +92,12 @@ <div class="container"><img src="support/colors-8x16.png" style="justify-self: stretch"></div> <br> + <!-- <baseline-position> --> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: baseline"></div> + <div class="container"><img src="support/colors-8x16.png" + style="justify-self: last baseline"></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><img src="support/colors-8x16.png" style="justify-self: center"></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001-ref.html index a2899e07fea..8e5db1efc59 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001-ref.html @@ -53,6 +53,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -75,6 +79,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001.html index a0a57aee0a8..18e024bf2e8 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-001.html @@ -54,6 +54,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -76,6 +80,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002-ref.html index 06312f500b5..c7176a7c210 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002-ref.html @@ -53,6 +53,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -75,6 +79,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002.html index a309859b5b4..d7e510e1b5e 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-002.html @@ -55,6 +55,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -77,6 +81,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003-ref.html index 9c243ac5f36..b38590c8021 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003-ref.html @@ -51,6 +51,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -73,6 +77,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003.html index 19cf377cad2..2224ff684af 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-003.html @@ -53,6 +53,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -75,6 +79,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004-ref.html index 3cbad644b49..1ebc9e62c97 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004-ref.html @@ -51,6 +51,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -73,6 +77,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004.html index f8170a80d37..a22fdc24fb7 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-rtl-004.html @@ -54,6 +54,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -76,6 +80,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001-ref.html index 0b40e42550b..9fff3eabcc0 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001-ref.html @@ -55,6 +55,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -77,6 +81,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001.html index d3ce4007d91..1bc2a5c3386 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-001.html @@ -53,6 +53,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -75,6 +79,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002-ref.html index 0b40e42550b..9fff3eabcc0 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002-ref.html @@ -55,6 +55,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -77,6 +81,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002.html index 03078a6b448..7b72c6aaeb1 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-002.html @@ -54,6 +54,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -76,6 +80,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003-ref.html index ecc148a3215..15507845661 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003-ref.html @@ -53,6 +53,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -75,6 +79,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003.html index e6a712d00da..582262bd3de 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-003.html @@ -52,6 +52,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -74,6 +78,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004-ref.html index ecc148a3215..15507845661 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004-ref.html @@ -53,6 +53,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> @@ -75,6 +79,10 @@ <div class="container"><div class="alignStart"><!--normal--></div></div> <div class="container"><div class="alignStart"><!--stretch--></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div class="alignStart"><!--baseline--></div></div> + <div class="container"><div class="alignEnd"><!--last baseline--></div></div> + <br> <!-- <self-position>, part 1: --> <div class="container"><div class="alignCenter"><!--center--></div></div> <div class="container"><div class="alignStart"><!--start--></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004.html index 070829ba8c6..63c893b6c4f 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/align3/grid-abspos-staticpos-justify-self-vertWM-004.html @@ -53,6 +53,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> @@ -75,6 +79,10 @@ <div class="container"><div style="justify-self: normal"></div></div> <div class="container"><div style="justify-self: stretch"></div></div> <br> + <!-- <baseline-position> --> + <div class="container"><div style="justify-self: baseline"></div></div> + <div class="container"><div style="justify-self: last baseline"></div></div> + <br> <!-- <self-position>, part 1 --> <div class="container"><div style="justify-self: center"></div></div> <div class="container"><div style="justify-self: start"></div></div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004-ref.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004-ref.xhtml index 00db4823e35..245e6f9e3c9 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004-ref.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004-ref.xhtml @@ -4,8 +4,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ --> <!-- Reference case - identical to the testcase, but with with the flex items' - vertical margin and padding values set to 0 by default, and then set to - specific pixel values for the items that have a 50px percent-basis. + margin and padding values set to explicit pixel values. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> @@ -21,27 +20,11 @@ } div.height50 { height: 50px; } - .marginA { margin: 0 8% 0 4%; } - .marginB { margin: 0 10% 0 14%; } - .paddingA { padding: 0 6% 0 2%; } - .paddingB { padding: 0 8% 0 12%; } + .marginA { margin: 20px 16px 12px 8px; } + .marginB { margin: 16px 20px 24px 28px; } + .paddingA { padding: 16px 12px 8px 4px; } + .paddingB { padding: 12px 16px 20px 24px; } - div.height50 > .marginA { - margin-top: 5px; - margin-bottom: 3px; - } - div.height50 > .marginB { - margin-top: 4px; - margin-bottom: 6px; - } - div.height50 > .paddingA { - padding-top: 4px; - padding-bottom: 2px; - } - div.height50 > .paddingB { - padding-top: 3px; - padding-bottom: 5px; - } div.child1 { flex: none; diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004.xhtml index 545e54f71d2..b513253fd19 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-mbp-horiz-004.xhtml @@ -3,19 +3,17 @@ Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ --> -<!-- Testcase with percent-valued padding and/or margin on flex items. The spec - says that percentage values on padding/margin-top and -bottom should be - resolved against the flex container's height (not its width, as would - be the case in a block). +<!-- Testcase with percent-valued padding and/or margin on flex items. + The spec allows these to be resolved against the flex container's + inline size (regardless of which axis the percent padding/margin is in). --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CSS Test: Testing percent-valued padding and margin on flex items</title> <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> - <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#layout-algorithm"/> + <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#item-margins"/> <link rel="match" href="flexbox-mbp-horiz-004-ref.xhtml"/> <style> - div { border: 0; } div.flexbox { width: 200px; display: flex; @@ -52,8 +50,9 @@ </style> </head> <body> - <!-- Flex container is auto-height - vertical margin and padding should - resolve to 0, since they don't have anything to resolve % against. --> + <!-- Flex container is auto-height - this shouldn't impact percent + margin/padding resolution, since they resolve against container's + inline-size, i.e. its width in this case. --> <div class="flexbox" ><div class="child1 paddingA"><div class="filler"/></div ><div class="child2 paddingB"><div class="filler"/></div @@ -61,8 +60,9 @@ ><div class="child2 marginB"></div ></div> - <!-- Flex container has height: 50px - vertical margin and padding should - resolve % values against that. --> + <!-- Flex container has height: 50px - again, this shouldn't impact percent + margin/padding resolution, since they resolve against container's + inline-size, i.e. its width in this case. --> <div class="flexbox height50" ><div class="child1 paddingA"><div class="filler"/></div ><div class="child2 paddingB"><div class="filler"/></div diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1-ref.html new file mode 100644 index 00000000000..c696d079f43 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1-ref.html @@ -0,0 +1,31 @@ +<!DOCTYPE HTML> +<title>CSS Test Reference: breaking of column rule</title> +<meta charset="utf-8"> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<style> + +.ref1, .ref2 { + display: inline-block; + vertical-align: top; + + border: 2px solid blue; + border-top: none; + border-bottom: none; +} + +.ref1 { + margin-left:49px; + height: 100px; + width: 148px; +} + +.ref2 { + margin-left: 148px; + height: 50px; + width: 10px; + + border-right: none; +} + +</style> +<span class="ref1"></span><span class="ref2"></span> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1.html new file mode 100644 index 00000000000..13deaa72cb7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/broken-column-rule-1.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML> +<title>CSS Test: breaking of column rule</title> +<meta charset="utf-8"> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="help" href="https://drafts.csswg.org/css-multicol/#column-gaps-and-rules"> +<link rel="match" href="broken-column-rule-1-ref.html"> +<style> + +.outer { + height: 100px; + column-fill: auto; + width: 550px; + column-count: 4; + column-gap: 50px; + /* leaves 100px for each column */ +} + +.inner { + column-count: 2; + column-rule: 2px solid blue; + height: 250px; +} + +.fill { + height: 500px; /* work around https://bugzilla.mozilla.org/show_bug.cgi?id=1374479#c4 */ +} + +</style> + +<div class="outer"> + <div class="inner"> + <div class="fill"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/reftest.list b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/reftest.list index 52e87560ed4..35102af64b6 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/reftest.list +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/multicol3/reftest.list @@ -1,2 +1,3 @@ +== broken-column-rule-1.html broken-column-rule-1-ref.html == moz-multicol3-column-balancing-break-inside-avoid-1.html moz-multicol3-column-balancing-break-inside-avoid-1-ref.html == multicol-height-002.xht reference/multicol-height-002.xht diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1-ref.html new file mode 100644 index 00000000000..8a568d25d92 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1-ref.html @@ -0,0 +1,90 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: compare individual transform with transform functions</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <meta name="assert" content="Tests whether individaul transform works correctlyi by compare the rendering result with transfrom functions of the 'transform' property."/> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + } + .row_1 { + top: 100px; + } + .scale_1{ + left: 100px; + width: 50px; + height: 100px; + transform: scaleX(2); + } + .translate_1 { + left: 150px; + transform: translateX(150px); + } + .rotate_1 { + left: 450px; + transform-origin: 50% 50%; + transform: rotate(90deg); + } + + .row_2 { + top: 250px; + } + .scale_2{ + left: 100px; + width: 50px; + height: 50px; + transform: scale(2, 2); + } + .translate_2 { + left: 150px; + top: 200px; + transform: translate(150px, 50px); + } + .rotate_2 { + left: 450px; + transform-origin: 50% 50%; + transform: rotate3d(0, 0, 1, 90deg); + } + .row_3 { + transform: perspective(500px); + top: 400px; + } + .scale_3{ + left: 100px; + width: 50px; + height: 50px; + transform: scale3d(2, 2, 2); + } + .translate_3 { + left: 150px; + transform: translate3d(150px, 10px, 10px); + } + .rotate_3 { + left: 450px; + transform-origin: 50% 50%; + transform: rotate3d(0, 1, 0, 45deg); + } + </style> + </head> + <body> + <div class="scale_1 row_1"></div> + <div class="translate_1 row_1"></div> + <div class="rotate_1 row_1"></div> + <div class="scale_2 row_2"></div> + <div class="translate_2 row_2"></div> + <div class="rotate_2 row_2"></div> + <div class="scale_3 row_3"></div> + <div class="translate_3 row_3"></div> + <div class="rotate_3 row_3"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1.html new file mode 100644 index 00000000000..4f83e2eac47 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-1.html @@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: compare individual transform with transform functions</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <meta name="assert" content="Tests whether individaul transform works correctlyi by compare the rendering result with transfrom functions of the 'transform' property."/> + <link rel="match" href="individual-transform-1-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + } + .row_1 { + top: 100px; + } + .scale_1{ + left: 100px; + width: 50px; + height: 100px; + /* test 'scale: <number>' */ + scale: 2; + } + .translate_1 { + left: 150px; + /* test 'translate: <length-percentage>' */ + translate: 150px; + } + .rotate_1 { + left: 450px; + transform-origin: 50% 50%; + /* test 'rota: te<angle>' */ + rotate: 90deg; + } + + .row_2 { + top: 250px; + } + .scale_2{ + left: 100px; + width: 50px; + height: 50px; + /* test 'scale: <number>{2}'' */ + scale: 2 2; + } + .translate_2 { + left: 150px; + top: 200px; + /* test 'translate: <length-percentage><length-percentage>' */ + translate: 150px 50px; + } + .rotate_2 { + left: 450px; + transform-origin: 50% 50%; + /* test 'rotate: <number>{3}<angle>'*/ + rotate: 0 0 1 90deg; + } + .row_3 { + transform: perspective(500px); + top: 400px; + } + .scale_3{ + left: 100px; + width: 50px; + height: 50px; + /* test 'scale: <number>{3}'' */ + scale: 2 2 2; + } + .translate_3 { + left: 150px; + /* test 'translate: <length-percentage><length>' */ + translate: 150px 10px 10px; + } + .rotate_3 { + left: 450px; + transform-origin: 50% 50%; + /* test 'rotate: <number>{3}<angle>'*/ + rotate: 0 1 0 45deg; + } + </style> + </head> + <body> + <div class="scale_1 row_1"></div> + <div class="translate_1 row_1"></div> + <div class="rotate_1 row_1"></div> + <div class="scale_2 row_2"></div> + <div class="translate_2 row_2"></div> + <div class="rotate_2 row_2"></div> + <div class="scale_3 row_3"></div> + <div class="translate_3 row_3"></div> + <div class="rotate_3 row_3"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html new file mode 100644 index 00000000000..ee956aa301f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2-ref.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + transform: translate(50px, 50px) rotate(45deg) scale(2, 2); + } + + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2a.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2a.html new file mode 100644 index 00000000000..3f6c97386ba --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2a.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 50px 50px; + rotate: 45deg; + scale: 2 2; + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2b.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2b.html new file mode 100644 index 00000000000..94dac2f10ff --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2b.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + rotate: 45deg; + scale: 2 2; + translate: 50px 50px; + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2c.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2c.html new file mode 100644 index 00000000000..f84ae228065 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2c.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 50px 50px; + rotate: 45deg; + transform: scale(2, 2); + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2d.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2d.html new file mode 100644 index 00000000000..5b5694f544e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2d.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 50px 50px; + transform: rotate(45deg) scale(2, 2); + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2e.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2e.html new file mode 100644 index 00000000000..0350137bede --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/individual-transform-2e.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>Individual transform: combine individual transform properties</title> + <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com"> + <link rel="author" title="Mozilla" href="https://www.mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#individual-transforms"> + <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#ctm"> + <meta name="assert" content="Tests that we combine transforms in the correct order."/> + <link rel="match" href="individual-transform-2-ref.html"> + <style> + div { + position: fixed; + width: 100px; + height: 100px; + top: 200px; + left: 200px; + transform-origin: 0 0; + border-style: solid; + border-width: 10px 0px 10px 0px; + border-color: lime; + translate: 0px 50px; + transform: translateX(50px) rotate(45deg) scale(2, 2); + } + </style> + </head> + <body> + <div></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list index 4bc525b0bd4..ef1d7aa77c6 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list @@ -4,3 +4,12 @@ == perspective-containing-block-dynamic-1b.html containing-block-dynamic-1-ref.html == perspective-zero.html reference/green.html == perspective-zero-2.html perspective-zero-2-ref.html + +# stylo-vs-gecko comparison fails since we support individual transform on new +# style system only. +== individual-transform-1.html individual-transform-1-ref.html +== individual-transform-2a.html individual-transform-2-ref.html +== individual-transform-2b.html individual-transform-2-ref.html +== individual-transform-2c.html individual-transform-2-ref.html +== individual-transform-2d.html individual-transform-2-ref.html +== individual-transform-2e.html individual-transform-2-ref.html diff --git a/tests/wpt/web-platform-tests/custom-elements/Document-createElement.html b/tests/wpt/web-platform-tests/custom-elements/Document-createElement.html index 52a68e8e178..97a56595502 100644 --- a/tests/wpt/web-platform-tests/custom-elements/Document-createElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/Document-createElement.html @@ -342,6 +342,18 @@ test(function () { }, 'document.createElement must report an exception thrown by a custom element constructor'); +test(() => { + class MyElement extends HTMLDivElement {} + + // createElement with unknown 'is' should not throw. + // https://github.com/w3c/webcomponents/issues/608 + let div = document.createElement('div', { is: 'my-div' }); + assert_false(div instanceof MyElement); + + customElements.define('my-div', MyElement, { extends: 'div' }); + document.body.appendChild(div); + assert_true(div instanceof MyElement, 'Undefined element is upgraded on connecting to a document'); +}, 'document.createElement with unknown "is" value should create "undefined" state element'); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html b/tests/wpt/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html index bf9e00ab528..95274d8c757 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/CSSStyleDeclaration.html @@ -26,13 +26,17 @@ test_mutating_style_property_priority(function (instance, propertyName, idlName, instance.style.setProperty(propertyName, instance.style[idlName], isImportant ? 'important': ''); }, 'setProperty on CSSStyleDeclaration'); -test_mutating_style_property_value(function (instance, propertyName, idlName, value) { - instance.style.setPropertyValue(propertyName, value); -}, 'setPropertyValue on CSSStyleDeclaration'); +if (CSSStyleDeclaration.prototype.setPropertyValue) { + test_mutating_style_property_value(function (instance, propertyName, idlName, value) { + instance.style.setPropertyValue(propertyName, value); + }, 'setPropertyValue on CSSStyleDeclaration'); +} -test_mutating_style_property_priority(function (instance, propertyName, idlName, isImportant) { - instance.style.setPropertyPriority(propertyName, isImportant ? 'important': ''); -}, 'setPropertyPriority on CSSStyleDeclaration'); +if (CSSStyleDeclaration.prototype.setPropertyPriority) { + test_mutating_style_property_priority(function (instance, propertyName, idlName, isImportant) { + instance.style.setPropertyPriority(propertyName, isImportant ? 'important': ''); + }, 'setPropertyPriority on CSSStyleDeclaration'); +} test_removing_style_property_value(function (instance, propertyName, idlName) { instance.style.removeProperty(propertyName); diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLElement.html index bce4ef1627c..5fe422cdfc1 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLElement.html @@ -22,8 +22,6 @@ testReflectBooleanAttribute('hidden', 'hidden', 'hidden on HTMLElement'); testReflectAttribute('tabIndex', 'tabindex', '0', '1', 'tabIndex on HTMLElement'); testReflectAttribute('accessKey', 'accesskey', 'a', 'b', 'accessKey on HTMLElement'); testReflectAttributeWithContentValues('draggable', 'draggable', true, 'true', false, 'false', 'draggable on HTMLElement'); -testReflectAttribute('dropzone', 'dropzone', 'copy', 'move', 'dropzone on HTMLElement'); -testReflectAttribute('contextMenu', 'contextmenu', 'menu1', 'menu2', 'contextMenu on HTMLElement'); testReflectAttributeWithContentValues('spellcheck', 'spellcheck', true, 'true', false, 'false', 'spellcheck on HTMLElement'); testNodeDisconnector(function (customElement) { diff --git a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLInputElement.html b/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLInputElement.html index 8193d2c57f7..dc4b22a22ee 100644 --- a/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLInputElement.html +++ b/tests/wpt/web-platform-tests/custom-elements/reactions/HTMLInputElement.html @@ -11,51 +11,56 @@ <script src="./resources/reactions.js"></script> <body> <script> -test(() => { - const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); - const instance = document.createElement('input', { is: element.name }); +if (HTMLInputElement.prototype.capture) { + test(() => { + const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); + const instance = document.createElement('input', { is: element.name }); - assert_array_equals(element.takeLog().types(), ['constructed']); - instance['capture'] = 'user'; - const logEntries = element.takeLog(); - assert_array_equals(logEntries.types(), ['attributeChanged']); - assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: '', newValue: 'user', namespace: null}); -}, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when adding new attribute'); + assert_array_equals(element.takeLog().types(), ['constructed']); + instance['capture'] = 'user'; + const logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: '', newValue: 'user', namespace: null}); + }, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when adding new attribute'); -test(() => { - const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); - const instance = document.createElement('input', { is: element.name }); + test(() => { + const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); + const instance = document.createElement('input', { is: element.name }); - instance['capture'] = 'user'; - assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); - instance['capture'] = 'environment'; - const logEntries = element.takeLog(); - assert_array_equals(logEntries.types(), ['attributeChanged']); - assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: 'user', newValue: 'environment', namespace: null}); -}, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when replacing an existing attribute'); + instance['capture'] = 'user'; + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + instance['capture'] = 'environment'; + const logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: 'user', newValue: 'environment', namespace: null}); + }, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when replacing an existing attribute'); -test(() => { - const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); - const instance = document.createElement('input', { is: element.name }); + test(() => { + const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); + const instance = document.createElement('input', { is: element.name }); - assert_array_equals(element.takeLog().types(), ['constructed']); - instance['capture'] = 'asdf'; - const logEntries = element.takeLog(); - assert_array_equals(logEntries.types(), ['attributeChanged']); - assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: '', newValue: 'asdf', namespace: null}); -}, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when adding invalid value default'); + assert_array_equals(element.takeLog().types(), ['constructed']); + instance['capture'] = 'asdf'; + const logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: '', newValue: 'asdf', namespace: null}); + }, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when adding invalid value default'); + test(() => { + const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); + const instance = document.createElement('input', { is: element.name }); -test(() => { - const element = define_build_in_custom_element(['capture'], HTMLInputElement, 'input'); - const instance = document.createElement('input', { is: element.name }); - - instance['capture'] = 'user'; - assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); - instance['capture'] = ''; - const logEntries = element.takeLog(); - assert_array_equals(logEntries.types(), ['attributeChanged']); - assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: 'user', newValue: '', namespace: null}); -}, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when removing the attribute'); + instance['capture'] = 'user'; + assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']); + instance['capture'] = ''; + const logEntries = element.takeLog(); + assert_array_equals(logEntries.types(), ['attributeChanged']); + assert_attribute_log_entry(logEntries.last(), {name: 'capture', oldValue: 'user', newValue: '', namespace: null}); + }, 'capture on HTMLInputElement must enqueue an attributeChanged reaction when removing the attribute'); +} else { + // testharness.js doesn't allow a test file with no tests. + test(() => { + }, 'No tests if HTMLInputEement has no "capture" IDL attribute'); +} </script> </body> diff --git a/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md b/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md index f707995033d..62a2028eb4e 100644 --- a/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md +++ b/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md @@ -1,6 +1,10 @@ To run WPT on Chrome on an android device, some additional set up is required. -First until we find a better way, we need to root the android device and update -the /etc/hosts file to include + +First of all, as usual Android development, we need to have `adb` and be able to +connect to the device. + +Furthermore, until we find a better way, we need to root the android device and +update the /etc/hosts file to include ``` 127.0.0.1 web-platform.test @@ -12,22 +16,6 @@ the /etc/hosts file to include 0.0.0.0 nonexistent-origin.web-platform.test ``` -Next, we need to start adb and reverse forward the web-platform.tests ports - -``` -adb start-server -``` - -Add any ports that you need based on your config. For example: -``` -adb reverse tcp:8000 tcp:8000 -adb reverse tcp:8001 tcp:8001 -adb reverse tcp:8081 tcp:8081 -adb reverse tcp:8444 tcp:8444 -adb reverse tcp:9001 tcp:9001 -adb reverse tcp:9444 tcp:9444 -``` - After this, we may run wpt with the `chrome_android` product ``` diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/image-click-form-data.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/image-click-form-data.html new file mode 100644 index 00000000000..87b77e4805d --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/image-click-form-data.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Check form-data for image submit button with non-empty 'value' attribute</title> +<link rel="author" title="Shanmuga Pandi" href="mailto:shanmuga.m@samsung.com"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#constructing-form-data-set"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> +"use strict"; + +// promise_test instead of async_test because this test use window.success, and so can't run at the same time. + +promise_test(t => { + return new Promise(resolve => { + window.success = t.step_func(locationLoaded => { + const expected = (new URL("resources/image-submit-click.html?name.x=0&name.y=0", location.href)).href; + assert_equals(locationLoaded, expected); + resolve(); + }); + + const iframe = document.createElement("iframe"); + iframe.src = "resources/image-submit-click.html"; + document.body.appendChild(iframe); + }); +}, "Image submit button should not add extra form data if 'value' attribute is present with non-empty value"); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/resources/image-submit-click.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/resources/image-submit-click.html new file mode 100644 index 00000000000..8461a03d7a5 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/resources/image-submit-click.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<form> + <input type="image" name="name" value="value"> +</form> + +<script> +"use strict"; +if (window.location.search.startsWith("?name.x")) { + // The action pointed to ourself, so the form submitted something + window.parent.success(window.location.href); +} else { + const input = document.querySelector("input"); + input.click(); +} +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html index 109b10ead44..17cc35c21b0 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-event-constructor.html @@ -33,7 +33,7 @@ test(function() { // reason is passed. var r = new Error(); assert_equals(new PromiseRejectionEvent('eventType', { promise: p, reason: r }).reason, r); - + assert_equals(new PromiseRejectionEvent('eventType', { promise: p, reason: null }).reason, null); // All initializers are passed. assert_equals(new PromiseRejectionEvent('eventType', { bubbles: true, cancelable: true, promise: p, reason: r }).bubbles, true); diff --git a/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl b/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl new file mode 100644 index 00000000000..64df3c16139 --- /dev/null +++ b/tests/wpt/web-platform-tests/interfaces/css-typed-om.idl @@ -0,0 +1,338 @@ +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface CSSStyleValue { + stringifier; + [Exposed=Window] static CSSStyleValue parse(DOMString property, DOMString cssText); + [Exposed=Window] static sequence<CSSStyleValue> parseAll(DOMString property, DOMString cssText); +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface StylePropertyMapReadOnly { + readonly maplike<DOMString, sequence<CSSStyleValue>>; + any get(DOMString property); + /* 'any' means (undefined or CSSStyleValue) here, + see https://github.com/heycam/webidl/issues/60 */ + sequence<CSSStyleValue> getAll(DOMString property); + boolean has(DOMString property); + stringifier; +}; + +callback UpdateFunction = CSSStyleValue (CSSStyleValue oldValue); + +[Exposed=Window] +interface StylePropertyMap : StylePropertyMapReadOnly { + maplike<DOMString, sequence<CSSStyleValue>>; + void append(DOMString property, (CSSStyleValue or DOMString)... values); + void delete(DOMString property); + void set(DOMString property, (CSSStyleValue or DOMString)... values); + void update(DOMString property, UpdateFunction updateFunction); +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +partial interface Element { + StylePropertyMapReadOnly computedStyleMap(); +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +partial interface CSSStyleRule { + [SameObject] readonly attribute StylePropertyMap styleMap; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +partial interface ElementCSSInlineStyle { + [SameObject] readonly attribute StylePropertyMap attributeStyleMap; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(sequence<CSSUnparsedSegment> members)] +interface CSSUnparsedValue : CSSStyleValue { + iterable<CSSUnparsedSegment>; + readonly attribute unsigned long length; + getter CSSUnparsedSegment (unsigned long index); + setter CSSUnparsedSegment (unsigned long index, CSSUnparsedSegment val); +}; + +typedef (DOMString or CSSVariableReferenceValue) CSSUnparsedSegment; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(DOMString variable, optional CSSUnparsedValue fallback)] +interface CSSVariableReferenceValue { + attribute DOMString variable; + readonly attribute CSSUnparsedValue? fallback; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(DOMString value)] +interface CSSKeywordValue : CSSStyleValue { + attribute DOMString value; +}; + +typedef (DOMString or CSSKeywordValue) CSSKeywordish; + +typedef (double or CSSNumericValue) CSSNumberish; + +enum CSSNumericBaseType { + "length", + "angle", + "time", + "frequency", + "resolution", + "flex", + "percent", +}; + +dictionary CSSNumericType { + long length; + long angle; + long time; + long frequency; + long resolution; + long flex; + long percent; + CSSNumericBaseType percentHint; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface CSSNumericValue : CSSStyleValue { + CSSNumericValue add(CSSNumberish... values); + CSSNumericValue sub(CSSNumberish... values); + CSSNumericValue mul(CSSNumberish... values); + CSSNumericValue div(CSSNumberish... values); + CSSNumericValue min(CSSNumberish... values); + CSSNumericValue max(CSSNumberish... values); + + boolean equals(CSSNumberish... value); + + CSSUnitValue to(DOMString unit); + CSSMathSum toSum(DOMString... units); + CSSNumericType type(); + + [Exposed=Window] static CSSNumericValue parse(DOMString cssText); +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(double value, DOMString unit)] +interface CSSUnitValue : CSSNumericValue { + attribute double value; + readonly attribute DOMString unit; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface CSSMathValue : CSSNumericValue { + readonly attribute CSSMathOperator operator; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumberish... args)] +interface CSSMathSum : CSSMathValue { + readonly attribute CSSNumericArray values; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumberish... args)] +interface CSSMathProduct : CSSMathValue { + readonly attribute CSSNumericArray values; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumberish arg)] +interface CSSMathNegate : CSSMathValue { + readonly attribute CSSNumericValue value; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumberish arg)] +interface CSSMathInvert : CSSMathValue { + readonly attribute CSSNumericValue value; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumberish... args)] +interface CSSMathMin : CSSMathValue { + readonly attribute CSSNumericArray values; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumberish... args)] +interface CSSMathMax : CSSMathValue { + readonly attribute CSSNumericArray values; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface CSSNumericArray { + iterable<CSSNumericValue>; + readonly attribute unsigned long length; + getter CSSNumericValue (unsigned long index); +}; + +enum CSSMathOperator { + "sum", + "product", + "negate", + "invert", + "min", + "max", +}; + +// FIXME: Uncomment this when IDLHarness supports CSS namespaces: +// https://github.com/w3c/web-platform-tests/issues/7583 +/* +partial namespace CSS { + CSSUnitValue number(double value); + CSSUnitValue percent(double value); + + // <length> + CSSUnitValue em(double value); + CSSUnitValue ex(double value); + CSSUnitValue ch(double value); + CSSUnitValue ic(double value); + CSSUnitValue rem(double value); + CSSUnitValue lh(double value); + CSSUnitValue rlh(double value); + CSSUnitValue vw(double value); + CSSUnitValue vh(double value); + CSSUnitValue vi(double value); + CSSUnitValue vb(double value); + CSSUnitValue vmin(double value); + CSSUnitValue vmax(double value); + CSSUnitValue cm(double value); + CSSUnitValue mm(double value); + CSSUnitValue Q(double value); + CSSUnitValue in(double value); + CSSUnitValue pt(double value); + CSSUnitValue pc(double value); + CSSUnitValue px(double value); + + // <angle> + CSSUnitValue deg(double value); + CSSUnitValue grad(double value); + CSSUnitValue rad(double value); + CSSUnitValue turn(double value); + + // <time> + CSSUnitValue s(double value); + CSSUnitValue ms(double value); + + // <frequency> + CSSUnitValue Hz(double value); + CSSUnitValue kHz(double value); + + // <resolution> + CSSUnitValue dpi(double value); + CSSUnitValue dpcm(double value); + CSSUnitValue dppx(double value); + + // <flex> + CSSUnitValue fr(double value); +}; +*/ + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(sequence<CSSTransformComponent> transforms)] +interface CSSTransformValue : CSSStyleValue { + iterable<CSSTransformComponent>; + readonly attribute unsigned long length; + getter CSSTransformComponent (unsigned long index); + setter CSSTransformComponent (unsigned long index, CSSTransformComponent val); + + readonly attribute boolean is2D; + DOMMatrix toMatrix(); +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface CSSTransformComponent { + stringifier; + attribute boolean is2D; + DOMMatrix toMatrix(); +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumericValue x, CSSNumericValue y, optional CSSNumericValue z)] +interface CSSTranslate : CSSTransformComponent { + attribute CSSNumericValue x; + attribute CSSNumericValue y; + attribute CSSNumericValue z; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumericValue angle), + Constructor(CSSNumberish x, CSSNumberish y, CSSNumberish z, CSSNumericValue angle)] +interface CSSRotate : CSSTransformComponent { + attribute CSSNumberish x; + attribute CSSNumberish y; + attribute CSSNumberish z; + attribute CSSNumericValue angle; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumberish x, CSSNumberish y, optional CSSNumberish z)] +interface CSSScale : CSSTransformComponent { + attribute CSSNumberish x; + attribute CSSNumberish y; + attribute CSSNumberish z; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumericValue ax, CSSNumericValue ay)] +interface CSSSkew : CSSTransformComponent { + attribute CSSNumericValue ax; + attribute CSSNumericValue ay; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumericValue ax)] +interface CSSSkewX : CSSTransformComponent { + attribute CSSNumericValue ax; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumericValue ay)] +interface CSSSkewY : CSSTransformComponent { + attribute CSSNumericValue ay; +}; + +/* Note that skew(x,y) is *not* the same as skewX(x) skewY(y), + thus the separate interfaces for all three. */ + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumericValue length)] +interface CSSPerspective : CSSTransformComponent { + attribute CSSNumericValue length; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(DOMMatrixReadOnly matrix, optional CSSMatrixComponentOptions options)] +interface CSSMatrixComponent : CSSTransformComponent { + attribute DOMMatrix matrix; +}; + +dictionary CSSMatrixComponentOptions { + boolean is2D = false; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(CSSNumericValue x, CSSNumericValue y)] +interface CSSPositionValue : CSSStyleValue { + attribute CSSNumericValue x; + attribute CSSNumericValue y; +}; + +enum CSSResourceState {"unloaded", "loading", "loaded", "error"}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface CSSResourceValue : CSSStyleValue { + readonly attribute CSSResourceState state; +}; + + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet)] +interface CSSImageValue : CSSResourceValue { + readonly attribute double? intrinsicWidth; + readonly attribute double? intrinsicHeight; + readonly attribute double? intrinsicRatio; +}; + +[Exposed=(Window, Worker, PaintWorklet, LayoutWorklet), + Constructor(USVString url)] +interface CSSURLImageValue : CSSImageValue { + readonly attribute USVString url; +}; diff --git a/tests/wpt/web-platform-tests/media-source/mediasource-endofstream.html b/tests/wpt/web-platform-tests/media-source/mediasource-endofstream.html index bca80af8162..5b6114fa716 100644 --- a/tests/wpt/web-platform-tests/media-source/mediasource-endofstream.html +++ b/tests/wpt/web-platform-tests/media-source/mediasource-endofstream.html @@ -52,7 +52,8 @@ // Note that segmentInfo.duration is expected to also be the // highest track buffer range end time. Therefore, endOfStream() should // not change duration with this media. - assert_equals(threeDecimalPlaces(segmentInfo.duration), threeDecimalPlaces(mediaSource.duration)); + assert_equals(threeDecimalPlaces(segmentInfo.duration), threeDecimalPlaces(mediaSource.duration), + 'SegmentInfo duration should initially roughly match mediaSource duration'); assert_less_than_equal(highestEndTime, mediaSource.duration, 'Media duration may be slightly longer than intersected track buffered ranges'); @@ -64,7 +65,8 @@ assert_equals(sourceBuffer.buffered.length, 1, 'Media data properly buffered after endOfStream'); - assert_equals(threeDecimalPlaces(segmentInfo.duration), threeDecimalPlaces(mediaSource.duration)); + assert_equals(threeDecimalPlaces(segmentInfo.duration), threeDecimalPlaces(mediaSource.duration), + 'SegmentInfo duration should still roughly match mediaSource duration'); assert_less_than_equal(highestEndTime, mediaSource.duration, 'Media duration may be slightly longer than intersected track buffered ranges'); assert_equals(sourceBuffer.buffered.end(0), mediaSource.duration, diff --git a/tests/wpt/web-platform-tests/picture-in-picture/disable-picture-in-picture.html b/tests/wpt/web-platform-tests/picture-in-picture/disable-picture-in-picture.html new file mode 100644 index 00000000000..8726d1aaf88 --- /dev/null +++ b/tests/wpt/web-platform-tests/picture-in-picture/disable-picture-in-picture.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<title>Test disable Picture-in-Picture</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/picture-in-picture-helpers.js"></script> +<body></body> +<script> +test(t => { + const video = document.createElement('video'); + assert_false(video.disablePictureInPicture); // default value + + video.setAttribute('disablepictureinpicture', 'foo'); + assert_true(video.disablePictureInPicture); + + video.removeAttribute('disablepictureinpicture'); + assert_false(video.disablePictureInPicture); + + video.disablePictureInPicture = true; + assert_equals(video.getAttribute('disablepictureinpicture'), ''); + + video.disablePictureInPicture = false; + assert_equals(video.getAttribute('disablepictureinpicture'), null); +}, 'Test disablePictureInPicture IDL attribute'); + +promise_test(t => { + const video = document.createElement('video'); + video.disablePictureInPicture = true; + return promise_rejects(t, 'InvalidStateError', + requestPictureInPictureWithTrustedClick(video)); +}, 'Request Picture-in-Picture rejects if disablePictureInPicture is true'); + +promise_test(t => { + const video = document.createElement('video'); + return requestPictureInPictureWithTrustedClick(video) + .then(() => { + video.disablePictureInPicture = true; + assert_equals(document.pictureInPictureElement, null); + }); +}, 'pictureInPictureElement is unset if disablePictureInPicture becomes true'); + +promise_test(t => { + const video = document.createElement('video'); + return requestPictureInPictureWithTrustedClick(video) + .then(() => { + video.disablePictureInPicture = false; + assert_equals(document.pictureInPictureElement, video); + }); +}, 'pictureInPictureElement is unchanged if disablePictureInPicture becomes false'); + +promise_test(t => { + const video = document.createElement('video'); + return requestPictureInPictureWithTrustedClick(video) + .then(() => { + document.createElement('video').disablePictureInPicture = true; + assert_equals(document.pictureInPictureElement, video); + }); +}, 'pictureInPictureElement is unchanged if disablePictureInPicture becomes ' + + 'true for another video'); +</script> diff --git a/tests/wpt/web-platform-tests/picture-in-picture/enter-picture-in-picture.html b/tests/wpt/web-platform-tests/picture-in-picture/enter-picture-in-picture.html new file mode 100644 index 00000000000..e44087c3ff1 --- /dev/null +++ b/tests/wpt/web-platform-tests/picture-in-picture/enter-picture-in-picture.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<title>Test enterpictureinpicture event</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/picture-in-picture-helpers.js"></script> +<body></body> +<script> +async_test(t => { + const video = document.createElement('video'); + + video.addEventListener('enterpictureinpicture', t.step_func_done(event => { + assert_equals(event.target, video); + assert_equals(event.bubbles, true); + assert_equals(event.cancelable, false); + assert_equals(event.composed, false); + assert_equals(document.pictureInPictureElement, video); + })); + + return requestPictureInPictureWithTrustedClick(video); +}); +</script> diff --git a/tests/wpt/web-platform-tests/picture-in-picture/exit-picture-in-picture.html b/tests/wpt/web-platform-tests/picture-in-picture/exit-picture-in-picture.html new file mode 100644 index 00000000000..e0ab7acd8f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/picture-in-picture/exit-picture-in-picture.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>Test exit Picture-in-Picture</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/picture-in-picture-helpers.js"></script> +<body></body> +<script> +promise_test(t => { + return requestPictureInPictureWithTrustedClick(document.createElement('video')) + .then(() => document.exitPictureInPicture()); +}, 'Exit Picture-in-Picture resolves when there is a Picture-in-Picture video'); + + +promise_test(t => { + return promise_rejects(t, 'InvalidStateError', + document.exitPictureInPicture()); +}, 'Exit Picture-in-Picture rejects when there is no Picture-in-Picture video'); +</script> diff --git a/tests/wpt/web-platform-tests/picture-in-picture/not-processing-user-gesture.html b/tests/wpt/web-platform-tests/picture-in-picture/not-processing-user-gesture.html new file mode 100644 index 00000000000..00758946b80 --- /dev/null +++ b/tests/wpt/web-platform-tests/picture-in-picture/not-processing-user-gesture.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<title>Test request Picture-in-Picture requires a user gesture</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<body></body> +<script> +promise_test(t => { + return promise_rejects(t, 'NotAllowedError', + document.createElement('video').requestPictureInPicture()); +}, ); +</script> diff --git a/tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-element.html b/tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-element.html new file mode 100644 index 00000000000..71e39961816 --- /dev/null +++ b/tests/wpt/web-platform-tests/picture-in-picture/picture-in-picture-element.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<title>Test Picture-in-Picture element</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/picture-in-picture-helpers.js"></script> +<body></body> +<script> +promise_test(t => { + assert_equals(document.pictureInPictureElement, null); + const video = document.createElement('video'); + + return requestPictureInPictureWithTrustedClick(video) + .then(() => { + assert_equals(document.pictureInPictureElement, video); + return document.exitPictureInPicture(); + }) + .then(() => { + assert_equals(document.pictureInPictureElement, null); + }) +}); +</script> diff --git a/tests/wpt/web-platform-tests/picture-in-picture/request-picture-in-picture.html b/tests/wpt/web-platform-tests/picture-in-picture/request-picture-in-picture.html new file mode 100644 index 00000000000..eaabcb7a205 --- /dev/null +++ b/tests/wpt/web-platform-tests/picture-in-picture/request-picture-in-picture.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<title>Test request Picture-in-Picture</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="resources/picture-in-picture-helpers.js"></script> +<body></body> +<script> +promise_test(t => { + return requestPictureInPictureWithTrustedClick(document.createElement('video')); +}); +</script> diff --git a/tests/wpt/web-platform-tests/picture-in-picture/resources/picture-in-picture-helpers.js b/tests/wpt/web-platform-tests/picture-in-picture/resources/picture-in-picture-helpers.js new file mode 100644 index 00000000000..0808a991a26 --- /dev/null +++ b/tests/wpt/web-platform-tests/picture-in-picture/resources/picture-in-picture-helpers.js @@ -0,0 +1,21 @@ +function callWithTrustedClick(callback) { + return new Promise(resolve => { + let button = document.createElement('button'); + button.textContent = 'click to continue test'; + button.style.display = 'block'; + button.style.fontSize = '20px'; + button.style.padding = '10px'; + button.onclick = () => { + document.body.removeChild(button); + resolve(callback()); + }; + document.body.appendChild(button); + test_driver.click(button); + }); +} + +// Calls requestPictureInPicture() in a context that's 'allowed to request PiP'. +function requestPictureInPictureWithTrustedClick(videoElement) { + return callWithTrustedClick( + () => videoElement.requestPictureInPicture()); +}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/resource-timing/resource_TAO_origin.htm b/tests/wpt/web-platform-tests/resource-timing/resource_TAO_origin.htm index dc5efa43ee2..a0c0465e726 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resource_TAO_origin.htm +++ b/tests/wpt/web-platform-tests/resource-timing/resource_TAO_origin.htm @@ -12,19 +12,12 @@ <script> setup({explicit_done: true}); -// explicitly test the namespace before we start testing -test_namespace("getEntriesByType"); - -var d; -var iframe; -var iframeBody; -var image; -var random = Math.random(); +// Explicitly test the namespace before we start testing. +test_namespace('getEntriesByType'); +let iframe; function setup_iframe() { iframe = document.getElementById('frameContext'); - d = iframe.contentWindow.document; - iframeBody = d.body; iframe.addEventListener('load', onload_test, false); } function onload_test() { @@ -32,15 +25,22 @@ function onload_test() { done(); return; } - var context = new PerformanceContext(iframe.contentWindow.performance); - var entries = context.getEntriesByType('resource'); - - if(entries.length > 0) { - entry = entries[0]; - - test_not_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, 'redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should NOT be all returned as 0 when the value of Timing-Allow-Origin is a case-sensitive match for the value of the origin of the current document and TAO algorithm passes'); - } + const context = new PerformanceContext(iframe.contentWindow.performance); + const entries = context.getEntriesByType('resource'); + test_equals(entries.length, 1, 'The iframe should have one resource timing entry.'); + const entry = entries[0]; + test_equals(entry.redirectStart, 0, 'redirectStart should be 0 in cross-origin request since no redirect.'); + test_equals(entry.redirectEnd, 0, 'redirectEnd should be 0 in cross-origin request since no redirect.'); + test_greater_than(entry.domainLookupStart, 0, 'domainLookupStart should not be 0 in timing-allow cross-origin request.'); + test_greater_than(entry.domainLookupEnd, 0, 'domainLookupEnd should not be 0 in timing-allow cross-origin request.'); + test_greater_than(entry.connectStart, 0, 'connectStart should not be 0 in timing-allow cross-origin request.'); + test_greater_than(entry.connectEnd, 0, 'connectEnd should not be 0 in timing-allow cross-origin request.'); + test_greater_than(entry.requestStart, 0, 'requestStart should not be 0 in timing-allow cross-origin request.'); + test_greater_than(entry.responseStart, 0, 'responseStart should not be 0 in timing-allow cross-origin request.'); + test_equals(entry.secureConnectionStart, 0, 'secureConnectionStart should be 0 in cross-origin request since no ssl!'); + test_greater_than(entry.fetchStart, 0, 'fetchStart should not be 0 in timing-allow cross-origin request.'); + test_greater_than(entry.responseEnd, 0, 'responseEnd should not be 0 in timing-allow cross-origin request.'); done(); } window.setup_iframe = setup_iframe; diff --git a/tests/wpt/web-platform-tests/resource-timing/resource_TAO_zero.htm b/tests/wpt/web-platform-tests/resource-timing/resource_TAO_zero.htm index 0fe16c082a0..a15f54d0134 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resource_TAO_zero.htm +++ b/tests/wpt/web-platform-tests/resource-timing/resource_TAO_zero.htm @@ -13,18 +13,11 @@ setup({explicit_done: true}); // explicitly test the namespace before we start testing -test_namespace("getEntriesByType"); - -var d; -var iframe; -var iframeBody; -var image; -var random = Math.random(); +test_namespace('getEntriesByType'); +let iframe; function setup_iframe() { iframe = document.getElementById('frameContext'); - d = iframe.contentWindow.document; - iframeBody = d.body; iframe.addEventListener('load', onload_test, false); } function onload_test() { @@ -32,15 +25,21 @@ function onload_test() { done(); return; } - var context = new PerformanceContext(iframe.contentWindow.performance); - var entries = context.getEntriesByType('resource'); - - if(entries.length > 0) { - entry = entries[0]; - - test_equals((entry.redirectStart + entry.redirectEnd + entry.domainLookupStart + entry.domainLookupEnd + entry.connectStart + entry.connectEnd + entry.secureConnectionStart + entry.requestStart + entry.responseStart), 0, "redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, connectEnd, secureConnectionStart, requestStart, and responseStart -- should be all returned as 0 when the HTTP response includes zero Timing-Allow-Origin header value and TAO algorithm fails"); - } - + const context = new PerformanceContext(iframe.contentWindow.performance); + const entries = context.getEntriesByType('resource'); + test_equals(entries.length, 1, 'There should be one resource timing entry.'); + const entry = entries[0]; + test_equals(entry.redirectStart, 0, 'redirectStart should be 0 in cross-origin request.'); + test_equals(entry.redirectEnd, 0, 'redirectEnd should be 0 in cross-origin request.'); + test_equals(entry.domainLookupStart, 0, 'domainLookupStart should be 0 in cross-origin request.'); + test_equals(entry.domainLookupEnd, 0, 'domainLookupEnd should be 0 in cross-origin request.'); + test_equals(entry.connectStart, 0, 'connectStart should be 0 in cross-origin request.'); + test_equals(entry.connectEnd, 0, 'connectEnd should be 0 in cross-origin request.'); + test_equals(entry.requestStart, 0, 'requestStart should be 0 in cross-origin request.'); + test_equals(entry.responseStart, 0, 'responseStart should be 0 in cross-origin request.'); + test_equals(entry.secureConnectionStart, 0, 'secureConnectionStart should be 0 in cross-origin request.'); + test_greater_than(entry.fetchStart, 0, 'fetchStart should be greater than 0 in cross-origin request.'); + test_greater_than(entry.responseEnd, 0, 'responseEnd should be greater than 0 in cross-origin request.'); done(); } window.setup_iframe = setup_iframe; diff --git a/tests/wpt/web-platform-tests/resources/chromium/chooser_service.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/chooser_service.mojom.js index 30bba4baad9..aee5d8741f3 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/chooser_service.mojom.js +++ b/tests/wpt/web-platform-tests/resources/chromium/chooser_service.mojom.js @@ -2,19 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - 'use strict'; (function() { - var mojomId = 'device/usb/public/interfaces/chooser_service.mojom'; + var mojomId = 'device/usb/public/mojom/chooser_service.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); - - // TODO(yzshen): Define these aliases to minimize the differences between the - // old/new modes. Remove them when the old mode goes away. var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; @@ -25,13 +21,13 @@ mojo.internal.exposeNamespace('device.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( - 'device/usb/public/interfaces/device.mojom', 'device.mojom.js'); + 'device/usb/public/mojom/device.mojom', 'device.mojom.js'); } var device_manager$ = mojo.internal.exposeNamespace('device.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( - 'device/usb/public/interfaces/device_manager.mojom', 'device_manager.mojom.js'); + 'device/usb/public/mojom/device_manager.mojom', 'device_manager.mojom.js'); } @@ -66,7 +62,6 @@ return err; - // validate UsbChooserService_GetPermission_Params.deviceFilters err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(device_manager$.UsbDeviceFilter), false, [0], 0); if (err !== validator.validationError.NONE) @@ -122,7 +117,6 @@ return err; - // validate UsbChooserService_GetPermission_ResponseParams.result err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, device$.UsbDeviceInfo, true); if (err !== validator.validationError.NONE) diff --git a/tests/wpt/web-platform-tests/resources/chromium/device.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/device.mojom.js index ce5660cd52e..86c93dd66a5 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/device.mojom.js +++ b/tests/wpt/web-platform-tests/resources/chromium/device.mojom.js @@ -2,19 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - 'use strict'; (function() { - var mojomId = 'device/usb/public/interfaces/device.mojom'; + var mojomId = 'device/usb/public/mojom/device.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); - - // TODO(yzshen): Define these aliases to minimize the differences between the - // old/new modes. Remove them when the old mode goes away. var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; @@ -25,7 +21,7 @@ mojo.internal.exposeNamespace('mojo.common.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( - 'mojo/common/string16.mojom', '../../../../mojo/common/string16.mojom.js'); + 'mojo/public/mojom/base/string16.mojom', '../../../../mojo/public/mojom/base/string16.mojom.js'); } @@ -212,14 +208,12 @@ - // validate UsbEndpointInfo.direction err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 4, UsbTransferDirection); if (err !== validator.validationError.NONE) return err; - // validate UsbEndpointInfo.type err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, UsbTransferType); if (err !== validator.validationError.NONE) @@ -297,14 +291,12 @@ - // validate UsbAlternateInterfaceInfo.interfaceName err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, string16$.String16, true); if (err !== validator.validationError.NONE) return err; - // validate UsbAlternateInterfaceInfo.endpoints err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 8, new codec.PointerTo(UsbEndpointInfo), false, [0], 0); if (err !== validator.validationError.NONE) @@ -380,7 +372,6 @@ - // validate UsbInterfaceInfo.alternates err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 8, new codec.PointerTo(UsbAlternateInterfaceInfo), false, [0], 0); if (err !== validator.validationError.NONE) @@ -455,14 +446,12 @@ - // validate UsbConfigurationInfo.configurationName err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, string16$.String16, true); if (err !== validator.validationError.NONE) return err; - // validate UsbConfigurationInfo.interfaces err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 8, new codec.PointerTo(UsbInterfaceInfo), false, [0], 0); if (err !== validator.validationError.NONE) @@ -552,7 +541,6 @@ return err; - // validate UsbDeviceInfo.guid err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) @@ -570,21 +558,18 @@ - // validate UsbDeviceInfo.manufacturerName err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 24, string16$.String16, true); if (err !== validator.validationError.NONE) return err; - // validate UsbDeviceInfo.productName err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 32, string16$.String16, true); if (err !== validator.validationError.NONE) return err; - // validate UsbDeviceInfo.serialNumber err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 40, string16$.String16, true); if (err !== validator.validationError.NONE) @@ -592,7 +577,6 @@ - // validate UsbDeviceInfo.configurations err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 48, 8, new codec.PointerTo(UsbConfigurationInfo), false, [0], 0); if (err !== validator.validationError.NONE) @@ -688,14 +672,12 @@ return err; - // validate UsbControlTransferParams.type err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbControlTransferType); if (err !== validator.validationError.NONE) return err; - // validate UsbControlTransferParams.recipient err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 4, UsbControlTransferRecipient); if (err !== validator.validationError.NONE) @@ -772,7 +754,6 @@ - // validate UsbIsochronousPacket.status err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 8, UsbTransferStatus); if (err !== validator.validationError.NONE) @@ -886,7 +867,6 @@ return err; - // validate UsbDevice_Open_ResponseParams.error err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbOpenDeviceError); if (err !== validator.validationError.NONE) @@ -1814,7 +1794,6 @@ return err; - // validate UsbDevice_ControlTransferIn_Params.params err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, UsbControlTransferParams, false); if (err !== validator.validationError.NONE) @@ -1877,16 +1856,14 @@ return err; - // validate UsbDevice_ControlTransferIn_ResponseParams.status err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus); if (err !== validator.validationError.NONE) return err; - // validate UsbDevice_ControlTransferIn_ResponseParams.data - err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, true, [0], 0); + err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; @@ -1952,14 +1929,12 @@ return err; - // validate UsbDevice_ControlTransferOut_Params.params err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, UsbControlTransferParams, false); if (err !== validator.validationError.NONE) return err; - // validate UsbDevice_ControlTransferOut_Params.data err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) @@ -2028,7 +2003,6 @@ return err; - // validate UsbDevice_ControlTransferOut_ResponseParams.status err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus); if (err !== validator.validationError.NONE) @@ -2165,16 +2139,14 @@ return err; - // validate UsbDevice_GenericTransferIn_ResponseParams.status err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus); if (err !== validator.validationError.NONE) return err; - // validate UsbDevice_GenericTransferIn_ResponseParams.data - err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, true, [0], 0); + err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; @@ -2241,7 +2213,6 @@ - // validate UsbDevice_GenericTransferOut_Params.data err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) @@ -2308,7 +2279,6 @@ return err; - // validate UsbDevice_GenericTransferOut_ResponseParams.status err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 0, UsbTransferStatus); if (err !== validator.validationError.NONE) @@ -2375,7 +2345,6 @@ - // validate UsbDevice_IsochronousTransferIn_Params.packetLengths err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 4, codec.Uint32, false, [0], 0); if (err !== validator.validationError.NONE) @@ -2443,14 +2412,12 @@ return err; - // validate UsbDevice_IsochronousTransferIn_ResponseParams.data - err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 1, codec.Uint8, true, [0], 0); + err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; - // validate UsbDevice_IsochronousTransferIn_ResponseParams.packets err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 8, new codec.PointerTo(UsbIsochronousPacket), false, [0], 0); if (err !== validator.validationError.NONE) @@ -2512,14 +2479,12 @@ - // validate UsbDevice_IsochronousTransferOut_Params.data err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 8, 1, codec.Uint8, false, [0], 0); if (err !== validator.validationError.NONE) return err; - // validate UsbDevice_IsochronousTransferOut_Params.packetLengths err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 16, 4, codec.Uint32, false, [0], 0); if (err !== validator.validationError.NONE) @@ -2588,7 +2553,6 @@ return err; - // validate UsbDevice_IsochronousTransferOut_ResponseParams.packets err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(UsbIsochronousPacket), false, [0], 0); if (err !== validator.validationError.NONE) diff --git a/tests/wpt/web-platform-tests/resources/chromium/device_manager.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/device_manager.mojom.js index 99ebd854be0..2e1b30164b9 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/device_manager.mojom.js +++ b/tests/wpt/web-platform-tests/resources/chromium/device_manager.mojom.js @@ -2,19 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - 'use strict'; (function() { - var mojomId = 'device/usb/public/interfaces/device_manager.mojom'; + var mojomId = 'device/usb/public/mojom/device_manager.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); - - // TODO(yzshen): Define these aliases to minimize the differences between the - // old/new modes. Remove them when the old mode goes away. var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; @@ -25,13 +21,13 @@ mojo.internal.exposeNamespace('device.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( - 'device/usb/public/interfaces/device.mojom', 'device.mojom.js'); + 'device/usb/public/mojom/device.mojom', 'device.mojom.js'); } var string16$ = mojo.internal.exposeNamespace('mojo.common.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( - 'mojo/common/string16.mojom', '../../../../mojo/common/string16.mojom.js'); + 'mojo/public/mojom/base/string16.mojom', '../../../../mojo/public/mojom/base/string16.mojom.js'); } @@ -86,7 +82,6 @@ - // validate UsbDeviceFilter.serialNumber err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 8, string16$.String16, true); if (err !== validator.validationError.NONE) @@ -165,7 +160,6 @@ return err; - // validate UsbEnumerationOptions.filters err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(UsbDeviceFilter), false, [0], 0); if (err !== validator.validationError.NONE) @@ -221,7 +215,6 @@ return err; - // validate UsbDeviceManager_GetDevices_Params.options err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, UsbEnumerationOptions, true); if (err !== validator.validationError.NONE) @@ -277,7 +270,6 @@ return err; - // validate UsbDeviceManager_GetDevices_ResponseParams.results err = messageValidator.validateArrayPointer(offset + codec.kStructHeaderSize + 0, 8, new codec.PointerTo(device$.UsbDeviceInfo), false, [0], 0); if (err !== validator.validationError.NONE) @@ -334,14 +326,12 @@ return err; - // validate UsbDeviceManager_GetDevice_Params.guid err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; - // validate UsbDeviceManager_GetDevice_Params.deviceRequest err = messageValidator.validateInterfaceRequest(offset + codec.kStructHeaderSize + 8, false) if (err !== validator.validationError.NONE) @@ -407,7 +397,6 @@ return err; - // validate UsbDeviceManager_SetClient_Params.client err = messageValidator.validateInterface(offset + codec.kStructHeaderSize + 0, false); if (err !== validator.validationError.NONE) @@ -463,7 +452,6 @@ return err; - // validate UsbDeviceManagerClient_OnDeviceAdded_Params.deviceInfo err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, device$.UsbDeviceInfo, false); if (err !== validator.validationError.NONE) @@ -519,7 +507,6 @@ return err; - // validate UsbDeviceManagerClient_OnDeviceRemoved_Params.deviceInfo err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, device$.UsbDeviceInfo, false); if (err !== validator.validationError.NONE) diff --git a/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js index dd2d6533bc0..7028fcb8eca 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js +++ b/tests/wpt/web-platform-tests/resources/chromium/fake_bluetooth.mojom.js @@ -5,7 +5,7 @@ 'use strict'; (function() { - var mojomId = 'device/bluetooth/public/interfaces/test/fake_bluetooth.mojom'; + var mojomId = 'device/bluetooth/public/mojom/test/fake_bluetooth.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; @@ -21,7 +21,7 @@ mojo.internal.exposeNamespace('bluetooth.mojom'); if (mojo.config.autoLoadMojomDeps) { mojo.internal.loadMojomIfNecessary( - 'device/bluetooth/public/interfaces/uuid.mojom', '../uuid.mojom.js'); + 'device/bluetooth/public/mojom/uuid.mojom', '../uuid.mojom.js'); } @@ -1256,7 +1256,7 @@ FakeCentral_RemoveFakeService_Params.prototype.initDefaults_ = function() { - this.identifier = null; + this.serviceId = null; this.peripheralAddress = null; }; FakeCentral_RemoveFakeService_Params.prototype.initFields_ = function(fields) { @@ -1280,7 +1280,7 @@ return err; - // validate FakeCentral_RemoveFakeService_Params.identifier + // validate FakeCentral_RemoveFakeService_Params.serviceId err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false) if (err !== validator.validationError.NONE) return err; @@ -1301,7 +1301,7 @@ var val = new FakeCentral_RemoveFakeService_Params(); var numberOfBytes = decoder.readUint32(); var version = decoder.readUint32(); - val.identifier = decoder.decodeStruct(codec.String); + val.serviceId = decoder.decodeStruct(codec.String); val.peripheralAddress = decoder.decodeStruct(codec.String); return val; }; @@ -1310,7 +1310,7 @@ var packed; encoder.writeUint32(FakeCentral_RemoveFakeService_Params.encodedSize); encoder.writeUint32(0); - encoder.encodeStruct(codec.String, val.identifier); + encoder.encodeStruct(codec.String, val.serviceId); encoder.encodeStruct(codec.String, val.peripheralAddress); }; function FakeCentral_RemoveFakeService_ResponseParams(values) { @@ -3017,9 +3017,9 @@ .apply(this.ptr.getProxy(), arguments); }; - FakeCentralProxy.prototype.removeFakeService = function(identifier, peripheralAddress) { + FakeCentralProxy.prototype.removeFakeService = function(serviceId, peripheralAddress) { var params = new FakeCentral_RemoveFakeService_Params(); - params.identifier = identifier; + params.serviceId = serviceId; params.peripheralAddress = peripheralAddress; return new Promise(function(resolve, reject) { var builder = new codec.MessageV1Builder( @@ -3285,8 +3285,8 @@ FakeCentralStub.prototype.addFakeService = function(peripheralAddress, serviceUuid) { return this.delegate_ && this.delegate_.addFakeService && this.delegate_.addFakeService(peripheralAddress, serviceUuid); } - FakeCentralStub.prototype.removeFakeService = function(identifier, peripheralAddress) { - return this.delegate_ && this.delegate_.removeFakeService && this.delegate_.removeFakeService(identifier, peripheralAddress); + FakeCentralStub.prototype.removeFakeService = function(serviceId, peripheralAddress) { + return this.delegate_ && this.delegate_.removeFakeService && this.delegate_.removeFakeService(serviceId, peripheralAddress); } FakeCentralStub.prototype.addFakeCharacteristic = function(characteristicUuid, properties, serviceId, peripheralAddress) { return this.delegate_ && this.delegate_.addFakeCharacteristic && this.delegate_.addFakeCharacteristic(characteristicUuid, properties, serviceId, peripheralAddress); @@ -3422,7 +3422,7 @@ return true; case kFakeCentral_RemoveFakeService_Name: var params = reader.decodeStruct(FakeCentral_RemoveFakeService_Params); - this.removeFakeService(params.identifier, params.peripheralAddress).then(function(response) { + this.removeFakeService(params.serviceId, params.peripheralAddress).then(function(response) { var responseParams = new FakeCentral_RemoveFakeService_ResponseParams(); responseParams.success = response.success; diff --git a/tests/wpt/web-platform-tests/resources/chromium/string16.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/string16.mojom.js index 058956bf169..9dbb35664fa 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/string16.mojom.js +++ b/tests/wpt/web-platform-tests/resources/chromium/string16.mojom.js @@ -7,7 +7,7 @@ if ((typeof mojo !== 'undefined') && mojo.internal && mojo.config) { (function() { - var mojomId = 'mojo/common/string16.mojom'; + var mojomId = 'mojo/public/mojom/base/string16.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; @@ -87,7 +87,7 @@ if ((typeof mojo !== 'undefined') && mojo.internal && mojo.config) { if ((typeof mojo === 'undefined') || !mojo.internal || !mojo.config) { -define("mojo/common/string16.mojom", [ +define("mojo/public/mojom/base/string16.mojom", [ "mojo/public/js/associated_bindings", "mojo/public/js/bindings", "mojo/public/js/codec", diff --git a/tests/wpt/web-platform-tests/resources/chromium/uuid.mojom.js b/tests/wpt/web-platform-tests/resources/chromium/uuid.mojom.js index 03a8b8d3c9e..3b1b616ee34 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/uuid.mojom.js +++ b/tests/wpt/web-platform-tests/resources/chromium/uuid.mojom.js @@ -5,15 +5,12 @@ 'use strict'; (function() { - var mojomId = 'device/bluetooth/public/interfaces/uuid.mojom'; + var mojomId = 'device/bluetooth/public/mojom/uuid.mojom'; if (mojo.internal.isMojomLoaded(mojomId)) { console.warn('The following mojom is loaded multiple times: ' + mojomId); return; } mojo.internal.markMojomLoaded(mojomId); - - // TODO(yzshen): Define these aliases to minimize the differences between the - // old/new modes. Remove them when the old mode goes away. var bindings = mojo; var associatedBindings = mojo; var codec = mojo.internal; diff --git a/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js b/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js index 08c82547ed8..502dd5c6394 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js +++ b/tests/wpt/web-platform-tests/resources/chromium/webusb-test.js @@ -20,12 +20,12 @@ let internal = { }; // Converts an ECMAScript String object to an instance of -// mojo.common.mojom.String16. +// mojo_base.mojom.String16. function mojoString16ToString(string16) { return String.fromCharCode.apply(null, string16.data); } -// Converts an instance of mojo.common.mojom.String16 to an ECMAScript String. +// Converts an instance of mojo_base.mojom.String16 to an ECMAScript String. function stringToMojoString16(string) { let array = new Array(string.length); for (var i = 0; i < string.length; ++i) { diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html new file mode 100644 index 00000000000..f1ff7ae59a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-video-with-range-request.https.html @@ -0,0 +1,93 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Canvas tainting due to video whose responses are fetched via a service worker including range requests</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js?pipe=sub"></script> +<script src="/common/get-host-info.sub.js"></script> +<body> +<script> +// These tests try to test canvas tainting due to a <video> element. The video +// src URL is same-origin as the page, but the response is fetched via a service +// worker that does tricky things like returning opaque responses from another +// origin. Furthermore, this tests range requests so there are multiple +// responses. +// +// We test range requests by having the server return 206 Partial Content to the +// first request (which doesn't necessarily have a "Range" header or one with a +// byte range). Then the <video> element automatically makes ranged requests +// (the "Range" HTTP request header specifies a byte range). The server responds +// to these with 206 Partial Content for the given range. +function range_request_test(script, expected, description) { + promise_test(t => { + let frame; + let registration; + add_result_callback(() => { + if (frame) frame.remove(); + if (registration) registration.unregister(); + }); + + const scope = 'resources/fetch-canvas-tainting-iframe.html'; + return service_worker_unregister_and_register(t, script, scope) + .then(r => { + registration = r; + return wait_for_state(t, registration.installing, 'activated'); + }) + .then(() => { + return with_iframe(scope); + }) + .then(f => { + frame = f; + // Add "?VIDEO&PartialContent" to get a video resource from the + // server using range requests. + const video_url = 'fetch-access-control.py?VIDEO&PartialContent'; + return frame.contentWindow.create_test_case_promise(video_url); + }) + .then(result => { + assert_equals(result, expected); + }); + }, description); +} + +// We want to consider a number of scenarios: +// (1) Range responses come from a single origin, the same-origin as the page. +// The canvas should not be tainted. +range_request_test( + 'resources/fetch-event-network-fallback-worker.js', + 'NOT_TAINTED', + 'range responses from single origin (same-origin)'); + +// (2) Range responses come from a single origin, cross-origin from the page +// (and without CORS sharing). This is not possible to test, since service +// worker can't make a request with a "Range" HTTP header in no-cors mode. + +// (3) Range responses come from multiple origins. The first response comes from +// cross-origin (and without CORS sharing, so is opaque). Subsequent +// responses come from same-origin. The canvas should be tainted (but in +// Chrome this is a LOAD_ERROR since it disallows range responses from +// multiple origins, period). +range_request_test( + 'resources/range-request-to-different-origins-worker.js', + 'TAINTED', + 'range responses from multiple origins (cross-origin first)'); + +// (4) Range responses come from multiple origins. The first response comes from +// same-origin. Subsequent responses come from cross-origin (and without +// CORS sharing). Like (2) this is not possible since the service worker +// cannot make range requests cross-origin. + +// (5) Range responses come from a single origin, with a mix of opaque and +// non-opaque responses. The first request uses 'no-cors' mode to +// receive an opaque response, and subsequent range requests use 'cors' +// to receive non-opaque responses. The canvas should be tainted. +range_request_test( + 'resources/range-request-with-different-cors-modes-worker.js', + 'TAINTED', + 'range responses from single origin with both opaque and non-opaque responses'); + +// (6) Range responses come from a single origin, with a mix of opaque and +// non-opaque responses. The first request uses 'cors' mode to +// receive an non-opaque response, and subsequent range requests use +// 'no-cors' to receive non-opaque responses. Like (2) this is not possible. +</script> +</body> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-body-loaded-in-chunk.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-body-loaded-in-chunk.https.html new file mode 100644 index 00000000000..824b6f3217b --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-body-loaded-in-chunk.https.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>respondWith with a response whose body is being loaded from the network by chunks</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +<script> +'use strict'; + +const WORKER = 'resources/fetch-event-respond-with-body-loaded-in-chunk-worker.js'; +const SCOPE = 'resources/fetch-event-respond-with-body-loaded-in-chunk-iframe.html'; + +promise_test(async t => { + var reg = await service_worker_unregister_and_register(t, WORKER, SCOPE); + add_completion_callback(() => reg.unregister()); + await wait_for_state(t, reg.installing, 'activated'); + let iframe = await with_iframe(SCOPE); + t.add_cleanup(() => iframe.remove()); + + let response = await iframe.contentWindow.fetch('body-in-chunk'); + assert_equals(await response.text(), 'TEST_TRICKLE\nTEST_TRICKLE\nTEST_TRICKLE\nTEST_TRICKLE\n'); +}, 'Respond by chunks with a Response being loaded'); +</script> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-readable-stream-chunk.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-readable-stream-chunk.https.html new file mode 100644 index 00000000000..4544a9e08f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-readable-stream-chunk.https.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>respondWith with a response built from a ReadableStream</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.sub.js"></script> +<script> +'use strict'; + +const WORKER = 'resources/fetch-event-respond-with-readable-stream-chunk-worker.js'; +const SCOPE = 'resources/fetch-event-respond-with-readable-stream-chunk-iframe.html'; + +promise_test(async t => { + var reg = await service_worker_unregister_and_register(t, WORKER, SCOPE); + add_completion_callback(() => reg.unregister()); + await wait_for_state(t, reg.installing, 'activated'); + let iframe = await with_iframe(SCOPE); + t.add_cleanup(() => iframe.remove()); + + let response = await iframe.contentWindow.fetch('body-stream'); + assert_equals(await response.text(), 'chunk #1 chunk #2 chunk #3 chunk #4'); +}, 'Respond by chunks with a Response built from a ReadableStream'); +</script> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html index 92ef4684668..336e6ed89d7 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html @@ -8,6 +8,14 @@ var url_count = 0; var expected_results = {}; +function add_promise_to_test(url) +{ + var expected = expected_results[url]; + return new Promise((resolve) => { + expected.resolve = resolve; + }); +} + function image_test(frame, url, cross_origin, expected_mode, expected_credentials) { var actual_url = url + (++url_count); @@ -20,7 +28,8 @@ function image_test(frame, url, cross_origin, expected_mode, message: 'Image load (url:' + actual_url + ' cross_origin:' + cross_origin + ')' }; - return frame.contentWindow.load_image(actual_url, cross_origin); + frame.contentWindow.load_image(actual_url, cross_origin); + return add_promise_to_test(actual_url); } function script_test(frame, url, cross_origin, expected_mode, @@ -35,7 +44,8 @@ function script_test(frame, url, cross_origin, expected_mode, message: 'Script load (url:' + actual_url + ' cross_origin:' + cross_origin + ')' }; - return frame.contentWindow.load_script(actual_url, cross_origin); + frame.contentWindow.load_script(actual_url, cross_origin); + return add_promise_to_test(actual_url); } function css_test(frame, url, cross_origin, expected_mode, @@ -50,7 +60,8 @@ function css_test(frame, url, cross_origin, expected_mode, message: 'CSS load (url:' + actual_url + ' cross_origin:' + cross_origin + ')' }; - return frame.contentWindow.load_css(actual_url, cross_origin); + frame.contentWindow.load_css(actual_url, cross_origin); + return add_promise_to_test(actual_url); } function font_face_test(frame, url, expected_mode, expected_credentials) { @@ -63,7 +74,8 @@ function font_face_test(frame, url, expected_mode, expected_credentials) { integrity: '', message: 'FontFace load (url:' + actual_url + ')' }; - return frame.contentWindow.load_font(actual_url); + frame.contentWindow.load_font(actual_url); + return add_promise_to_test(actual_url); } function script_integrity_test(frame, url, integrity, expected_integrity) { @@ -76,7 +88,8 @@ function script_integrity_test(frame, url, integrity, expected_integrity) { integrity: expected_integrity, message: 'Script load (url:' + actual_url + ')' }; - return frame.contentWindow.load_script_with_integrity(actual_url, integrity); + frame.contentWindow.load_script_with_integrity(actual_url, integrity); + return add_promise_to_test(actual_url); } function css_integrity_test(frame, url, integrity, expected_integrity) { @@ -89,7 +102,8 @@ function css_integrity_test(frame, url, integrity, expected_integrity) { integrity: expected_integrity, message: 'CSS load (url:' + actual_url + ')' }; - return frame.contentWindow.load_css_with_integrity(actual_url, integrity); + frame.contentWindow.load_css_with_integrity(actual_url, integrity); + return add_promise_to_test(actual_url); } function fetch_test(frame, url, mode, credentials, @@ -103,8 +117,10 @@ function fetch_test(frame, url, mode, credentials, message: 'fetch (url:' + actual_url + ' mode:' + mode + ' credentials:' + credentials + ')' }; - return frame.contentWindow.fetch( - new Request(actual_url, {mode: mode, credentials: credentials})); + frame.contentWindow.fetch( + new Request(actual_url, {mode: mode, credentials: credentials})).then(() => { + }, () => { }); + return add_promise_to_test(actual_url); } function audio_test(frame, url, cross_origin, @@ -118,10 +134,11 @@ function audio_test(frame, url, cross_origin, message: 'Audio load (url:' + actual_url + ' cross_origin:' + cross_origin + ')' }; - return frame.contentWindow.load_audio(actual_url, cross_origin); + frame.contentWindow.load_audio(actual_url, cross_origin); + return add_promise_to_test(actual_url); } -async_test(function(t) { +promise_test(function(t) { var SCOPE = 'resources/fetch-request-resources-iframe.https.html'; var SCRIPT = 'resources/fetch-request-resources-worker.js'; var host_info = get_host_info(); @@ -131,13 +148,13 @@ async_test(function(t) { host_info['HTTPS_REMOTE_ORIGIN'] + base_path() + 'resources/dummy?test'; var worker; var frame; - service_worker_unregister_and_register(t, SCRIPT, SCOPE) + return service_worker_unregister_and_register(t, SCRIPT, SCOPE) .then(function(registration) { worker = registration.installing; return wait_for_state(t, worker, 'activated'); }) .then(function() { - return new Promise(function(resolve) { + return new Promise(function(resolve, reject) { var channel = new MessageChannel(); channel.port1.onmessage = t.step_func(function(msg) { if (msg.data.ready) { @@ -149,110 +166,110 @@ async_test(function(t) { if (!expected) { return; } - assert_equals( + test(() => { + assert_equals( result.mode, expected.mode, 'mode of ' + expected.message + ' must be ' + expected.mode + '.'); - assert_equals( + assert_equals( result.credentials, expected.credentials, 'credentials of ' + expected.message + ' must be ' + expected.credentials + '.'); - assert_equals( + assert_equals( result.redirect, expected.redirect, 'redirect mode of ' + expected.message + ' must be ' + expected.redirect + '.'); - assert_equals( + assert_equals( result.integrity, expected.integrity, 'integrity of ' + expected.message + ' must be ' + expected.integrity + '.'); - --url_count; + }, expected.message); + expected.resolve(); delete expected_results[result.url]; - if (url_count == 0) { - frame.remove(); - service_worker_unregister_and_done(t, SCOPE); - } }); worker.postMessage( {port: channel.port2}, [channel.port2]); }); }) .then(function() { return with_iframe(SCOPE); }) - .then(function(f) { + .then(async function(f) { frame = f; - image_test(f, LOCAL_URL, '', 'no-cors', 'include'); - image_test(f, REMOTE_URL, '', 'no-cors', 'include'); - css_test(f, LOCAL_URL, '', 'no-cors', 'include'); - css_test(f, REMOTE_URL, '', 'no-cors', 'include'); + await image_test(f, LOCAL_URL, '', 'no-cors', 'include'); + await image_test(f, REMOTE_URL, '', 'no-cors', 'include'); + await css_test(f, LOCAL_URL, '', 'no-cors', 'include'); + await css_test(f, REMOTE_URL, '', 'no-cors', 'include'); + + await image_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); + await image_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); + await image_test(f, REMOTE_URL, '', 'no-cors', 'include'); + await image_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); + await image_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); - image_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); - image_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); - image_test(f, REMOTE_URL, '', 'no-cors', 'include'); - image_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); - image_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); + await script_test(f, LOCAL_URL, '', 'no-cors', 'include'); + await script_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); + await script_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); + await script_test(f, REMOTE_URL, '', 'no-cors', 'include'); + await script_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); + await script_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); - script_test(f, LOCAL_URL, '', 'no-cors', 'include'); - script_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); - script_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); - script_test(f, REMOTE_URL, '', 'no-cors', 'include'); - script_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); - script_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); + await css_test(f, LOCAL_URL, '', 'no-cors', 'include'); + await css_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); + await css_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); + await css_test(f, REMOTE_URL, '', 'no-cors', 'include'); + await css_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); + await css_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); - css_test(f, LOCAL_URL, '', 'no-cors', 'include'); - css_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); - css_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); - css_test(f, REMOTE_URL, '', 'no-cors', 'include'); - css_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); - css_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); + await font_face_test(f, LOCAL_URL, 'cors', 'same-origin'); + await font_face_test(f, REMOTE_URL, 'cors', 'same-origin'); - font_face_test(f, LOCAL_URL, 'cors', 'same-origin'); - font_face_test(f, REMOTE_URL, 'cors', 'same-origin'); + await script_integrity_test(f, LOCAL_URL, ' ', ' '); + await script_integrity_test(f, LOCAL_URL, + 'This is not a valid integrity because it has no dashes', + 'This is not a valid integrity because it has no dashes'); + await script_integrity_test(f, LOCAL_URL, 'sha256-', 'sha256-'); + await script_integrity_test(f, LOCAL_URL, 'sha256-foo?123', 'sha256-foo?123'); + await script_integrity_test(f, LOCAL_URL, 'sha256-foo sha384-abc ', 'sha256-foo sha384-abc '); + await script_integrity_test(f, LOCAL_URL, 'sha256-foo sha256-abc', 'sha256-foo sha256-abc'); - script_integrity_test(f, LOCAL_URL, ' ', ' '); - script_integrity_test(f, LOCAL_URL, - 'This is not a valid integrity because it has no dashes', - 'This is not a valid integrity because it has no dashes'); - script_integrity_test(f, LOCAL_URL, 'sha256-', 'sha256-'); - script_integrity_test(f, LOCAL_URL, 'sha256-foo?123', 'sha256-foo?123'); - script_integrity_test(f, LOCAL_URL, 'sha256-foo sha384-abc ', 'sha256-foo sha384-abc '); - script_integrity_test(f, LOCAL_URL, 'sha256-foo sha256-abc', 'sha256-foo sha256-abc'); + await css_integrity_test(f, LOCAL_URL, ' ', ' '); + await css_integrity_test(f, LOCAL_URL, + 'This is not a valid integrity because it has no dashes', + 'This is not a valid integrity because it has no dashes'); + await css_integrity_test(f, LOCAL_URL, 'sha256-', 'sha256-'); + await css_integrity_test(f, LOCAL_URL, 'sha256-foo?123', 'sha256-foo?123'); + await css_integrity_test(f, LOCAL_URL, 'sha256-foo sha384-abc ', 'sha256-foo sha384-abc '); + await css_integrity_test(f, LOCAL_URL, 'sha256-foo sha256-abc', 'sha256-foo sha256-abc'); - css_integrity_test(f, LOCAL_URL, ' ', ' '); - css_integrity_test(f, LOCAL_URL, - 'This is not a valid integrity because it has no dashes', - 'This is not a valid integrity because it has no dashes'); - css_integrity_test(f, LOCAL_URL, 'sha256-', 'sha256-'); - css_integrity_test(f, LOCAL_URL, 'sha256-foo?123', 'sha256-foo?123'); - css_integrity_test(f, LOCAL_URL, 'sha256-foo sha384-abc ', 'sha256-foo sha384-abc '); - css_integrity_test(f, LOCAL_URL, 'sha256-foo sha256-abc', 'sha256-foo sha256-abc'); + await fetch_test(f, LOCAL_URL, 'same-origin', 'omit', 'same-origin', 'omit'); + await fetch_test(f, LOCAL_URL, 'same-origin', 'same-origin', + 'same-origin', 'same-origin'); + await fetch_test(f, LOCAL_URL, 'same-origin', 'include', + 'same-origin', 'include'); + await fetch_test(f, LOCAL_URL, 'no-cors', 'omit', 'no-cors', 'omit'); + await fetch_test(f, LOCAL_URL, 'no-cors', 'same-origin', + 'no-cors', 'same-origin'); + await fetch_test(f, LOCAL_URL, 'no-cors', 'include', 'no-cors', 'include'); + await fetch_test(f, LOCAL_URL, 'cors', 'omit', 'cors', 'omit'); + await fetch_test(f, LOCAL_URL, 'cors', 'same-origin', 'cors', 'same-origin'); + await fetch_test(f, LOCAL_URL, 'cors', 'include', 'cors', 'include'); + await fetch_test(f, REMOTE_URL, 'no-cors', 'omit', 'no-cors', 'omit'); + await fetch_test(f, REMOTE_URL, 'no-cors', 'same-origin', + 'no-cors', 'same-origin'); + await fetch_test(f, REMOTE_URL, 'no-cors', 'include', 'no-cors', 'include'); + await fetch_test(f, REMOTE_URL, 'cors', 'omit', 'cors', 'omit'); + await fetch_test(f, REMOTE_URL, 'cors', 'same-origin', 'cors', 'same-origin'); + await fetch_test(f, REMOTE_URL, 'cors', 'include', 'cors', 'include'); - fetch_test(f, LOCAL_URL, 'same-origin', 'omit', 'same-origin', 'omit'); - fetch_test(f, LOCAL_URL, 'same-origin', 'same-origin', - 'same-origin', 'same-origin'); - fetch_test(f, LOCAL_URL, 'same-origin', 'include', - 'same-origin', 'include'); - fetch_test(f, LOCAL_URL, 'no-cors', 'omit', 'no-cors', 'omit'); - fetch_test(f, LOCAL_URL, 'no-cors', 'same-origin', - 'no-cors', 'same-origin'); - fetch_test(f, LOCAL_URL, 'no-cors', 'include', 'no-cors', 'include'); - fetch_test(f, LOCAL_URL, 'cors', 'omit', 'cors', 'omit'); - fetch_test(f, LOCAL_URL, 'cors', 'same-origin', 'cors', 'same-origin'); - fetch_test(f, LOCAL_URL, 'cors', 'include', 'cors', 'include'); - fetch_test(f, REMOTE_URL, 'no-cors', 'omit', 'no-cors', 'omit'); - fetch_test(f, REMOTE_URL, 'no-cors', 'same-origin', - 'no-cors', 'same-origin'); - fetch_test(f, REMOTE_URL, 'no-cors', 'include', 'no-cors', 'include'); - fetch_test(f, REMOTE_URL, 'cors', 'omit', 'cors', 'omit'); - fetch_test(f, REMOTE_URL, 'cors', 'same-origin', 'cors', 'same-origin'); - fetch_test(f, REMOTE_URL, 'cors', 'include', 'cors', 'include'); + await audio_test(f, LOCAL_URL, '', 'no-cors', 'include'); + await audio_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); + await audio_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); + await audio_test(f, REMOTE_URL, '', 'no-cors', 'include'); + await audio_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); + await audio_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); - audio_test(f, LOCAL_URL, '', 'no-cors', 'include'); - audio_test(f, LOCAL_URL, 'anonymous', 'cors', 'same-origin'); - audio_test(f, LOCAL_URL, 'use-credentials', 'cors', 'include'); - audio_test(f, REMOTE_URL, '', 'no-cors', 'include'); - audio_test(f, REMOTE_URL, 'anonymous', 'cors', 'same-origin'); - audio_test(f, REMOTE_URL, 'use-credentials', 'cors', 'include'); - }) - .catch(unreached_rejection(t)); + frame.remove(); + service_worker_unregister(t, SCOPE); + }).catch(unreached_rejection(t)); }, 'Verify FetchEvent for resources.'); </script> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/request-end-to-end.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/request-end-to-end.https.html index 7b594aac57d..a39ceadd9f3 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/request-end-to-end.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/request-end-to-end.https.html @@ -23,9 +23,9 @@ promise_test(t => { assert_equals(result.method, 'GET', 'request.method'); assert_equals(result.referrer, location.href, 'request.referrer'); assert_equals(result.mode, 'navigate', 'request.mode'); - assert_equals(result.request_construct_error, 'TypeError', + assert_equals(result.request_construct_error, '', 'Constructing a Request with a Request whose mode ' + - 'is navigate and non-empty RequestInit must throw a ' + + 'is navigate and non-empty RequestInit must not throw a ' + 'TypeError.') assert_equals(result.credentials, 'include', 'request.credentials'); assert_equals(result.redirect, 'manual', 'request.redirect'); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js index 09d11fe6181..aff2b37ae02 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/client-navigate-worker.js @@ -5,11 +5,6 @@ importScripts("testharness-helpers.js") self.onfetch = function(e) { if (e.request.url.indexOf("client-navigate-frame.html") >= 0) { - if (e.clientId === null) { - e.respondWith(fetch(e.request)); - } else { - e.respondWith(Response.error()); - } return; } e.respondWith(new Response(e.clientId)); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py index c82ffbe0930..61b89cbd95b 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py @@ -36,6 +36,39 @@ def main(request, response): if "VIDEO" in request.GET: headers.append(("Content-Type", "video/webm")) body = open(os.path.join(request.doc_root, "media", "movie_5.ogv"), "rb").read() + length = len(body) + # If "PartialContent" is specified, the requestor wants to test range + # requests. For the initial request, respond with "206 Partial Content" + # and don't send the entire content. Then expect subsequent requests to + # have a "Range" header with a byte range. Respond with that range. + if "PartialContent" in request.GET: + if length < 1: + return 500, headers, "file is too small for range requests" + start = 0 + end = length - 1 + if "Range" in request.headers: + range_header = request.headers["Range"] + prefix = "bytes=" + split_header = range_header[len(prefix):].split("-") + # The first request might be "bytes=0-". We want to force a range + # request, so just return the first byte. + if split_header[0] == "0" and split_header[1] == "": + end = start + # Otherwise, it is a range request. Respect the values sent. + if split_header[0] != "": + start = int(split_header[0]) + if split_header[1] != "": + end = int(split_header[1]) + else: + # The request doesn't have a range. Force a range request by + # returning the first byte. + end = start + + headers.append(("Accept-Ranges", "bytes")) + headers.append(("Content-Length", str(end -start + 1))) + headers.append(("Content-Range", "bytes %d-%d/%d" % (start, end, length))) + chunk = body[start:(end + 1)] + return 206, headers, chunk return headers, body username = request.auth.username if request.auth.username else "undefined" diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-network-fallback-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-network-fallback-worker.js new file mode 100644 index 00000000000..daa200c2bad --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-network-fallback-worker.js @@ -0,0 +1,3 @@ +self.addEventListener('fetch', () => { + // Do nothing. + }); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-respond-with-body-loaded-in-chunk-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-respond-with-body-loaded-in-chunk-worker.js new file mode 100644 index 00000000000..d3ba8a8df2e --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-respond-with-body-loaded-in-chunk-worker.js @@ -0,0 +1,7 @@ +'use strict'; + +self.addEventListener('fetch', event => { + if (!event.request.url.match(/body-in-chunk$/)) + return; + event.respondWith(fetch("../../../fetch/api/resources/trickle.py?count=4&delay=50")); +}); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-respond-with-readable-stream-chunk-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-respond-with-readable-stream-chunk-worker.js new file mode 100644 index 00000000000..f954e3a18a5 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-respond-with-readable-stream-chunk-worker.js @@ -0,0 +1,40 @@ +'use strict'; + +self.addEventListener('fetch', event => { + if (!event.request.url.match(/body-stream$/)) + return; + + var counter = 0; + const encoder = new TextEncoder(); + const stream = new ReadableStream({ pull: controller => { + switch (++counter) { + case 1: + controller.enqueue(encoder.encode('')); + return; + case 2: + controller.enqueue(encoder.encode('chunk #1')); + return; + case 3: + controller.enqueue(encoder.encode(' ')); + return; + case 4: + controller.enqueue(encoder.encode('chunk #2')); + return; + case 5: + controller.enqueue(encoder.encode(' ')); + return; + case 6: + controller.enqueue(encoder.encode('chunk #3')); + return; + case 7: + controller.enqueue(encoder.encode(' ')); + return; + case 8: + controller.enqueue(encoder.encode('chunk #4')); + return; + default: + controller.close(); + } + }}); + event.respondWith(new Response(stream)); +}); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html index 867bf2385de..ab3e2a1280b 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html @@ -179,7 +179,7 @@ function form_data_test() { '\r\n' + 'file content\r\n' + '--' + boundary + '--\r\n'; - assert_equals(response.body, expected_body); + assert_true(response.body === expected_body, "form data response content is as expected"); }); } diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/range-request-to-different-origins-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/range-request-to-different-origins-worker.js new file mode 100644 index 00000000000..cab60583390 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/range-request-to-different-origins-worker.js @@ -0,0 +1,40 @@ +// This worker is meant to test range requests where the responses come from +// multiple origins. It forwards the first request to a cross-origin URL +// (generating an opaque response). The server is expected to return a 206 +// Partial Content response. Then the worker lets subsequent range requests +// fall back to network (generating same-origin responses). The intent is to try +// to trick the browser into treating the resource as same-origin. +// +// It would also be interesting to do the reverse test where the first request +// goes to the same-origin URL, and subsequent range requests go cross-origin in +// 'no-cors' mode to receive opaque responses. But the service worker cannot do +// this, because in 'no-cors' mode the 'range' HTTP header is disallowed. + +importScripts('/common/get-host-info.sub.js') + +let initial = true; +function is_initial_request() { + const old = initial; + initial = false; + return old; +} + +self.addEventListener('fetch', e => { + const url = new URL(e.request.url); + if (url.search.indexOf('VIDEO') == -1) { + // Fall back for non-video. + return; + } + + // Make the first request go cross-origin. + if (is_initial_request()) { + const cross_origin_url = get_host_info().HTTPS_REMOTE_ORIGIN + + url.pathname + url.search; + const cross_origin_request = new Request(cross_origin_url, + {mode: 'no-cors', headers: e.request.headers}); + e.respondWith(fetch(cross_origin_request)); + return; + } + + // Fall back to same origin for subsequent range requests. + }); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/range-request-with-different-cors-modes-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/range-request-with-different-cors-modes-worker.js new file mode 100644 index 00000000000..7580b0b68a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/range-request-with-different-cors-modes-worker.js @@ -0,0 +1,60 @@ +// This worker is meant to test range requests where the responses are a mix of +// opaque ones and non-opaque ones. It forwards the first request to a +// cross-origin URL (generating an opaque response). The server is expected to +// return a 206 Partial Content response. Then the worker forwards subsequent +// range requests to that URL, with CORS sharing generating a non-opaque +// responses. The intent is to try to trick the browser into treating the +// resource as non-opaque. +// +// It would also be interesting to do the reverse test where the first request +// uses 'cors', and subsequent range requests use 'no-cors' mode. But the +// service worker cannot do this, because in 'no-cors' mode the 'range' HTTP +// header is disallowed. + +importScripts('/common/get-host-info.sub.js') + +let initial = true; +function is_initial_request() { + const old = initial; + initial = false; + return old; +} + +self.addEventListener('fetch', e => { + const url = new URL(e.request.url); + if (url.search.indexOf('VIDEO') == -1) { + // Fall back for non-video. + return; + } + + let cross_origin_url = get_host_info().HTTPS_REMOTE_ORIGIN + + url.pathname + url.search; + + // The first request is no-cors. + if (is_initial_request()) { + const init = { mode: 'no-cors', headers: e.request.headers }; + const cross_origin_request = new Request(cross_origin_url, init); + e.respondWith(fetch(cross_origin_request)); + return; + } + + // Subsequent range requests are cors. + + // Copy headers needed for range requests. + let my_headers = new Headers; + if (e.request.headers.get('accept')) + my_headers.append('accept', e.request.headers.get('accept')); + if (e.request.headers.get('range')) + my_headers.append('range', e.request.headers.get('range')); + + // Add &ACAOrigin to allow CORS. + cross_origin_url += '&ACAOrigin=' + get_host_info().HTTPS_ORIGIN; + // Add &ACAHeaders to allow range requests. + cross_origin_url += '&ACAHeaders=accept,range'; + + // Make the CORS request. + const init = { mode: 'cors', headers: my_headers }; + const cross_origin_request = new Request(cross_origin_url, init); + e.respondWith(fetch(cross_origin_request)); + }); + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/register-closed-window-iframe.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/register-closed-window-iframe.html index ed743ea056e..117f25477b0 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/register-closed-window-iframe.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/register-closed-window-iframe.html @@ -1,14 +1,17 @@ <html> <head> <script> -window.addEventListener('message', function(evt) { +window.addEventListener('message', async function(evt) { if (evt.data === 'START') { var w = window.open('./'); var sw = w.navigator.serviceWorker; w.close(); w = null; - sw.register('doesntmatter.js'); - parent.postMessage('OK', '*'); + try { + await sw.register('doesntmatter.js'); + } finally { + parent.postMessage('OK', '*'); + } } }); </script> diff --git a/tests/wpt/web-platform-tests/svg/path/distance/pathLength-positive-percentage.svg b/tests/wpt/web-platform-tests/svg/path/distance/pathLength-positive-percentage.svg new file mode 100644 index 00000000000..d8e28b0889d --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/path/distance/pathLength-positive-percentage.svg @@ -0,0 +1,36 @@ +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:h="http://www.w3.org/1999/xhtml" + xmlns:xlink="http://www.w3.org/1999/xlink" + width="300" height="200" viewBox="0 0 300 200" + font-family="sans-serif" font-size="28"> + <metadata> + <h:link rel="help" href="https://svgwg.org/svg2-draft/paths.html#PathLengthAttribute"/> + <h:link rel="match" href="pathLength-positive-ref.svg"/> + <h:meta name="assert" content="pathLength scales distance along the path"/> + </metadata> + + <defs> + <path id="track" stroke="lightblue" fill="none" d="M 50 50 h 200" pathLength="2"/> + </defs> + + <g> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track" startOffset="0%">The quick brown fox</textPath> + </text> + </g> + + <g transform="translate(0,50)"> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track" startOffset="50%">The quick brown fox</textPath> + </text> + </g> + + <g transform="translate(0,100)"> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track" startOffset="-50%">The quick brown fox</textPath> + </text> + </g> +</svg> diff --git a/tests/wpt/web-platform-tests/svg/path/distance/pathLength-zero-percentage-ref.svg b/tests/wpt/web-platform-tests/svg/path/distance/pathLength-zero-percentage-ref.svg new file mode 100644 index 00000000000..dca91c1b5fc --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/path/distance/pathLength-zero-percentage-ref.svg @@ -0,0 +1,30 @@ +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + width="300" height="200" viewBox="0 0 300 200" + font-family="sans-serif" font-size="28"> + <defs> + <path id="track" stroke="lightblue" fill="none" d="M 50 50 h 200"/> + </defs> + + <g> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track">The quick brown fox</textPath> + </text> + </g> + + <g transform="translate(0,50)"> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track">The quick brown fox</textPath> + </text> + </g> + + <g transform="translate(0,100)"> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track">The quick brown fox</textPath> + </text> + </g> +</svg> + diff --git a/tests/wpt/web-platform-tests/svg/path/distance/pathLength-zero-percentage.svg b/tests/wpt/web-platform-tests/svg/path/distance/pathLength-zero-percentage.svg new file mode 100644 index 00000000000..24213e443d0 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/path/distance/pathLength-zero-percentage.svg @@ -0,0 +1,36 @@ +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:h="http://www.w3.org/1999/xhtml" + xmlns:xlink="http://www.w3.org/1999/xlink" + width="300" height="200" viewBox="0 0 300 200" + font-family="sans-serif" font-size="28"> + <metadata> + <h:link rel="help" href="https://svgwg.org/svg2-draft/paths.html#PathLengthAttribute"/> + <h:link rel="match" href="pathLength-zero-percentage-ref.svg"/> + <h:meta name="assert" content="A value of zero is valid and must be treated as a scaling factor of infinity."/> + </metadata> + + <defs> + <path id="track" stroke="lightblue" fill="none" d="M 50 50 h 200" pathLength="0"/> + </defs> + + <g> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track" startOffset="0%">The quick brown fox</textPath> + </text> + </g> + + <g transform="translate(0,50)"> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track" startOffset="50%">The quick brown fox</textPath> + </text> + </g> + + <g transform="translate(0,100)"> + <use xlink:href="#track"/> + <text> + <textPath xlink:href="#track" startOffset="-50%">The quick brown fox</textPath> + </text> + </g> +</svg> diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py index c6cc38afd67..ef3b7d6694b 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/browser.py +++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py @@ -281,6 +281,7 @@ class Chrome(Browser): logger.critical("dbus not running and can't be started") sys.exit(1) + class ChromeAndroid(Browser): """Chrome-specific interface for android. @@ -293,49 +294,16 @@ class ChromeAndroid(Browser): def install(self, dest=None): raise NotImplementedError - def platform_string(self): - raise NotImplementedError - def find_webdriver(self): return find_executable("chromedriver") def install_webdriver(self, dest=None): - """Install latest Webdriver.""" - if dest is None: - dest = os.pwd - latest = get("http://chromedriver.storage.googleapis.com/LATEST_RELEASE").text.strip() - url = "http://chromedriver.storage.googleapis.com/%s/chromedriver_%s.zip" % (latest, - self.platform_string()) - unzip(get(url).raw, dest) - - path = find_executable("chromedriver", dest) - st = os.stat(path) - os.chmod(path, st.st_mode | stat.S_IEXEC) - return path + chrome = Chrome() + return chrome.install_webdriver(dest) def version(self, root): raise NotImplementedError - def prepare_environment(self): - # https://bugs.chromium.org/p/chromium/issues/detail?id=713947 - logger.debug("DBUS_SESSION_BUS_ADDRESS %s" % os.environ.get("DBUS_SESSION_BUS_ADDRESS")) - if "DBUS_SESSION_BUS_ADDRESS" not in os.environ: - if find_executable("dbus-launch"): - logger.debug("Attempting to start dbus") - dbus_conf = subprocess.check_output(["dbus-launch"]) - logger.debug(dbus_conf) - - # From dbus-launch(1): - # - # > When dbus-launch prints bus information to standard output, - # > by default it is in a simple key-value pairs format. - for line in dbus_conf.strip().split("\n"): - key, _, value = line.partition("=") - os.environ[key] = value - else: - logger.critical("dbus not running and can't be started") - sys.exit(1) - class Opera(Browser): """Opera-specific interface. diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py index 9e53bc660e2..47090be0439 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py @@ -1,3 +1,6 @@ +import subprocess + +from ..config import * from .base import Browser, ExecutorBrowser, require_arg from ..webdriver_server import ChromeDriverServer from ..executors import executor_kwargs as base_executor_kwargs @@ -17,6 +20,8 @@ __wptrunner__ = {"product": "chrome_android", "env_extras": "env_extras", "env_options": "env_options"} +_wptserve_ports = set() + def check_args(**kwargs): require_arg(kwargs, "webdriver_binary") @@ -32,13 +37,19 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, **kwargs): from selenium.webdriver import DesiredCapabilities + # Use extend() to modify the global list in place. + _wptserve_ports.update(set( + server_config['ports']['http'] + server_config['ports']['https'] + + server_config['ports']['ws'] + server_config['ports']['wss'] + )) + executor_kwargs = base_executor_kwargs(test_type, server_config, cache_manager, **kwargs) executor_kwargs["close_after_done"] = True capabilities = dict(DesiredCapabilities.CHROME.items()) capabilities["chromeOptions"] = {} # required to start on mobile - capabilities["chromeOptions"]["androidPackage"] = "com.android.chrome" + capabilities["chromeOptions"]["androidPackage"] = "com.google.android.apps.chrome" for (kwarg, capability) in [("binary", "binary"), ("binary_args", "args")]: if kwargs[kwarg] is not None: @@ -76,6 +87,17 @@ class ChromeAndroidBrowser(Browser): binary=webdriver_binary, args=webdriver_args) + def _adb_run(self, args): + self.logger.info('adb ' + ' '.join(args)) + subprocess.check_call(['adb'] + args) + + def setup(self): + self._adb_run(['wait-for-device']) + self._adb_run(['forward', '--remove-all']) + self._adb_run(['reverse', '--remove-all']) + for port in _wptserve_ports: + self._adb_run(['reverse', 'tcp:%d' % port, 'tcp:%d' % port]) + def start(self, **kwargs): self.server.start(block=False) @@ -93,6 +115,8 @@ class ChromeAndroidBrowser(Browser): def cleanup(self): self.stop() + self._adb_run(['forward', '--remove-all']) + self._adb_run(['reverse', '--remove-all']) def executor_browser(self): return ExecutorBrowser, {"webdriver_url": self.server.url} 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 85ffbe3741a..16623f76867 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py @@ -229,7 +229,6 @@ class BrowserManager(object): def cleanup(self): if self.init_timer is not None: self.init_timer.cancel() - self.browser.cleanup() def check_for_crashes(self): self.browser.check_for_crashes() 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 4b917957f7f..400e12dba9d 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 @@ -1405,6 +1405,25 @@ const gCSSProperties = { { type: 'discrete', options: [ [ 'flat', 'preserve-3d' ] ] } ] }, + 'rotate': { + // https://drafts.csswg.org/css-transforms-2/#individual-transforms + types: [ 'rotateList' ] + }, + 'translate': { + // https://drafts.csswg.org/css-transforms-2/#individual-transforms + types: [ 'translateList' ], + setup: t => { + // We need to set a width/height for resolving percentages against. + const element = createElement(t); + element.style.width = '100px'; + element.style.height = '100px'; + return element; + } + }, + 'scale': { + // https://drafts.csswg.org/css-transforms-2/#individual-transforms + types: [ 'scaleList' ] + }, 'unicode-bidi': { // https://drafts.csswg.org/css-writing-modes-3/#propdef-unicode-bidi types: [ @@ -1519,6 +1538,18 @@ function testAnimationSampleMatrices(animation, idlName, testSamples) { } } +function testAnimationSampleRotate3d(animation, idlName, testSamples) { + const target = animation.effect.target; + for (const testSample of testSamples) { + animation.currentTime = testSample.time; + const actual = getComputedStyle(target)[idlName]; + const expected = testSample.expected; + assert_rotate3d_equals(actual, expected, + `The value should be ${expected} at` + + ` ${testSample.time}ms but got ${actual}`); + } +} + function createTestElement(t, setup) { return setup ? setup(t) : createElement(t); } diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js index eb9c8c163a1..2849b08c306 100644 --- a/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js +++ b/tests/wpt/web-platform-tests/web-animations/animation-model/animation-types/property-types.js @@ -1583,6 +1583,382 @@ const transformListType = { }, }; +const rotateListType = { + testInterpolation: (property, setup) => { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate( + { + [idlName]: ['45deg', '135deg'], + }, + 1000 + ); + + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '90deg' }]); + }, `${property} without rotation axes`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = + target.animate({ [idlName]: [ '0 1 0 0deg', + '0 1 0 90deg'] }, + 1000); + + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '0 1 0 45deg' }]); + }, `${property} with rotation axes`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + + const animation = + target.animate({ [idlName]: [ '0 1 0 0deg', + '0 1 0 720deg'] }, + 1000); + + testAnimationSamples(animation, idlName, + [{ time: 250, expected: '0 1 0 180deg' }]); + }, `${property} with rotation axes and range over 360 degrees`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = + target.animate({ [idlName]: [ '0 1 0 0deg', + '0 1 1 90deg'] }, + 1000); + + testAnimationSampleRotate3d(animation, idlName, + [{ time: 500, expected: '0 0.707107 0.707107 45deg' }]); + }, `${property} with different rotation axes`); + }, + testAddition: function(property, setup) { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '45deg'; + const animation = target.animate({ [idlName]: ['-90deg', '90deg'] }, + { duration: 1000, fill: 'both', + composite: 'add' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '-45deg' }, + { time: 1000, expected: '135deg' }]); + }, `${property} without rotation axes`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + // Rotation specified in transform property should not affect the computed + // value of |property|. + target.style.transform = 'rotate(20deg)'; + target.style[idlName] = '0 1 0 -45deg'; + const animation = + target.animate({ [idlName]: ['0 1 0 90deg', + '0 1 0 180deg'] }, + { duration: 1000, fill: 'both', composite: 'add' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '0 1 0 45deg' }, + { time: 1000, expected: '0 1 0 135deg' }]); + }, `${property} with underlying transform`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = + target.animate({ [idlName]: [ '0 1 0 0deg', + '1 1 1 270deg'] }, + { duration: 1000, fill: 'both', composite: 'add' }); + + testAnimationSampleRotate3d(animation, idlName, + [{ time: 500, expected: '0.57735 0.57735 0.57735 135deg' }]); + }, `${property} with different rotation axes`); + }, + testAccumulation: function(property, setup) { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '45deg'; + const animation = target.animate({ [idlName]: ['-90deg', '90deg'] }, + { duration: 1000, fill: 'both', + composite: 'accumulate' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '-45deg' }, + { time: 1000, expected: '135deg' }]); + }, `${property} without rotation axes`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style.transform = 'translateX(100px)'; + target.style[idlName] = '1 0 0 -45deg'; + const animation = + target.animate({ [idlName]: ['1 0 0 90deg', + '1 0 0 180deg'] }, + { duration: 1000, fill: 'both', composite: 'accumulate' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '1 0 0 45deg' }, + { time: 1000, expected: '1 0 0 135deg' }]); + }, `${property} with underlying transform`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = + target.animate({ [idlName]: [ '0 1 0 0deg', + '1 0 1 180deg'] }, + { duration: 1000, fill: 'both', composite: 'accumulate' }); + + testAnimationSampleRotate3d(animation, idlName, + [{ time: 500, expected: '0.707107 0 0.707107 90deg' }]); + }, `${property} with different rotation axes`); + }, +}; + +const translateListType = { + testInterpolation: (property, setup) => { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate( + { + [idlName]: ['200px', '400px'], + }, + 1000 + ); + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '300px' }]); + }, `${property} with two unspecified values`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate( + { + [idlName]: ['200px -200px', '400px 400px'], + }, + 1000 + ); + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '300px 100px' }]); + }, `${property} with one unspecified value`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate( + { + [idlName]: ['200px -200px 600px', '400px 400px -200px'], + }, + 1000 + ); + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '300px 100px 200px' }]); + }, `${property} with all three values specified`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate( + { + [idlName]: ['0% -101px 600px', '400px 50% -200px'], + }, + 1000 + ); + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '200px -25.5px 200px' }]); + }, `${property} with combination of percentages and lengths`); + }, + testAddition: function(property, setup) { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '100px'; + const animation = target.animate({ [idlName]: ['-200px', '500px'] }, + { duration: 1000, fill: 'both', + composite: 'add' }); + testAnimationSamples(animation, idlName, + [ { time: 0, expected: '-100px' }, + { time: 1000, expected: '600px' }]); + + }, `${property}`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.transform = 'translateY(100px)'; + target.style[idlName] = '100px'; + const animation = target.animate({ [idlName]: ['-200px', '500px'] }, + { duration: 1000, fill: 'both', + composite: 'add' }); + testAnimationSamples(animation, idlName, + [ { time: 0, expected: '-100px' }, + { time: 1000, expected: '600px' }]); + + }, `${property} with underlying transform`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '50%'; + const animation = target.animate({ [idlName]: ['-200px', '500px'] }, + { duration: 1000, fill: 'both', + composite: 'add' }); + testAnimationSamples(animation, idlName, + [ { time: 0, expected: '-150px' }, + { time: 1000, expected: '550px' }]); + + }, `${property} with underlying percentage value`); + }, + testAccumulation: function(property, setup) { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '100px'; + const animation = target.animate({ [idlName]: ['-200px', '500px'] }, + { duration: 1000, fill: 'both', + composite: 'accumulate' }); + testAnimationSamples(animation, idlName, + [ { time: 0, expected: '-100px' }, + { time: 1000, expected: '600px' }]); + }, `${property}`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.transform = 'translateY(100px)'; + target.style[idlName] = '100px'; + const animation = target.animate({ [idlName]: ['-200px', '500px'] }, + { duration: 1000, fill: 'both', + composite: 'accumulate' }); + testAnimationSamples(animation, idlName, + [ { time: 0, expected: '-100px' }, + { time: 1000, expected: '600px' }]); + }, `${property} with transform`); + }, +}; + +const scaleListType = { + testInterpolation: (property, setup) => { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate({ [idlName]: ['3', '5'] }, + 1000); + + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '4' }]); + }, `${property} with two unspecified values`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate({ [idlName]: ['3 3', '5 5'] }, + 1000); + + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '4 4' }]); + }, `${property} with one unspecified value`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + const animation = target.animate({ [idlName]: ['3 3 3', '5 5 5'] }, + 1000); + + testAnimationSamples(animation, idlName, + [{ time: 500, expected: '4 4 4' }]); + }, `${property}`); + }, + testAddition: function(property, setup) { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '2'; + const animation = target.animate({ [idlName]: ['-3', '5'] }, + { duration: 1000, fill: 'both', + composite: 'add' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '-6' }, + { time: 1000, expected: '10' }]); + }, `${property} with two unspecified values`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '2 2'; + const animation = target.animate({ [idlName]: ['-3 -3', '5 5'] }, + { duration: 1000, fill: 'both', + composite: 'add' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '-6 -6' }, + { time: 1000, expected: '10 10' }]); + }, `${property} with one unspecified value`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '2 2 2'; + const animation = target.animate({ [idlName]: ['-1 -2 -3', '4 5 6'] }, + { duration: 1000, fill: 'both', + composite: 'add' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '-2 -4 -6' }, + { time: 1000, expected: '8 10 12' }]); + }, `${property}`); + }, + testAccumulation: function(property, setup) { + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '2'; + const animation = target.animate({ [idlName]: ['-3', '5'] }, + { duration: 1000, fill: 'both', + composite: 'accumulate' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '-2' }, + { time: 1000, expected: '6' }]); + }, `${property} with two unspecified values`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '2 2'; + const animation = target.animate({ [idlName]: ['-3 -3', '5 5'] }, + { duration: 1000, fill: 'both', + composite: 'accumulate' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '-2 -2' }, + { time: 1000, expected: '6 6' }]); + }, `${property} with one unspecified value`); + + test(t => { + const idlName = propertyToIDL(property); + const target = createTestElement(t, setup); + target.style[idlName] = '2 2 2'; + const animation = target.animate({ [idlName]: ['-1 -2 -3', '4 5 6'] }, + { duration: 1000, fill: 'both', + composite: 'accumulate' }); + + testAnimationSamples(animation, idlName, + [{ time: 0, expected: '0 -1 -2' }, + { time: 1000, expected: '5 6 7' }]); + }, `${property}`); + }, +}; + const filterListType = { testInterpolation: (property, setup) => { test(t => { @@ -2316,6 +2692,9 @@ const types = { positiveNumber: positiveNumberType, opacity: opacityType, transformList: transformListType, + rotateList: rotateListType, + translateList: translateListType, + scaleList: scaleListType, visibility: visibilityType, boxShadowList: boxShadowListType, textShadowList: textShadowListType, diff --git a/tests/wpt/web-platform-tests/web-animations/testcommon.js b/tests/wpt/web-platform-tests/web-animations/testcommon.js index be3827fd5d8..bb5acc2869f 100644 --- a/tests/wpt/web-platform-tests/web-animations/testcommon.js +++ b/tests/wpt/web-platform-tests/web-animations/testcommon.js @@ -262,3 +262,25 @@ function assert_matrix_equals(actual, expected, description) { `expected ${expected} but got ${actual}: ${description}`); } } + +// Compare rotate3d vector like '0 1 0 45deg' with tolerances. +function assert_rotate3d_equals(actual, expected, description) { + const rotationRegExp =/^((([+-]?\d+(\.+\d+)?\s){3})?\d+(\.+\d+)?)deg/; + + assert_regexp_match(actual, rotationRegExp, + 'Actual value is not a rotate3d vector') + assert_regexp_match(expected, rotationRegExp, + 'Expected value is not a rotate3d vector'); + + const actualRotationVector = + actual.match(rotationRegExp)[1].split(' ').map(Number); + const expectedRotationVector = + expected.match(rotationRegExp)[1].split(' ').map(Number); + + assert_equals(actualRotationVector.length, expectedRotationVector.length, + `dimension of the matrix: ${description}`); + for (let i = 0; i < actualRotationVector.length; i++) { + assert_approx_equals(actualRotationVector[i], expectedRotationVector[i], 0.0001, + `expected ${expected} but got ${actual}: ${description}`); + } +}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webaudio/resources/stereopanner-testing.js b/tests/wpt/web-platform-tests/webaudio/resources/stereopanner-testing.js new file mode 100644 index 00000000000..d6238a9cd36 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/resources/stereopanner-testing.js @@ -0,0 +1,203 @@ +let StereoPannerTest = (function() { + + // Constants + let PI_OVER_TWO = Math.PI * 0.5; + + let gSampleRate = 44100; + + // Time step when each panner node starts. + let gTimeStep = 0.001; + + // How many panner nodes to create for the test + let gNodesToCreate = 100; + + // Total render length for all of our nodes. + let gRenderLength = gTimeStep * (gNodesToCreate + 1) + gSampleRate; + + // Calculates channel gains based on equal power panning model. + // See: http://webaudio.github.io/web-audio-api/#panning-algorithm + function getChannelGain(pan, numberOfChannels) { + // The internal panning clips the pan value between -1, 1. + pan = Math.min(Math.max(pan, -1), 1); + let gainL, gainR; + // Consider number of channels and pan value's polarity. + if (numberOfChannels == 1) { + let panRadian = (pan * 0.5 + 0.5) * PI_OVER_TWO; + gainL = Math.cos(panRadian); + gainR = Math.sin(panRadian); + } else { + let panRadian = (pan <= 0 ? pan + 1 : pan) * PI_OVER_TWO; + if (pan <= 0) { + gainL = 1 + Math.cos(panRadian); + gainR = Math.sin(panRadian); + } else { + gainL = Math.cos(panRadian); + gainR = 1 + Math.sin(panRadian); + } + } + return {gainL: gainL, gainR: gainR}; + } + + + /** + * Test implementation class. + * @param {Object} options Test options + * @param {Object} options.description Test description + * @param {Object} options.numberOfInputChannels Number of input channels + */ + function Test(should, options) { + // Primary test flag. + this.success = true; + + this.should = should; + this.context = null; + this.prefix = options.prefix; + this.numberOfInputChannels = (options.numberOfInputChannels || 1); + switch (this.numberOfInputChannels) { + case 1: + this.description = 'Test for mono input'; + break; + case 2: + this.description = 'Test for stereo input'; + break; + } + + // Onset time position of each impulse. + this.onsets = []; + + // Pan position value of each impulse. + this.panPositions = []; + + // Locations of where the impulses aren't at the expected locations. + this.errors = []; + + // The index of the current impulse being verified. + this.impulseIndex = 0; + + // The max error we allow between the rendered impulse and the + // expected value. This value is experimentally determined. Set + // to 0 to make the test fail to see what the actual error is. + this.maxAllowedError = 1.3e-6; + + // Max (absolute) error and the index of the maxima for the left + // and right channels. + this.maxErrorL = 0; + this.maxErrorR = 0; + this.maxErrorIndexL = 0; + this.maxErrorIndexR = 0; + + // The maximum value to use for panner pan value. The value will range from + // -panLimit to +panLimit. + this.panLimit = 1.0625; + } + + + Test.prototype.init = function() { + this.context = new OfflineAudioContext(2, gRenderLength, gSampleRate); + }; + + // Prepare an audio graph for testing. Create multiple impulse generators and + // panner nodes, then play them sequentially while varying the pan position. + Test.prototype.prepare = function() { + let impulse; + let impulseLength = Math.round(gTimeStep * gSampleRate); + let sources = []; + let panners = []; + + // Moves the pan value for each panner by pan step unit from -2 to 2. + // This is to check if the internal panning value is clipped properly. + let panStep = (2 * this.panLimit) / (gNodesToCreate - 1); + + if (this.numberOfInputChannels === 1) { + impulse = createImpulseBuffer(this.context, impulseLength); + } else { + impulse = createStereoImpulseBuffer(this.context, impulseLength); + } + + for (let i = 0; i < gNodesToCreate; i++) { + sources[i] = this.context.createBufferSource(); + panners[i] = this.context.createStereoPanner(); + sources[i].connect(panners[i]); + panners[i].connect(this.context.destination); + sources[i].buffer = impulse; + panners[i].pan.value = this.panPositions[i] = panStep * i - this.panLimit; + + // Store the onset time position of impulse. + this.onsets[i] = gTimeStep * i; + + sources[i].start(this.onsets[i]); + } + }; + + + Test.prototype.verify = function() { + let chanL = this.renderedBufferL; + let chanR = this.renderedBufferR; + for (let i = 0; i < chanL.length; i++) { + // Left and right channels must start at the same instant. + if (chanL[i] !== 0 || chanR[i] !== 0) { + // Get amount of error between actual and expected gain. + let expected = getChannelGain( + this.panPositions[this.impulseIndex], this.numberOfInputChannels); + let errorL = Math.abs(chanL[i] - expected.gainL); + let errorR = Math.abs(chanR[i] - expected.gainR); + + if (errorL > this.maxErrorL) { + this.maxErrorL = errorL; + this.maxErrorIndexL = this.impulseIndex; + } + if (errorR > this.maxErrorR) { + this.maxErrorR = errorR; + this.maxErrorIndexR = this.impulseIndex; + } + + // Keep track of the impulses that didn't show up where we expected + // them to be. + let expectedOffset = + timeToSampleFrame(this.onsets[this.impulseIndex], gSampleRate); + if (i != expectedOffset) { + this.errors.push({actual: i, expected: expectedOffset}); + } + + this.impulseIndex++; + } + } + }; + + + Test.prototype.showResult = function() { + this.should(this.impulseIndex, this.prefix + 'Number of impulses found') + .beEqualTo(gNodesToCreate); + + this.should( + this.errors.length, + this.prefix + 'Number of impulse at the wrong offset') + .beEqualTo(0); + + this.should(this.maxErrorL, this.prefix + 'Left channel error magnitude') + .beLessThanOrEqualTo(this.maxAllowedError); + + this.should(this.maxErrorR, this.prefix + 'Right channel error magnitude') + .beLessThanOrEqualTo(this.maxAllowedError); + }; + + Test.prototype.run = function() { + + this.init(); + this.prepare(); + + return this.context.startRendering().then(renderedBuffer => { + this.renderedBufferL = renderedBuffer.getChannelData(0); + this.renderedBufferR = renderedBuffer.getChannelData(1); + this.verify(); + this.showResult(); + }); + }; + + return { + create: function(should, options) { + return new Test(should, options); + } + }; + +})(); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html new file mode 100644 index 00000000000..a61f3983049 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/no-dezippering.html @@ -0,0 +1,261 @@ +<!DOCTYPE html> +<html> + <head> + <title> + Test StereoPannerNode Has No Dezippering + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../../resources/audit-util.js"></script> + <script src="../../resources/audit.js"></script> + </head> + <body> + <script id="layout-test-code"> + // Arbitrary sample rate except that it should be a power of two to + // eliminate any round-off in computing frame boundaries. + let sampleRate = 16384; + + let audit = Audit.createTaskRunner(); + + audit.define( + { + label: 'test mono input', + description: 'Test StereoPanner with mono input has no dezippering' + }, + (task, should) => { + let context = new OfflineAudioContext(2, sampleRate, sampleRate); + let src = new ConstantSourceNode(context, {offset: 1}); + let p = new StereoPannerNode(context, {pan: -1}); + + src.connect(p).connect(context.destination); + src.start(); + + // Frame at which to change pan value. + let panFrame = 256; + context.suspend(panFrame / context.sampleRate) + .then(() => p.pan.value = 1) + .then(() => context.resume()); + + context.startRendering() + .then(renderedBuffer => { + let c0 = renderedBuffer.getChannelData(0); + let c1 = renderedBuffer.getChannelData(1); + + // The first part should be full left. + should( + c0.slice(0, panFrame), 'Mono: Left channel, pan = -1: ') + .beConstantValueOf(1); + should( + c1.slice(0, panFrame), 'Mono: Right channel, pan = -1:') + .beConstantValueOf(0); + + // The second part should be full right, but due to roundoff, + // the left channel won't be exactly zero. Compare the left + // channel against zero with a threshold instead. + let tail = c0.slice(panFrame); + let zero = new Float32Array(tail.length); + + should(c0.slice(panFrame), 'Mono: Left channel, pan = 1: ') + .beCloseToArray(zero, {absoluteThreshold: 6.1233e-17}); + should(c1.slice(panFrame), 'Mono: Right channel, pan = 1:') + .beConstantValueOf(1); + }) + .then(() => task.done()); + }); + + audit.define( + { + label: 'test stereo input', + description: + 'Test StereoPanner with stereo input has no dezippering' + }, + (task, should) => { + let context = new OfflineAudioContext(2, sampleRate, sampleRate); + + // Create stereo source from two constant source nodes. + let s0 = new ConstantSourceNode(context, {offset: 1}); + let s1 = new ConstantSourceNode(context, {offset: 2}); + let merger = new ChannelMergerNode(context, {numberOfInputs: 2}); + + s0.connect(merger, 0, 0); + s1.connect(merger, 0, 1); + + let p = new StereoPannerNode(context, {pan: -1}); + + merger.connect(p).connect(context.destination); + s0.start(); + s1.start(); + + // Frame at which to change pan value. + let panFrame = 256; + context.suspend(panFrame / context.sampleRate) + .then(() => p.pan.value = 1) + .then(() => context.resume()); + + context.startRendering() + .then(renderedBuffer => { + let c0 = renderedBuffer.getChannelData(0); + let c1 = renderedBuffer.getChannelData(1); + + // The first part should be full left. + should( + c0.slice(0, panFrame), 'Stereo: Left channel, pan = -1: ') + .beConstantValueOf(3); + should( + c1.slice(0, panFrame), 'Stereo: Right channel, pan = -1:') + .beConstantValueOf(0); + + // The second part should be full right, but due to roundoff, + // the left channel won't be exactly zero. Compare the left + // channel against zero with a threshold instead. + let tail = c0.slice(panFrame); + let zero = new Float32Array(tail.length); + + should(c0.slice(panFrame), 'Stereo: Left channel, pan = 1: ') + .beCloseToArray(zero, {absoluteThreshold: 6.1233e-17}); + should(c1.slice(panFrame), 'Stereo: Right channel, pan = 1:') + .beConstantValueOf(3); + }) + .then(() => task.done()); + }); + + audit.define( + { + label: 'test mono input setValue', + description: 'Test StereoPanner with mono input value setter ' + + 'vs setValueAtTime' + }, + (task, should) => { + let context = new OfflineAudioContext(4, sampleRate, sampleRate); + + let src = new OscillatorNode(context); + + src.start(); + testWithSetValue(context, src, should, { + prefix: 'Mono' + }).then(() => task.done()); + }); + + audit.define( + { + label: 'test stereo input setValue', + description: 'Test StereoPanner with mono input value setter ' + + ' vs setValueAtTime' + }, + (task, should) => { + let context = new OfflineAudioContext(4, sampleRate, sampleRate); + + let src0 = new OscillatorNode(context, {frequency: 800}); + let src1 = new OscillatorNode(context, {frequency: 250}); + let merger = new ChannelMergerNode(context, {numberOfChannels: 2}); + + src0.connect(merger, 0, 0); + src1.connect(merger, 0, 1); + + src0.start(); + src1.start(); + + testWithSetValue(context, merger, should, { + prefix: 'Stereo' + }).then(() => task.done()); + }); + + audit.define( + { + label: 'test mono input automation', + description: 'Test StereoPanner with mono input and automation' + }, + (task, should) => { + let context = new OfflineAudioContext(4, sampleRate, sampleRate); + + let src0 = new OscillatorNode(context, {frequency: 800}); + let src1 = new OscillatorNode(context, {frequency: 250}); + let merger = new ChannelMergerNode(context, {numberOfChannels: 2}); + + src0.connect(merger, 0, 0); + src1.connect(merger, 0, 1); + + src0.start(); + src1.start(); + + let mod = new OscillatorNode(context, {frequency: 100}); + mod.start(); + + testWithSetValue(context, merger, should, { + prefix: 'Modulated Stereo', + modulator: (testNode, refNode) => { + mod.connect(testNode.pan); + mod.connect(refNode.pan); + } + }).then(() => task.done()); + }); + + + function testWithSetValue(context, src, should, options) { + let merger = new ChannelMergerNode( + context, {numberOfInputs: context.destination.channelCount}); + merger.connect(context.destination); + + let pannerRef = new StereoPannerNode(context, {pan: -0.3}); + let pannerTest = + new StereoPannerNode(context, {pan: pannerRef.pan.value}); + + let refSplitter = + new ChannelSplitterNode(context, {numberOfOutputs: 2}); + let testSplitter = + new ChannelSplitterNode(context, {numberOfOutputs: 2}); + + pannerRef.connect(refSplitter); + pannerTest.connect(testSplitter); + + testSplitter.connect(merger, 0, 0); + testSplitter.connect(merger, 1, 1); + refSplitter.connect(merger, 0, 2); + refSplitter.connect(merger, 1, 3); + + src.connect(pannerRef); + src.connect(pannerTest); + + let changeTime = 3 * RENDER_QUANTUM_FRAMES / context.sampleRate; + // An arbitrary position, different from the default pan value. + let newPanPosition = .71; + + pannerRef.pan.setValueAtTime(newPanPosition, changeTime); + context.suspend(changeTime) + .then(() => pannerTest.pan.value = newPanPosition) + .then(() => context.resume()); + + if (options.modulator) { + options.modulator(pannerTest, pannerRef); + } + return context.startRendering().then(renderedBuffer => { + let actual = new Array(2); + let expected = new Array(2); + + actual[0] = renderedBuffer.getChannelData(0); + actual[1] = renderedBuffer.getChannelData(1); + expected[0] = renderedBuffer.getChannelData(2); + expected[1] = renderedBuffer.getChannelData(3); + + let label = ['Left', 'Right']; + + for (let k = 0; k < 2; ++k) { + let match = + should( + actual[k], + options.prefix + ' ' + label[k] + ' .value setter output') + .beEqualToArray(expected[k]); + should( + match, + options.prefix + ' ' + label[k] + + ' .value setter output matches setValueAtTime output') + .beTrue(); + } + + }); + } + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.html new file mode 100644 index 00000000000..48bacb08c6d --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-basic.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<html> + <head> + <title> + stereopannernode-basic.html + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../../resources/audit-util.js"></script> + <script src="../../resources/audit.js"></script> + </head> + <body> + <script id="layout-test-code"> + let audit = Audit.createTaskRunner(); + + audit.define( + { + label: 'test', + description: + 'Attributes and basic functionality of StereoPannerNode' + }, + (task, should) => { + + let context = new AudioContext(); + let panner = context.createStereoPanner(); + + should(panner.numberOfInputs, 'panner.numberOfInputs').beEqualTo(1); + should(panner.numberOfOutputs, 'panner.numberOfOutputs') + .beEqualTo(1); + should(panner.pan.defaultValue, 'panner.pan.defaultValue') + .beEqualTo(0.0); + should(() => panner.pan.value = 1.0, 'panner.pan.value = 1.0') + .notThrow(); + should(panner.pan.value, 'panner.pan.value').beEqualTo(1.0); + + should(() => panner.channelCount = 1, 'panner.channelCount = 1') + .notThrow(); + should(() => panner.channelCount = 3, 'panner.channelCount = 3') + .throw(); + should( + () => panner.channelCountMode = 'explicit', + 'panner.channelCountMode = "explicit"') + .notThrow(); + should( + () => panner.channelCountMode = 'max', + 'panner.channelCountMode = "max"') + .throw(); + + task.done(); + }); + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning.html new file mode 100644 index 00000000000..f683fd78bf9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-stereopanner-interface/stereopannernode-panning.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> + <head> + <title> + stereopannernode-panning.html + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../../resources/audit-util.js"></script> + <script src="../../resources/audit.js"></script> + <script src="../../resources/stereopanner-testing.js"></script> + </head> + <body> + <script id="layout-test-code"> + let audit = Audit.createTaskRunner(); + + audit.define('mono-test', (task, should) => { + StereoPannerTest + .create(should, {numberOfInputChannels: 1, prefix: 'Mono: '}) + .run() + .then(() => task.done()); + }); + + audit.define('stereo-test', (task, should) => { + StereoPannerTest + .create(should, {numberOfInputChannels: 2, prefix: 'Stereo: '}) + .run() + .then(() => task.done()); + }); + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-copy-curve.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-copy-curve.html new file mode 100644 index 00000000000..e897ac08a10 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-copy-curve.html @@ -0,0 +1,100 @@ +<!DOCTYPE html> +<html> + <head> + <title> + Test WaveShaper Copies Curve Data + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../../resources/audit-util.js"></script> + <script src="../../resources/audit.js"></script> + </head> + <body> + <script id="layout-test-code"> + // Sample rate and number of frames are fairly arbitrary. We need to + // render, however, at least 384 frames. 1024 is a nice small value. + let sampleRate = 16000; + let renderFrames = 1024; + + let audit = Audit.createTaskRunner(); + + audit.define( + { + label: 'test copying', + description: 'Modifying curve should not modify WaveShaper' + }, + (task, should) => { + // Two-channel context; channel 0 contains the test data and channel + // 1 contains the expected result. Channel 1 has the normal + // WaveShaper output and channel 0 has the WaveShaper output with a + // modified curve. + let context = new OfflineAudioContext(2, renderFrames, sampleRate); + + // Just use a default oscillator as the source. Doesn't really + // matter what we use. + let src = context.createOscillator(); + src.type = 'sawtooth'; + + // Create the wave shapers: ws0 is the test shaper, and ws1 is the + // reference wave shaper. + let ws0 = context.createWaveShaper(); + let ws1 = context.createWaveShaper(); + + // Wave shaper curves. Doesn't really matter what we use as long as + // it modifies the input in some way. Thus, keep it simple and just + // invert the input. + let desiredCurve = [1, 0, -1]; + let curve0 = Float32Array.from(desiredCurve); + let curve1 = Float32Array.from(desiredCurve); + + ws0.curve = curve0; + ws1.curve = curve1; + + let merger = context.createChannelMerger(2); + + // Connect the graph + src.connect(ws0); + src.connect(ws1); + + ws0.connect(merger, 0, 0); + ws1.connect(merger, 0, 1); + + merger.connect(context.destination); + + // Let the context run for a bit and then modify the curve for ws0. + // Doesn't really matter what we modify the curve to as long as it's + // different. + context.suspend(256 / context.sampleRate) + .then(() => { + should( + () => { + curve0[0] = -0.5; + curve0[1] = 0.125; + curve0[2] = 0.75; + }, + `Modifying curve array at time ${context.currentTime}`) + .notThrow(); + }) + .then(context.resume.bind(context)); + + src.start(); + + context.startRendering() + .then(function(renderedBuffer) { + let actual = renderedBuffer.getChannelData(0); + let expected = renderedBuffer.getChannelData(1); + + // Modifying the wave shaper curve should not modify the + // output so the outputs from the two wave shaper nodes should + // be exactly identical. + should(actual, 'Output of WaveShaper with modified curve') + .beEqualToArray(expected); + + }) + .then(() => task.done()); + }); + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-limits.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-limits.html new file mode 100644 index 00000000000..13e88be567b --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-limits.html @@ -0,0 +1,110 @@ +<!DOCTYPE html> +<html> + <head> + <title> + waveshaper-limits.html + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../../resources/audit-util.js"></script> + <script src="../../resources/audit.js"></script> + </head> + <body> + <script id="layout-test-code"> + let audit = Audit.createTaskRunner(); + + let context; + let bufferData; + let outputData; + let reference; + + let sampleRate = 48000; + // Must be odd so we have an exact middle point. + let testFrames = 23; + let scale = 1 / ((testFrames - 1) / 2 - 1); + // Number of decimal digits to print + let decimals = 6; + // Required accuracy + let diffThreshold = Math.pow(10, -decimals); + + // Generate reference data + function generateReference() { + // The curve data is 0, 1, 0, and the input data is a ramp from -1+eps + // to 1+eps. Then the output is a ramp from 0 to 1 back to 0. + let ref = new Float32Array(testFrames); + let midPoint = (testFrames - 1) / 2; + // First sample is below -1 at -1-scale. + ref[0] = 0; + // Generate ramp up to the mid-point + for (let k = 0; k < midPoint; ++k) { + ref[k + 1] = k * scale; + } + // The value at the mid-point must be 1, from the curve + ref[midPoint] = 1; + // Generate a ramp from 1 down to 0 + for (let k = midPoint; k < testFrames - 1; ++k) { + ref[k + 1] = 2 - k * scale; + } + // The last sample is out of range at 1+scale + ref[testFrames - 1] = 0; + return ref; + } + + function checkResult(renderedBuffer, should) { + outputData = renderedBuffer.getChannelData(0); + reference = generateReference(); + let success = true; + // Verify that every output value matches our expected reference value. + for (let k = 0; k < outputData.length; ++k) { + let diff = outputData[k] - reference[k]; + should( + Math.abs(diff), + 'Max error mapping ' + bufferData[k].toFixed(decimals) + ' to ' + + outputData[k].toFixed(decimals)) + .beLessThanOrEqualTo(diffThreshold); + } + } + + audit.define( + { + label: 'test', + description: + 'WaveShaperNode including values outside the range of [-1,1]' + }, + function(task, should) { + context = new OfflineAudioContext(1, testFrames, sampleRate); + // Create input values between -1.1 and 1.1 + let buffer = + context.createBuffer(1, testFrames, context.sampleRate); + bufferData = new Float32Array(testFrames); + let start = -1 - scale; + for (let k = 0; k < testFrames; ++k) { + bufferData[k] = k * scale + start; + } + buffer.copyToChannel(bufferData, 0); + + let source = context.createBufferSource(); + source.buffer = buffer; + + // Create simple waveshaper. It should map -1 to 0, 0 to 1, and +1 + // to 0 and interpolate all points in between using a simple linear + // interpolator. + let shaper = context.createWaveShaper(); + let curve = new Float32Array(3); + curve[0] = 0; + curve[1] = 1; + curve[2] = 0; + shaper.curve = curve; + source.connect(shaper); + shaper.connect(context.destination); + + source.start(); + context.startRendering() + .then(buffer => checkResult(buffer, should)) + .then(() => task.done()); + }); + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-simple.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-simple.html new file mode 100644 index 00000000000..affd0c58afa --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper-simple.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html> + <head> + <title> + Simple Tests of WaveShaperNode + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../../resources/audit-util.js"></script> + <script src="../../resources/audit.js"></script> + </head> + <body> + <script id="layout-test-code"> + let audit = Audit.createTaskRunner(); + + audit.define('simple', (task, should) => { + let context = new OfflineAudioContext(1, 1, 48000); + let shaper = context.createWaveShaper(); + + // Verify default values are correct. + should(shaper.curve, 'Initial WaveShaper.curve').beEqualTo(null); + should(shaper.oversample, 'Initial WaveShaper.oversample') + .beEqualTo('none'); + + // Set oversample and verify that it is set correctly. + should(() => shaper.oversample = '2x', 'Setting oversample to "2x"') + .notThrow(); + should(shaper.oversample, 'Waveshaper.oversample = "2x"') + .beEqualTo('2x'); + + should(() => shaper.oversample = '4x', 'Setting oversample to "4x"') + .notThrow(); + should(shaper.oversample, 'Waveshaper.oversample = "4x"') + .beEqualTo('4x'); + + should( + () => shaper.oversample = 'invalid', + 'Setting oversample to "invalid"') + .notThrow(); + should(shaper.oversample, 'Waveshaper.oversample = "invalid"') + .beEqualTo('4x'); + + // Set the curve and verify that the returned curve is the same as what + // it was set to. + let curve = Float32Array.from([-1, 0.25, .75]); + should(() => shaper.curve = curve, 'Setting curve to [' + curve + ']') + .notThrow(); + should(shaper.curve, 'WaveShaper.curve').beEqualToArray(curve); + + // Verify setting the curve to null works. + should(() => shaper.curve = null, 'Setting curve back to null') + .notThrow(); + should(shaper.curve, 'Waveshaper.curve = null').beEqualTo(null); + + task.done(); + }); + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html new file mode 100644 index 00000000000..8bfa009b181 --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-waveshapernode-interface/waveshaper.html @@ -0,0 +1,127 @@ +<!DOCTYPE html> +<html> + <head> + <title> + waveshaper.html + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../../resources/audit-util.js"></script> + <script src="../../resources/audit.js"></script> + <script src="../../resources/buffer-loader.js"></script> + </head> + <body> + <script id="layout-test-code"> + let audit = Audit.createTaskRunner(); + + let sampleRate = 44100; + let lengthInSeconds = 4; + let numberOfRenderFrames = sampleRate * lengthInSeconds; + let numberOfCurveFrames = 65536; + let inputBuffer; + let waveShapingCurve; + + let context; + + function generateInputBuffer() { + // Create mono input buffer. + let buffer = + context.createBuffer(1, numberOfRenderFrames, context.sampleRate); + let data = buffer.getChannelData(0); + + // Generate an input vector with values from -1 -> +1 over a duration of + // lengthInSeconds. This exercises the full nominal input range and will + // touch every point of the shaping curve. + for (let i = 0; i < numberOfRenderFrames; ++i) { + let x = i / numberOfRenderFrames; // 0 -> 1 + x = 2 * x - 1; // -1 -> +1 + data[i] = x; + } + + return buffer; + } + + // Generates a symmetric curve: Math.atan(5 * x) / (0.5 * Math.PI) + // (with x == 0 corresponding to the center of the array) + // This curve is arbitrary, but would be useful in the real-world. + // To some extent, the actual curve we choose is not important in this + // test, since the input vector walks through all possible curve values. + function generateWaveShapingCurve() { + let curve = new Float32Array(numberOfCurveFrames); + + let n = numberOfCurveFrames; + let n2 = n / 2; + + for (let i = 0; i < n; ++i) { + let x = (i - n2) / n2; + let y = Math.atan(5 * x) / (0.5 * Math.PI); + } + + return curve; + } + + function checkShapedCurve(buffer, should) { + let inputData = inputBuffer.getChannelData(0); + let outputData = buffer.getChannelData(0); + + let success = true; + + // Go through every sample and make sure it has been shaped exactly + // according to the shaping curve we gave it. + for (let i = 0; i < buffer.length; ++i) { + let input = inputData[i]; + + // Calculate an index based on input -1 -> +1 with 0 being at the + // center of the curve data. + let index = Math.floor(numberOfCurveFrames * 0.5 * (input + 1)); + + // Clip index to the input range of the curve. + // This takes care of input outside of nominal range -1 -> +1 + index = index < 0 ? 0 : index; + index = + index > numberOfCurveFrames - 1 ? numberOfCurveFrames - 1 : index; + + let expectedOutput = waveShapingCurve[index]; + + let output = outputData[i]; + + if (output != expectedOutput) { + success = false; + break; + } + } + + should( + success, 'WaveShaperNode applied non-linear distortion correctly') + .beTrue(); + } + + audit.define('test', function(task, should) { + // Create offline audio context. + context = new OfflineAudioContext(1, numberOfRenderFrames, sampleRate); + + // source -> waveshaper -> destination + let source = context.createBufferSource(); + let waveshaper = context.createWaveShaper(); + source.connect(waveshaper); + waveshaper.connect(context.destination); + + // Create an input test vector. + inputBuffer = generateInputBuffer(); + source.buffer = inputBuffer; + + // We'll apply non-linear distortion according to this shaping curve. + waveShapingCurve = generateWaveShapingCurve(); + waveshaper.curve = waveShapingCurve; + + source.start(0); + + context.startRendering() + .then(buffer => checkShapedCurve(buffer, should)) + .then(task.done.bind(task)); + }); + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webrtc/historical.html b/tests/wpt/web-platform-tests/webrtc/historical.html index c57a1ca362e..d49503e16d6 100644 --- a/tests/wpt/web-platform-tests/webrtc/historical.html +++ b/tests/wpt/web-platform-tests/webrtc/historical.html @@ -25,6 +25,7 @@ test(function() { }); [ + "DataChannel", "mozRTCIceCandidate", "mozRTCPeerConnection", "mozRTCSessionDescription", diff --git a/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/constructor.html b/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/constructor.html index 59eeaf8a108..cddde0a0717 100644 --- a/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/constructor.html +++ b/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/constructor.html @@ -40,7 +40,6 @@ test(function() { } } - assert_throws("IndexSizeError", function() { region.lines = -1; }); assert_equals(region.lines, 3); region.lines = 130; diff --git a/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/lines.html b/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/lines.html index a9be6106754..90e08b48930 100644 --- a/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/lines.html +++ b/tests/wpt/web-platform-tests/webvtt/api/VTTRegion/lines.html @@ -17,8 +17,12 @@ test(function() { // https://heycam.github.io/webidl/#abstract-opdef-converttoint [[0, 0], [-0, 0], + [-1, 4294967295], + [-100, 4294967196], [101, 101], + [-2147483648, 2147483648], [2147483647, 2147483647], + [2147483648, 2147483648], [NaN, 0], [Infinity, 0], [-Infinity, 0]].forEach(function (pair) { @@ -28,10 +32,5 @@ test(function() { assert_equals(region.lines, expected); }); - [-1, -100, -2147483648, 2147483648 /* wraps to -2147483648 */].forEach(function (invalid) { - assert_throws('IndexSizeError', function() { - region.lines = invalid; - }, invalid); - }); }, document.title + ' script-created region'); </script> |