diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2020-04-17 08:19:21 +0000 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2020-04-17 11:03:49 +0000 |
commit | 21de781e2a848b0ac12ff267a253b289dac926ec (patch) | |
tree | 024364ba954d509076a26fb08316af9834aba1cb | |
parent | 3ca86eeba51aa326339da8794c302c48a7fc875d (diff) | |
download | servo-21de781e2a848b0ac12ff267a253b289dac926ec.tar.gz servo-21de781e2a848b0ac12ff267a253b289dac926ec.zip |
Update web-platform-tests to revision 20a217cb8488e4339e0c9610aba99e2654b676c3
285 files changed, 5709 insertions, 672 deletions
diff --git a/tests/wpt/metadata-layout-2020/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini b/tests/wpt/metadata-layout-2020/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini new file mode 100644 index 00000000000..3a956f90011 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini @@ -0,0 +1,4 @@ +[2d.path.isPointInStroke.scaleddashes.html] + [isPointInStroke() should return correct results on dashed paths at high scale factors] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini index 76b44d9e9cf..3605e8f3fc9 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -4,7 +4,7 @@ expected: TIMEOUT [Opening a blob URL in a new window immediately before revoking it works.] - expected: FAIL + expected: TIMEOUT [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini new file mode 100644 index 00000000000..f64b45fea6b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-002.html] + [Hit test float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini index 4bfb0c2053a..f29da48a2a0 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini @@ -1,4 +1,4 @@ -[hit-test-floats-004.html] +[hit-test-floats-003.html] [Miss float below something else] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-011.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-011.html.ini new file mode 100644 index 00000000000..fdf5abac767 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-011.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-011.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-012.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-012.html.ini new file mode 100644 index 00000000000..098fde40fb1 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-012.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-012.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-013.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-013.html.ini new file mode 100644 index 00000000000..b3b08d61395 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-013.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-013.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-014.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-014.html.ini new file mode 100644 index 00000000000..61a082b5e0f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-014.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-014.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-015.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-015.html.ini new file mode 100644 index 00000000000..c1b8824ba0f --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-015.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-015.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-016.html.ini b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-016.html.ini new file mode 100644 index 00000000000..c329c7f08b9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-text/white-space/break-spaces-newline-016.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-016.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini new file mode 100644 index 00000000000..e38782d8c85 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini @@ -0,0 +1,4 @@ +[elementFromPoint-001.html] + [CSSOM View - 5 - extensions to the Document interface] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 16e4765293e..d1bbeb58882 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -312,15 +312,9 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [<iframe>: combined response Content-Type: text/html;x=" text/plain] - expected: FAIL - [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] expected: FAIL - [<iframe>: combined response Content-Type: */* text/html] - expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] expected: FAIL @@ -330,3 +324,15 @@ [<iframe>: combined response Content-Type: text/html;" \\" text/plain] expected: FAIL + [<iframe>: combined response Content-Type: text/html;" text/plain] + expected: FAIL + + [<iframe>: combined response Content-Type: text/html */*] + expected: FAIL + + [<iframe>: separate response Content-Type: text/plain */*] + expected: FAIL + + [<iframe>: combined response Content-Type: text/html */*;charset=gbk] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini index ac4cbcba706..2d5faa72ac7 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini @@ -56,6 +56,3 @@ [separate text/javascript;charset=windows-1252 error text/javascript] expected: FAIL - [separate text/javascript x/x] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini index a63e414f43a..87c807a49ff 100644 --- a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,6 +11,3 @@ [X-Content-Type-Options%3A%20nosniff%0C] expected: FAIL - [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini new file mode 100644 index 00000000000..87b07c3e670 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_1.html] + [Multiple history traversals from the same task] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini deleted file mode 100644 index 51f8272a6de..00000000000 --- a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_3.html] - [Multiple history traversals, last would be aborted] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini index 6852d7663de..c12c0f8ae48 100644 --- a/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini +++ b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini @@ -1,8 +1,4 @@ [skip-document-with-fragment.html] - expected: TIMEOUT [Autofocus elements in iframed documents with URL fragments should be skipped.] expected: FAIL - [Autofocus elements in top-level browsing context's documents with URI fragments should be skipped.] - expected: TIMEOUT - diff --git a/tests/wpt/metadata-layout-2020/performance-timeline/po-observe-type.any.js.ini b/tests/wpt/metadata-layout-2020/performance-timeline/po-observe-type.any.js.ini new file mode 100644 index 00000000000..6cfbce70872 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/performance-timeline/po-observe-type.any.js.ini @@ -0,0 +1,15 @@ +[po-observe-type.any.html] + [Calling observe() with type and entryTypes should throw a TypeError] + expected: FAIL + + [Calling observe() without 'type' or 'entryTypes' throws a TypeError] + expected: FAIL + + +[po-observe-type.any.worker.html] + [Calling observe() with type and entryTypes should throw a TypeError] + expected: FAIL + + [Calling observe() without 'type' or 'entryTypes' throws a TypeError] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini index 762254139e4..2a3c2ce7c0a 100644 --- a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini +++ b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini @@ -83,3 +83,6 @@ [X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44051 more errors.\n\tMax AbsError of 1.9999794363975525e+0 at index of 19632.\n\t[19632\]\t9.9997943639755249e-1\t-1.0000000000000000e+0\t1.9999794363975525e+0\t1.9999794363975525e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 12348.\n\t[12348\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n] expected: FAIL + [X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44047 more errors.\n\tMax AbsError of 1.9999794363975525e+0 at index of 37272.\n\t[37272\]\t9.9997943639755249e-1\t-1.0000000000000000e+0\t1.9999794363975525e+0\t1.9999794363975525e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 12348.\n\t[12348\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/workers/semantics/multiple-workers/005.html.ini b/tests/wpt/metadata-layout-2020/workers/semantics/multiple-workers/005.html.ini index 268949ced5c..f584fce5df1 100644 --- a/tests/wpt/metadata-layout-2020/workers/semantics/multiple-workers/005.html.ini +++ b/tests/wpt/metadata-layout-2020/workers/semantics/multiple-workers/005.html.ini @@ -1,4 +1,5 @@ [005.html] + expected: ERROR [dedicated worker in shared worker in dedicated worker] expected: FAIL diff --git a/tests/wpt/metadata/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini b/tests/wpt/metadata/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini new file mode 100644 index 00000000000..3a956f90011 --- /dev/null +++ b/tests/wpt/metadata/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini @@ -0,0 +1,4 @@ +[2d.path.isPointInStroke.scaleddashes.html] + [isPointInStroke() should return correct results on dashed paths at high scale factors] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index d4f62ed7113..faa00f45ecf 100644 --- 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 @@ -7,7 +7,7 @@ expected: FAIL [Opening a blob URL in a new window immediately before revoking it works.] - expected: FAIL + expected: TIMEOUT [Opening a blob URL in a noopener about:blank window immediately before revoking it works.] expected: TIMEOUT diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 655a805eca9..aa4827c60e6 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -61,6 +61,34 @@ ] }, "css-flexbox": { + "flex-shrink-large-value-crash.html": [ + "a48bec65581e9f350a74d2b7b937df8fbe9113d5", + [ + null, + {} + ] + ], + "inline-flex-editing-crash.html": [ + "01917e3726c99b6bdb57101c368085b565cc3002", + [ + null, + {} + ] + ], + "inline-flex-editing-with-updating-text-crash.html": [ + "bdf7df85d7b33c937b28c574e60e5695c6aa8a97", + [ + null, + {} + ] + ], + "inline-flex-frameset-main-axis-crash.html": [ + "434897cc7ac0636d7c494a217e6a870aadd4f829", + [ + null, + {} + ] + ], "negative-flex-margins-crash.html": [ "8bcc566c0f702ef6a8e581bb6790476c71f19bcb", [ @@ -117249,6 +117277,19 @@ {} ] ], + "root-element-opacity-change.html": [ + "de2599de4911dc99c997de16d8908a180e4f3bc6", + [ + null, + [ + [ + "/css/compositing/root-element-opacity-change-ref.html", + "==" + ] + ], + {} + ] + ], "root-element-opacity.html": [ "4885d805ad3f3b59d60ccbf3047e8694d7be0f18", [ @@ -140445,6 +140486,45 @@ ] }, "alignment": { + "grid-baseline-001.html": [ + "ef8c0e4d3403f6aab952ae844d84490d7e569055", + [ + null, + [ + [ + "/css/css-grid/alignment/references/grid-baseline-001-ref.html", + "==" + ] + ], + {} + ] + ], + "grid-baseline-002.html": [ + "b52eeff27e51e3136c4425e7761838ab8ceecc9f", + [ + null, + [ + [ + "/css/css-grid/alignment/references/grid-baseline-002-ref.html", + "==" + ] + ], + {} + ] + ], + "grid-baseline-003.html": [ + "bd411abed91841b00a518e12cbd24a2bb60a4f57", + [ + null, + [ + [ + "/css/css-grid/alignment/references/grid-baseline-003-ref.html", + "==" + ] + ], + {} + ] + ], "grid-baseline-align-cycles-001.html": [ "cc6b3b50f984a97838f05e340c51f33f335e0f97", [ @@ -141699,6 +141779,19 @@ ] ], "grid-definition": { + "flex-item-grid-container-percentage-rows-001.html": [ + "ba655ce8a17d6482071d39e66684b50ebe749822", + [ + null, + [ + [ + "/css/css-grid/reference/flex-item-grid-container-percentage-rows-001-ref.html", + "==" + ] + ], + {} + ] + ], "fr-unit-with-percentage.html": [ "82c97abdd5740d466f049d8b45b67e241f204899", [ @@ -149414,6 +149507,19 @@ {} ] ], + "clip-path-reference-restore.html": [ + "eccebd8fbcc3a556a13829be3e25c4efead3aafc", + [ + null, + [ + [ + "/css/css-masking/clip-path/reference/clip-path-reference-restore-ref.html", + "==" + ] + ], + {} + ] + ], "clip-path-svg-invalidate.html": [ "0bf921c7cf125c1e8a9e6842c62f294b13104790", [ @@ -149440,6 +149546,19 @@ {} ] ], + "clip-path-transform-mutated-002.html": [ + "de00a013ad44b3f5c928e46829b75151e936c2af", + [ + null, + [ + [ + "/css/css-masking/clip-path/reference/clip-path-transform-mutated-002-ref.html", + "==" + ] + ], + {} + ] + ], "clip-path-url-reference-change-from-empty.html": [ "2de0bb866f1c837887d6fa3c5889f8d38da3c055", [ @@ -163716,12 +163835,16 @@ ] ], "hyphens-auto-inline-010.html": [ - "cb6a6222b7b44ff8f5956c3c5041ccb5b3b058de", + "03776617bf6ec5266e1f0ade3c5e4241242589fd", [ null, [ [ - "/css/css-text/hyphens/reference/hyphens-auto-inline-010-ref.html", + "/css/css-text/hyphens/reference/hyphens-auto-inline-010M-ref.html", + "==" + ], + [ + "/css/css-text/hyphens/reference/hyphens-auto-inline-010H-ref.html", "==" ] ], @@ -163742,12 +163865,16 @@ ] ], "hyphens-manual-011.html": [ - "060dc75619a188cdfe4452b2a1ea941992d38cb4", + "862ca80fc647c96016ce15062fa7084ff6bfd5ef", [ null, [ [ - "/css/css-text/hyphens/reference/hyphens-manual-011-ref.html", + "/css/css-text/hyphens/reference/hyphens-manual-011M-ref.html", + "==" + ], + [ + "/css/css-text/hyphens/reference/hyphens-manual-011H-ref.html", "==" ] ], @@ -163755,12 +163882,16 @@ ] ], "hyphens-manual-012.html": [ - "871f7c39b69ddd8b37a3e57acaae92c6fe8e56f8", + "7ffece5ff6dd6a1cbf82afbafdd50ce0d5f0142c", [ null, [ [ - "/css/css-text/hyphens/reference/hyphens-manual-011-ref.html", + "/css/css-text/hyphens/reference/hyphens-manual-011M-ref.html", + "==" + ], + [ + "/css/css-text/hyphens/reference/hyphens-manual-011H-ref.html", "==" ] ], @@ -163768,12 +163899,16 @@ ] ], "hyphens-manual-013.html": [ - "17e3f6f8157aeb302789fa04e8366e44109cf6b8", + "31c57c5382a1800050c9a9ae5262ea39397e661c", [ null, [ [ - "/css/css-text/hyphens/reference/hyphens-manual-013-ref.html", + "/css/css-text/hyphens/reference/hyphens-manual-013M-ref.html", + "==" + ], + [ + "/css/css-text/hyphens/reference/hyphens-manual-013H-ref.html", "==" ] ], @@ -163794,12 +163929,16 @@ ] ], "hyphens-manual-inline-011.html": [ - "ec08f4d3887a15efd3540b7696a2b60ed6c4b2f2", + "9eba15b5291798f29f1796dbf38b45043c94893f", [ null, [ [ - "/css/css-text/hyphens/reference/hyphens-manual-inline-011-ref.html", + "/css/css-text/hyphens/reference/hyphens-manual-inline-011M-ref.html", + "==" + ], + [ + "/css/css-text/hyphens/reference/hyphens-manual-inline-011H-ref.html", "==" ] ], @@ -163807,12 +163946,16 @@ ] ], "hyphens-manual-inline-012.html": [ - "0267fa7baaaa95e6c40221b1d85f490b5485bc7e", + "b2aa04f7a6fb5eea3872d5b4337cd218f8abfa2b", [ null, [ [ - "/css/css-text/hyphens/reference/hyphens-manual-inline-012-ref.html", + "/css/css-text/hyphens/reference/hyphens-manual-inline-012M-ref.html", + "==" + ], + [ + "/css/css-text/hyphens/reference/hyphens-manual-inline-012H-ref.html", "==" ] ], @@ -171704,6 +171847,84 @@ {} ] ], + "break-spaces-newline-011.html": [ + "068119c29290fdded0dee4e7fa425af397706ea9", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "break-spaces-newline-012.html": [ + "766bcc1feeed581a9bb54cb48a80d187a791af7d", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "break-spaces-newline-013.html": [ + "5b45e5c1ccede4b4a1a5bfa77dedb31b14199bee", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "break-spaces-newline-014.html": [ + "56281dee347143147049e4c9c8a8ab4fda1a4e8a", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "break-spaces-newline-015.html": [ + "96a7d83663887bd3cf7c8efd9edd4be8e0112d0b", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "break-spaces-newline-016.html": [ + "4156e6a7da10e7bff9468d96982bfc359ba42a1d", + [ + null, + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "break-spaces-tab-001.html": [ "4b01a60395a6c1133c7af8af957dd70859db4823", [ @@ -239678,7 +239899,7 @@ [] ], ".taskcluster.yml": [ - "815648df5121e596dced15ce9384815d2e6c426f", + "556b9914d5b53f72010dd59831c710623a64ed57", [] ], ".well-known": { @@ -240580,7 +240801,7 @@ [] ], "tests2d.yaml": [ - "42a572995a6997b5f61a54ae65abd0dc6b59626d", + "d8ccbe13f6dbb3edf891c9e507dbf6449ec942af", [] ], "tests2dtext.yaml": [ @@ -283469,6 +283690,10 @@ "27cfb11b8f480cdd3cc94c5467bf6b3dc9b831db", [] ], + "root-element-opacity-change-ref.html": [ + "be3d3713694f8ff7112edf3b87162125eb4eaf16", + [] + ], "root-element-opacity-ref.html": [ "be2348ab967f2ff4c161f8bbb9999a0bd8523e82", [] @@ -294529,6 +294754,18 @@ [] ], "references": { + "grid-baseline-001-ref.html": [ + "6a02ae4796a0d462ad21fe866c2bed035a5032e6", + [] + ], + "grid-baseline-002-ref.html": [ + "43634e58c381681883211711c4bcb4a3aae97db7", + [] + ], + "grid-baseline-003-ref.html": [ + "446c42f1a29694445b485e413dde57aa40b4b7ea", + [] + ], "grid-baseline-align-cycles-001-ref.html": [ "ca1097e171e8f4b18fd72c1e7614bff860b2cb36", [] @@ -294768,6 +295005,10 @@ "422185a8e3f855cfffa1cb4b8b91b1ef6dc5cb42", [] ], + "flex-item-grid-container-percentage-rows-001-ref.html": [ + "1f4b23952e13511927637e047dd6ecf78d9c73bb", + [] + ], "fr-unit-ref.html": [ "e7999ae7d18b36177e277a4baaddb3d30fbf3c90", [] @@ -295991,6 +296232,10 @@ "f718ea6abfbab54333ba674ff0dcd320d8672bcd", [] ], + "clip-path-reference-restore-ref.html": [ + "683511fd8007f87aa34cf98edc0b5c327b8036a7", + [] + ], "clip-path-square-001-ref.html": [ "6bc5a16754b1d174bec65817d02d25fb7615f305", [] @@ -296015,6 +296260,10 @@ "f718ea6abfbab54333ba674ff0dcd320d8672bcd", [] ], + "clip-path-transform-mutated-002-ref.html": [ + "f718ea6abfbab54333ba674ff0dcd320d8672bcd", + [] + ], "green-100x100.html": [ "f718ea6abfbab54333ba674ff0dcd320d8672bcd", [] @@ -299599,32 +299848,52 @@ "13841121c6429428bdccde7f971e9e582b6b7ad3", [] ], - "hyphens-auto-inline-010-ref.html": [ - "ce1296eb78ce970e4396cc6ee4ab21bbe7d5be64", + "hyphens-auto-inline-010H-ref.html": [ + "c3e6271c19fe044463352258f89f72c00842bdc6", + [] + ], + "hyphens-auto-inline-010M-ref.html": [ + "ace0c5e7537816c5807321eee0360be0ff87e9fc", [] ], "hyphens-manual-010-ref.html": [ "f79ce17a4c71bfac19b543b70bb8e95510bad321", [] ], - "hyphens-manual-011-ref.html": [ - "98581bd37c0d3e2be1381bb2829a3146821e63b8", + "hyphens-manual-011H-ref.html": [ + "99612206f8ed6e026b199ccd87fab1165bdc21df", + [] + ], + "hyphens-manual-011M-ref.html": [ + "191095a413bd42bb84ed71ddfaf73f363833e465", [] ], - "hyphens-manual-013-ref.html": [ - "9fa6bee4215ea277224d0bf0469a8abe304beb26", + "hyphens-manual-013H-ref.html": [ + "12ad0ed5059f4dd67d9ad722bc539695334562f9", + [] + ], + "hyphens-manual-013M-ref.html": [ + "3c7121242b732d7257bb07ecc143a8eeff7d4c7d", [] ], "hyphens-manual-inline-010-ref.html": [ "a55fe859ff225322e96e5bb259a1f89722c16e7f", [] ], - "hyphens-manual-inline-011-ref.html": [ - "17254a09f17266c0f1e9470c80827b91b9b84958", + "hyphens-manual-inline-011H-ref.html": [ + "0cd1ef9f9b3901315e757b0a3f89930afa6afe85", [] ], - "hyphens-manual-inline-012-ref.html": [ - "5dfc2b8e221c14549b60f02a60fc0f33171f9fd7", + "hyphens-manual-inline-011M-ref.html": [ + "836919648e7df642016927d72926ccddabed1f58", + [] + ], + "hyphens-manual-inline-012H-ref.html": [ + "8b2ff04ade5e1322b30a66d849a6a4b58be82e40", + [] + ], + "hyphens-manual-inline-012M-ref.html": [ + "0c8db033c8b8356e6201d58e83d6f5f6d0c1481c", [] ], "hyphens-out-of-flow-001-ref.html": [ @@ -313988,7 +314257,7 @@ [] ], "testharness-api.md": [ - "2ee52786add43f036fe0ac7c8b66acc892d876ff", + "bb855b1723890c809539294159bb815ea1356f25", [] ], "testharness-tutorial.md": [ @@ -319933,7 +320202,7 @@ [] ], "reporting-empty-frame.html.headers": [ - "66302f108fd5fc9142460a60f6f20b5303b46780", + "b7c8b304178b4f4aa213703d6870e84267acba6c", [] ], "require-corp-sw-import-scripts.js": [ @@ -329595,7 +329864,7 @@ [] ], "netinfo.idl": [ - "729678396884a19874239468075bfd587c621305", + "530deb998c4656a4fda32af7f6286e895a15e082", [] ], "notifications.idl": [ @@ -329994,7 +330263,7 @@ [] ], "invisible-images.js": [ - "fd13e9454deda3c69228aab096ce032e8e1b7cff", + "bad078e35f0cd124eb688fe5937ad2686d7c5bbe", [] ], "largest-contentful-paint-helpers.js": [ @@ -332212,7 +332481,7 @@ [] ], "utils.js": [ - "a1fb993eb90e9e24f6502e4aed53a79420d360a6", + "2ee0e3d0626da211089f43e5484b7fc7d8140e52", [] ] } @@ -334908,7 +335177,7 @@ [] ], "webxr-test.js": [ - "a04aa37229cbf4fbc3df984fac90b03bc216fcdd", + "a9dd9b1d7c7c05d5aebe2f5a19f7dc3bc989239c", [] ], "webxr-test.js.headers": [ @@ -335253,8 +335522,16 @@ [] ] }, + "assert_implements.html": [ + "6e35f385027a53135f433dea27a63907c7771754", + [] + ], + "assert_implements_optional.html": [ + "4f23e203c57a50352b686bf0c73930029186aa4d", + [] + ], "assert_object_equals.html": [ - "bb3a97e471a0ddf89836560c4db004ea577f758f", + "19296b8293f25055a2100ebd884dc9dbbd7999ff", [] ], "basic.html": [ @@ -335273,6 +335550,10 @@ "13d01b81f351801e4d7dbb2d03ca68d1b594bff2", [] ], + "helpers.js": [ + "b273a72589f7d334de58ee780abbc4c0f4e22ebd", + [] + ], "late-test.html": [ "693d7e3c818ed7fbc5503d09c91b9da7f7139bac", [] @@ -335337,7 +335618,7 @@ [] ], "testharness.js": [ - "63883e15504d78c60344338d8b4e97da2d0109a3", + "15df5b6a342b2586d50b6de0fed1b60a8b752452", [] ], "testharness.js.headers": [ @@ -339552,7 +339833,7 @@ [] ], "run_tc.py": [ - "69625710ad91edbc8db25c3be380f52f4db797a8", + "e8dfa6163e55054e5a18743cb89d94925f92f405", [] ], "taskcluster-run.py": [ @@ -339648,7 +339929,7 @@ [] ], "README.md": [ - "450981f686bface2d9243e5628040bb6b2f6c4e0", + "8b0737359ea5fa64f4a8c1c7536705951166bc18", [] ], "__init__.py": [ @@ -339666,7 +339947,7 @@ ] }, "frontend.py": [ - "976156cf65a00821a11a3351301b47c1078c8416", + "59a1cff2ebd0efda06fadd144a84b5d35b2d81c8", [] ], "retry.py": [ @@ -339967,7 +340248,7 @@ [] ], "test_manifest.py": [ - "6d329ad38f969106c28e73de81dcbf1c468f9adf", + "b618d75ec1ed2e955e27f763446c1b0fc3987f1c", [] ], "test_sourcefile.py": [ @@ -344830,7 +345111,7 @@ ] }, "requirements.txt": [ - "c7ddcd75456a5fd532e84d227ba3daa71accc4d9", + "9b84e7334bbcb0702e9379d49192e4cc38a5e1c5", [] ], "requirements_android_webview.txt": [ @@ -350540,7 +350821,7 @@ [] ], "webxr_test_constants.js": [ - "d92da3d8f34875648a6e503c14daf7d83915023a", + "959859cba2136de61c5e233cd66af9c96776eda5", [] ], "webxr_test_constants_fake_world.js": [ @@ -356312,6 +356593,13 @@ {} ] ], + "2d.path.isPointInStroke.scaleddashes.html": [ + "55a80bc8211feea4eafe8c5927f096d4ce4df8fe", + [ + null, + {} + ] + ], "2d.path.lineTo.basic.html": [ "b3ca9f981e1cff3c1ade6ec2ff5fbe53dbc0a21c", [ @@ -378272,7 +378560,7 @@ ] ], "change_eventhandler_for_no_name_equals_in_value.tentative.https.window.js": [ - "fe6a34b3d697a3a8556bd7e037904753f0fa4c16", + "13d721786c9a140b05ed5291c6096c894053f78b", [ "cookie-store/change_eventhandler_for_no_name_equals_in_value.tentative.https.window.html", { @@ -378576,10 +378864,10 @@ {} ] ], - "cookieStore_event_delete.tenative.https.window.js": [ + "cookieStore_event_delete.tentative.https.window.js": [ "e8c6fc036a76863acf2d8b2b3660550715f1dc0d", [ - "cookie-store/cookieStore_event_delete.tenative.https.window.html", + "cookie-store/cookieStore_event_delete.tentative.https.window.html", {} ] ], @@ -378690,7 +378978,7 @@ ] ], "cookieStore_get_arguments.tentative.https.any.js": [ - "34f7dbcd948fd5e590b0e9f715ad878f4de9694d", + "b0bef77fd895cfff11f463fb94fda801072d6371", [ "cookie-store/cookieStore_get_arguments.tentative.https.any.html", { @@ -378850,7 +379138,7 @@ ] ], "cookieStore_set_arguments.tentative.https.any.js": [ - "b9074c827d2a1ffa9b3ee1a0a28714396c4ae0d8", + "6685f5fd3b7186b88b8ca36e2508b513b513257a", [ "cookie-store/cookieStore_set_arguments.tentative.https.any.html", { @@ -383255,7 +383543,14 @@ ] ], "contain-size-grid-003.html": [ - "fd07602b5686637b94dbc9d332ec1b5466631d0a", + "44b736b1d6b62ec5c4fc0e6fb3314095df6a27f4", + [ + null, + {} + ] + ], + "contain-size-grid-004.html": [ + "c333c03298c7049292913f3e21de52eb0564c8d2", [ null, {} @@ -386438,6 +386733,13 @@ {} ] ], + "grid-baseline-004.html": [ + "baabc70a3f477321f76dff59cfa2e73bcff8e165", + [ + null, + {} + ] + ], "grid-block-axis-alignment-auto-margins-001.html": [ "e3a880f66eaf2e0da945e9683c0c7e4105ca51ce", [ @@ -387569,6 +387871,34 @@ {} ] ], + "grid-auto-fill-rows-001.html": [ + "afce3f5fa91a609f5a4f27f666e97565f4fbc8ee", + [ + null, + {} + ] + ], + "grid-auto-fit-columns-001.html": [ + "b1dab7e32f9dd98f14af9ff885cc688b465ed384", + [ + null, + {} + ] + ], + "grid-auto-fit-rows-001.html": [ + "7619d9e023e2a7cbc9e7d5fb5d49730046bfbcf3", + [ + null, + {} + ] + ], + "grid-auto-repeat-intrinsic-001.html": [ + "a5f6f16407a67b78294fd223345d1254a8241333", + [ + null, + {} + ] + ], "grid-auto-repeat-max-size-001.html": [ "2786a986e062eee135dfb2ccded7e4c3d9ca8210", [ @@ -387618,6 +387948,20 @@ {} ] ], + "grid-change-intrinsic-size-with-auto-repeat-tracks-001.html": [ + "437ad818799a94a48baf19bf0753982bf65196fc", + [ + null, + {} + ] + ], + "grid-content-alignment-and-self-alignment-001.html": [ + "cd79210f10d7f5384def836868b2c5394db3e447", + [ + null, + {} + ] + ], "grid-inline-auto-repeat-001.html": [ "deda5656679c29cd8706762deedcf56e11d4b95d", [ @@ -388058,6 +388402,27 @@ {} ] ], + "flex-sizing-columns-min-max-width-001.html": [ + "6b269e5258f9eacd0f0e066035f9f7ea2333aa76", + [ + null, + {} + ] + ], + "flex-sizing-rows-min-max-height-001.html": [ + "0789e4053013e91f5b7b6ee8b2e1698346c0f7c9", + [ + null, + {} + ] + ], + "grid-container-percentage-001.html": [ + "511e0cd99ead89649884ab7cc0852bfab09eb7da", + [ + null, + {} + ] + ], "grid-content-distribution-must-account-for-track-sizing-001.html": [ "907ef68668f2cbe113674e808b4e78ae0e390100", [ @@ -388135,6 +388500,20 @@ {} ] ], + "grid-item-margin-auto-columns-rows-vertical-lr-001.html": [ + "63bf55f293b0ae6a2a6c430306f9d34ee9e09b25", + [ + null, + {} + ] + ], + "grid-item-margin-auto-columns-rows-vertical-rl-001.html": [ + "d6767e3f4a648cbf54dcd1d5530a8d38824b1be4", + [ + null, + {} + ] + ], "grid-minimum-contribution-baseline-shim-vertical-lr.html": [ "3d1949fc3fa3a1d1951dda03ed8a8bb63f31f0e1", [ @@ -388398,12 +388777,33 @@ ] }, "placement": { + "grid-auto-flow-sparse-001.html": [ + "373371ac2bf16bd112c9e4f190ed5f536bb2f494", + [ + null, + {} + ] + ], "grid-auto-placement-implicit-tracks-001.html": [ "546336a6ce8208d7c30afd66e20fbe33040cbd7c", [ null, {} ] + ], + "grid-container-change-grid-tracks-recompute-child-positions-001.html": [ + "a2485142e1ba84d99809c0eaf8d9a4a6932d5246", + [ + null, + {} + ] + ], + "grid-container-change-named-grid-recompute-child-positions-001.html": [ + "d702d30b3baf846a5d1af0e52741a114f40d53f6", + [ + null, + {} + ] ] }, "subgrid": { @@ -390928,6 +391328,13 @@ {} ] ], + "font-size-animation.html": [ + "4b8ce1c2551fececd578d60411abfa27fe1c75be", + [ + null, + {} + ] + ], "idlharness.html": [ "6f053757c3cef099f0cea41716a942dfa7e66100", [ @@ -409603,84 +410010,84 @@ }, "element-timing": { "background-image-data-uri.html": [ - "540668ae3c3b38fae1c8b09b4931ceaec9096338", + "9722463742ae1e1bbc09677a03fa03383bbc406c", [ null, {} ] ], "background-image-multiple-elements.html": [ - "61a284a5df38dde63afc8216888d20f5bd308415", + "11f8c05f9668bdd1f037e28f8df6773c8f3db951", [ null, {} ] ], "background-image-stretched.html": [ - "d5534c3257a477c0adffa01f707077d14a2f5b75", + "3ad8976ccf1e27dcd77f63344b495ccf39946dbc", [ null, {} ] ], "buffer-before-onload.html": [ - "79dd64e29779675019a599f2e17b4e64ac8cd940", + "17c8238f6e79a1f6c3ba2484191705c023a54818", [ null, {} ] ], "buffered-flag.html": [ - "1fca117879232e17dae2c889dcc245ac0be6f5f1", + "e7fcf059fb1abb10c0697577822a4723b3ef7253", [ null, {} ] ], "cross-origin-element.sub.html": [ - "b5b06f30469b3ea82fee31beeb4657198f2e1af2", + "1052bf246d0fa262ce5370f4152cb60dd758adab", [ null, {} ] ], "cross-origin-iframe-element.sub.html": [ - "b183fe289aa96abb6fbd09953c00086f4fc4f3e4", + "2f49933ab964b7a35bb3226be48f09f5901d6584", [ null, {} ] ], "css-generated-text.html": [ - "4b7dea73ca8d383ab328132d49147e7da171e5c8", + "d1bbf5a7eee74ec74f8e09bfee41faf060b8c250", [ null, {} ] ], "disconnect-image.html": [ - "9c2be0e45ac5457c1bbc73ba1f5ee3194d7e001e", + "6f9f2ce7b9fbd27bc58211e508705b952c23bb90", [ null, {} ] ], "element-only-when-fully-active.html": [ - "001430516dc83c5eb92517ab23b3d3490b8ce118", + "ff08074d574df8b7be98f00f796b271479d05c71", [ null, {} ] ], "first-letter-background.html": [ - "b24ed542c88e2d08ab463cd013ef972a88a8e15a", + "f05f2f92234d740bcf42d13396b187bdbf90282b", [ null, {} ] ], "fixed-id-identifier.html": [ - "ae8303f021d7ff1340a381a8fb3995170201c6cd", + "749b9ada2f383ee7d7d7a5277c3318124a942071", [ null, {} @@ -409705,210 +410112,210 @@ ] ], "image-TAO.sub.html": [ - "ee2b061790094f790464fc4b627d341a14020730", + "7b455dfa4c405de3918efbcd0f9648be09346948", [ null, {} ] ], "image-carousel.html": [ - "ce6ac951e2494de3e6a1b7c7e79cf816effb9776", + "2b3b618f8c447df357d328c234abc3a542dd6d7f", [ null, {} ] ], "image-clipped-svg.html": [ - "c8e4a67cea687b9e54ae905d75cb1ba0b33691c8", + "4c2bb36079432fda085ba44d7d534cf6ac8ee033", [ null, {} ] ], "image-data-uri.html": [ - "afe203ae1bf96297cd96b885377317832654c243", + "02d88fb2448a1aee789061f81bddcec3e71c286f", [ null, {} ] ], "image-not-added.html": [ - "83a6cc6084438042e947e2cebbfe4aec07b61d32", + "d77049ecd4966c2dd1e3746ac6b3a3fbd97659a3", [ null, {} ] ], "image-not-fully-visible.html": [ - "c51c24a965a6dbb09b497827c1817669ca9188e2", + "504d17592f2de93177dd20949d31f14ed51503f7", [ null, {} ] ], "image-rect-iframe.html": [ - "a97ed5a850787aa11fb412fa99dd7b8cb732a41e", + "00986366e612b4285d2dd6d901638053bd8eaef5", [ null, {} ] ], "image-src-change.html": [ - "e9e13742a6505dccd7248b0175b8b9d331b533b9", + "88436123fe9da47520dec1e7283df6bd66131a10", [ null, {} ] ], "image-with-css-scale.html": [ - "9bd71086a75ec42103266588f287512623c4e471", + "a0490f375cc24b2b102ae3974c53d994b553eb00", [ null, {} ] ], "image-with-rotation.html": [ - "64ff942f0cdacb74315044c990041653d30b42f7", + "229e9ae96c8f63b9f458217bc63af0a41fe09634", [ null, {} ] ], "images-repeated-resource.html": [ - "6090e75f26ec0aa920735a9382ac654ab979caa3", + "f7296e05e73d0615faab0bc186ac442c1cadf00c", [ null, {} ] ], "invisible-images.html": [ - "8225996e255b8137af72901a963403d5063f75a1", + "ffde3ce2f6f46819b812c5b8445f2cb7f716e61d", [ null, {} ] ], "multiple-background-images.html": [ - "c2a32c3c8e6b7de76b3b91cb9ee360a828e7e7bc", + "380e5e825e187d970bf156e143c77317ca5fc758", [ null, {} ] ], "multiple-redirects-TAO.html": [ - "6800f7cf6873ef10540e83fc0fa7b249c8050e0e", + "3a45b552bea0f599fd778e62a77759321384fd2f", [ null, {} ] ], "observe-background-image.html": [ - "e02714b702108cbb58cfb33fffb6194bed05cd9d", + "6a43401cd0f4270f52b9167393b1b9fd0a7d9cce", [ null, {} ] ], "observe-child-element.html": [ - "4293e814eb91232c9768633c8684ca5c40a1d6cd", + "c8071998c52b3b601218a7fd658bac68f530e6c3", [ null, {} ] ], "observe-elementtiming.html": [ - "ee8960bd72883409055752be16ce2b3d2198535b", + "a204f0d6772855c58fa6975fe020638e71a4171e", [ null, {} ] ], "observe-empty-attribute.html": [ - "25d3492f73bee7c7c8373d14db86f36de95a9df0", + "baec6ee48d7195465031b3537b8b2ed22fa36e5b", [ null, {} ] ], "observe-multiple-images.html": [ - "9a0657aa60fe73108ae81e0c2bddee320989822e", + "c5ea700553b4b2337bbcbb3925293992758f791d", [ null, {} ] ], "observe-shadow-image.html": [ - "1c12c5fe0310d8c21609ec17778e06063e162ba9", + "e2a81d62449180c47b4d19311046bdd9a41748e1", [ null, {} ] ], "observe-shadow-text.html": [ - "3167a1225c5216b69a99d57e8d58151a27ec3239", + "6e6347e60d26b250ea3c070fcfb1182d9d4d78dc", [ null, {} ] ], "observe-svg-image.html": [ - "83ca4f40aaeb2cdb81236ee9b973f9ea0aaf01fe", + "737f94f92bcb56ce3603c9e21f67efb80d31042d", [ null, {} ] ], "observe-text.html": [ - "a054b2617261fb33d1509a2639794cca86cf1729", + "5d8955269f842d972e4a26ebc03f9299aeaa5294", [ null, {} ] ], "observe-video-poster.html": [ - "f64da173c6f2daa2a811075a75b997982d0af73d", + "5607733529671882bfde5be4c037b7a1614a84a5", [ null, {} ] ], "progressively-loaded-image.html": [ - "0d59052cf3ac069adbe47780fefc8dc75000ac52", + "6695d8f9c324b0c20f9b19c1f064a7349c770d5d", [ null, {} ] ], "rectangular-image.html": [ - "a97c549a9aad387c2beda7971fea985dcb35a4c1", + "65f190e75300e102bbca961ef34518db27b4efa2", [ null, {} ] ], "redirects-tao-star.html": [ - "f8e4d19bd07cf6faa872a5630855414bf229d111", + "e5067d3d6bd7915522bfb670fad0919f0e4101fb", [ null, {} ] ], "retrievability.html": [ - "5c6113bdc933f98d7cb753de904f7b07456daf40", + "cd2c2a956e194cd06b5374a26dc9f1b06fe5f482", [ null, {} ] ], "same-origin-redirects.html": [ - "3527d805f3e01d94a5f1b19085fd63d2f689a8b8", + "e52fcecc1ae69a702dc207367a02be890635043f", [ null, {} ] ], "scroll-to-text.html": [ - "ca06e91c530a73f75220aecbfe9d7ffb2bee18b4", + "0508d2bcf9951c799be84559c5d5721909a2cbbc", [ null, {} @@ -409922,14 +410329,14 @@ ] ], "text-with-display-style.html": [ - "faf644fd8d244a9df52eb96403719b0922fcd2dc", + "94e89fcf7270b43634b4c651c961d539a38f59fa", [ null, {} ] ], "toJSON.html": [ - "ba13a0fa90797c0bc6fb104857d5ab86a0790b3d", + "24c7d1e0a655dff215b0e6a7ad94e0e3f3488b5e", [ null, {} @@ -421442,7 +421849,7 @@ }, "event-timing": { "buffered-flag.html": [ - "dc70ff253ff3c408f052e3d8cca705069ee8fa76", + "7ee152be9388fa8593c3c2a85981a7cb0ed7492a", [ null, { @@ -421451,7 +421858,7 @@ ] ], "click-timing.html": [ - "376372a3f110feb85d65bd3dc0e28465e5a5e71d", + "4544734f73fa2b81d7242f3bd17c605aa45eb078", [ null, { @@ -421460,7 +421867,7 @@ ] ], "crossiframe.html": [ - "55e2becfcbcfa3feba1473ddcd17e15a30adbfc0", + "711408684340ef27d48d0ff36ce41c70e1424d12", [ null, { @@ -421470,7 +421877,7 @@ ] ], "event-click-counts.html": [ - "034e172c1df8d051fde76c2e8787832f2a7c213b", + "d4e87c58969a3af4dadaeead894c7cc843bc51dc", [ null, { @@ -421479,7 +421886,7 @@ ] ], "event-counts-zero.html": [ - "0cc9e2ee38aa9f0a720952d5c27d3b01537fbdd4", + "3ec90dd69138f35197774239dfc12f554c9284b2", [ null, { @@ -421567,7 +421974,7 @@ ] ], "only-observe-firstInput.html": [ - "ad71153d40bca022ebcd9c902710f8d71aeaeb61", + "54a6036f91adb89c7b6528e40850937d70520b77", [ null, { @@ -421576,7 +421983,7 @@ ] ], "programmatic-click-not-observed.html": [ - "1c2921ca48991f46de533e10a7c4a2a924ab3551", + "0a189b0bc2a7fd931de7efbc40de51a11b939c23", [ null, { @@ -421585,7 +421992,7 @@ ] ], "retrievability.html": [ - "d2b6da2439fe5f42091b35d0916c6e36ff3c0e8b", + "087cd13184b6f651a15065a46005872ccb00d318", [ null, { @@ -421595,7 +422002,7 @@ ] ], "retrieve-firstInput.html": [ - "acff788259f5ee85db230d967692b3a35894c387", + "27b17cd18165f975fbbd98e7de07dad71251c1fa", [ null, { @@ -421604,14 +422011,14 @@ ] ], "supported-types.window.js": [ - "5360bdd9e82244350ac19de21bcd67d9fd5a0450", + "1cc43495c096fd0cd568fa5983055c0390f94d40", [ "event-timing/supported-types.window.html", {} ] ], "timingconditions.html": [ - "02da2976ceecc8c5fa648b74a70fcf277bc8ee3f", + "12280cb894a8767b9b3bc7ba1df61b4e9e8630d5", [ null, { @@ -421621,7 +422028,7 @@ ] ], "toJSON.html": [ - "a11073aa9a0eb8436fb0ecfcdc48f4a35c908993", + "a2d7df42da5b86a48daba7fad7e7f2adf76ed039", [ null, { @@ -426081,7 +426488,7 @@ ] ], "portal.https.sub.html": [ - "96067ae82ab7838784f6350dda7cee7840e277f8", + "8403a296fe12786bf75675cde47f4d41b684cdaf", [ null, { @@ -433380,7 +433787,7 @@ ] }, "baseline-alignment-and-overflow.tentative.html": [ - "1c0b312eb4520e789bee93a4669e16035fde1648", + "5f677b5f0f6df7b35cbe789a80f660bcd71ad082", [ null, {} @@ -438072,7 +438479,7 @@ ] ], "resize-during-playback.html": [ - "3ade1effc4bd0273a46bc45dd0e5218a3af453c9", + "1b057bbeac322e4bcdaa2ab7d1ff664b06402846", [ null, {} @@ -448491,14 +448898,14 @@ }, "largest-contentful-paint": { "contracted-image.html": [ - "ed6adfb2c7c66c65bd13f514be173d1cb48ff19e", + "8816bf4ba99cb71e9f79ba44859a80a4c103ebad", [ null, {} ] ], "cross-origin-image.sub.html": [ - "be0c8a1e11e334aeb62d3cd952072e481c9ee7ea", + "0cfdd1791ba2061c1cc179a84d4f11a47f799868", [ null, {} @@ -448512,21 +448919,21 @@ ] ], "expanded-image.html": [ - "e0b3545c21c2c14bd26feb9720648537a780d20f", + "55adff91f2f45afe47c6fa84f43b8fb98d7d0424", [ null, {} ] ], "first-letter-background.html": [ - "80b8f1891fdc90a07a93f463343644cc38e70734", + "09fe1f5beb6df26c2fa1489ef60855e226a5f707", [ null, {} ] ], "first-paint-equals-lcp-text.html": [ - "7a01cb15943ac3b0b863daa3272d962f78ec5e3f", + "97eb67e320efe52952740f90ab1e3fcea38eaea4", [ null, {} @@ -448540,7 +448947,7 @@ ] ], "iframe-content-not-observed.html": [ - "ea8e0d79f380b723d47f9683000be7ee4985c92b", + "e605e9f21f63f4aa5d8b73c38a53ac3253ece1fc", [ null, {} @@ -448568,7 +448975,7 @@ ] ], "image-src-change.html": [ - "cbe46f402b4e344571932fc501d4d3410eadc125", + "bd78476390c8c9df170bdd59211bb3756142e9aa", [ null, {} @@ -448596,70 +449003,70 @@ ] ], "larger-image.html": [ - "a571b8afe7915609b49197ac8eafbcde76b42d01", + "a9675386a086877aed979ff3fbd8d533fb26a658", [ null, {} ] ], "larger-text.html": [ - "af8bbc06b32c95bc66b0c450b7eb20f7154edcd6", + "ca711f22411c6cba5acf5cc2f8302526e3d37722", [ null, {} ] ], "loadTime-after-appendChild.html": [ - "f320b03df4da612b37c04900a0e702981220987a", + "2d19e73e60ff44d1a593f3338a3cc8120bf3ab20", [ null, {} ] ], "multiple-redirects-TAO.html": [ - "ec8ddc3ec61c6ca854dc55d4b3384e6403e54569", + "ee832c410435b47d9a26c9cb0f9db23c44ed5ad5", [ null, {} ] ], "observe-after-untrusted-scroll.html": [ - "4a1a214c8330a79999e1841fc87c5c27d8e57906", + "c84f922e5e589eea59290ab22731f1bb5eb4415b", [ null, {} ] ], "observe-image.html": [ - "58eb5364a92536597a78f16f76907de182f60d37", + "707840671b16ba815dcd79f948ed02401bf999e8", [ null, {} ] ], "observe-text.html": [ - "402fcd8019586c6b63077ff68fc8ae3a425c1574", + "a0a07d9422d62c2a20d72310c903242af0c56825", [ null, {} ] ], "redirects-tao-star.html": [ - "0667266e6d292337a676bb4f26acbb80701bc3af", + "1daea61486ce4fc050b182d9aabd7d75c0de5a19", [ null, {} ] ], "repeated-image.html": [ - "8c3c8909099296b85cdcda6f25c893f12a4ad3ac", + "a28409a848cc39bb1aeed87eb0d6e0117e2529f5", [ null, {} ] ], "same-origin-redirects.html": [ - "e17fdbb69e6fb8bafabd0dae7e2d23b601fd57d7", + "b5cf9da2d120d4e03852954057fc7171fad9901f", [ null, {} @@ -448673,21 +449080,21 @@ ] ], "text-with-display-style.html": [ - "24541541a8becb116ada2c682e48630932ba1fbf", + "e041a9fc21a5627ed72f898e8e7255ed6cb48810", [ null, {} ] ], "toJSON.html": [ - "25be5eb2dc909fcc2c224538607e3af47377ffc2", + "36e2a7fdfa27371b9295059525430e853029eef5", [ null, {} ] ], "video-poster.html": [ - "535f30e256574d9b734028f0ba7fb13b02ac0dba", + "b3a291886308da132ca07a46850ae71a615b9f26", [ null, {} @@ -448703,14 +449110,14 @@ ] ], "buffer-layout-shift.html": [ - "50cabda8d20406f4a0c8b4ac412f6b391572bf42", + "705569f96cf7d9501865dafd1e16aadf33cb59c4", [ null, {} ] ], "buffered-flag.html": [ - "1d200712c280346b12976c22d38e310ae9df639d", + "1c6726247328cb5605e845c4d9cff0033782348e", [ null, {} @@ -448802,7 +449209,7 @@ ] ], "recent-input.html": [ - "52adbf723ea34ce2ae7d2fb3027be67dcd785d5e", + "292b683bcb58c75044725fa3f6204e8835a0f739", [ null, { @@ -448853,14 +449260,14 @@ ] ], "supported-layout-type.html": [ - "cee4b808c87b585c49d463085e92e7d000ffba0c", + "3ba209f50a427965b651c92701a62f9006b8a2b1", [ null, {} ] ], "toJSON.html": [ - "00f074a4dd88aa17e7c4c7ef36e097738b932015", + "711cd238431a7bdc1e0c0a955c9effd7acd771a5", [ null, {} @@ -448943,14 +449350,14 @@ }, "longtask-timing": { "buffered-flag.window.js": [ - "f1ca54f532280fb0243ece0772a38e51cf9b92c9", + "88e1363beba7dc39fec18a2b89484b2fc527e207", [ "longtask-timing/buffered-flag.window.html", {} ] ], "containerTypes.html": [ - "94daab793c67f49ef858d2bbad56d2be43b38c2a", + "5a703f3995cec7f1aa3f3d4a274bdc1780c2fcc7", [ null, {} @@ -448975,70 +449382,70 @@ ] ], "long-microtask.window.js": [ - "9219fdb5c49b99b646343584fae37380d6f2a2b1", + "ef16f00dbe5643f685edeb52445d8803ff4997f9", [ "longtask-timing/long-microtask.window.html", {} ] ], "longtask-attributes.html": [ - "24540d7c22f04dec0919412a481adf279f685290", + "9af1c7bf95b3ab993a4c325b1c14a2f1172a102b", [ null, {} ] ], "longtask-in-childiframe-crossorigin.html": [ - "20a94a1eef4de998aa1ea9fa8ed4b781e7da9d3e", + "d0fdf742804d722a6682e8f2b455284dc83fa4b9", [ null, {} ] ], "longtask-in-childiframe.html": [ - "4feae7e55c16367025e13dfe1b1364500bcc34bc", + "4c325c42adb3526c32d213e985911139b3da97c7", [ null, {} ] ], "longtask-in-externalscript.html": [ - "db5c9db4a1626417aedd6c0e62c39376d8ee1a02", + "8636025cf286f5772edaba1aefdb1d0050d8d43c", [ null, {} ] ], "longtask-in-parentiframe.html": [ - "c6b7e3e583894ce57b292c3b746009f11a8a43c5", + "7fd5fb672bd4e7a16074e6fcb04f689bc5a2ceba", [ null, {} ] ], "longtask-in-raf.html": [ - "110ae751ee335d6d08b527d0cc7b32174f3371ec", + "40508e1e6778a4ac986ffc5bf0865f4c0d6b3ba4", [ null, {} ] ], "longtask-in-sibling-iframe-crossorigin.html": [ - "ba9c7170626e34b0f36d7680841cb13c048152e2", + "d66fe0c63ba363333c7f1cdc3b75712cddf7de84", [ null, {} ] ], "longtask-in-sibling-iframe.html": [ - "8f530fab06970125589e0594cb5725617c829349", + "396a9beeeaa3aae729ba1180761eea57cfa573a3", [ null, {} ] ], "longtask-tojson.html": [ - "6574b62d348b08e2f43aa5a81a2f3fd8bd2c50c6", + "b1f9b3c9b1cd60fa77eba4fc7ad7e940411cef53", [ null, {} @@ -449046,7 +449453,7 @@ ], "shared-renderer": { "longtask-in-new-window.html": [ - "18d36b1e734bc0ef21af575892690211c420bd5b", + "7668d995d86a369a0099e73f126c6e1d5f5baa55", [ null, {} @@ -449054,7 +449461,7 @@ ] }, "supported-longtask-types.window.js": [ - "aaa6415a8d3e5f73e940ae83551e05caee67311c", + "efb393ad8443f4286ce860749a6d1142734f491a", [ "longtask-timing/supported-longtask-types.window.html", {} @@ -449260,6 +449667,13 @@ {} ] ], + "mo-font-relative-lengths-001.html": [ + "b18d7dbfbe2ede218189d75f67138c8d924bdd88", + [ + null, + {} + ] + ], "operator-dictionary-001.html": [ "e4e5c68b26344195844699e531dceacc835a8597", [ @@ -466439,7 +466853,7 @@ }, "paint-timing": { "basetest.html": [ - "d4dfe7ed822beff3090a58e84d736f5ae79b4620", + "1c875984598024a7d483486e102e91a71b37132f", [ null, {} @@ -466453,14 +466867,14 @@ ] ], "buffered-flag.window.js": [ - "4654c925ca0cf069d3b0a96f0daef25ef67ba187", + "b3a6a6374c70badf103ced74de9b4c54d47da672", [ "paint-timing/buffered-flag.window.html", {} ] ], "child-painting-first-image.html": [ - "d78af081ef8af9e47dac8a042564c0dc4fd38479", + "a7ed2c6f10111911fa4205c4f3a7c0143adfbeac", [ null, {} @@ -466489,14 +466903,14 @@ ] ], "fcp-canvas-context.html": [ - "5f3c9d9983bf0404509fc960d1b7dd66b058950f", + "077c1aa3ddc3c415a12ff2055394d24d4dc30cc8", [ null, {} ] ], "fcp-gradient.html": [ - "1d15812a0f3ea5c274017f028f42cc2c242a83b3", + "b9f86d8dd7381cf07f6d20515313240e93729167", [ null, {} @@ -466608,7 +467022,7 @@ ] ], "fcp-text-input.html": [ - "b22c618c119fd7cf99cfbf2b53c0dfbaaef5983e", + "0b7e568359fc382c8ed6c18216e334abcd05958d", [ null, {} @@ -466622,14 +467036,14 @@ ] ], "fcp-video-frame.html": [ - "0f61b7e5289b69457258258db4b2daea6224b5df", + "cdfd1670715d42fbefc123a40403096be4dd1bad", [ null, {} ] ], "fcp-video-poster.html": [ - "5c1048ac0a7992c454ce9f542036a0b6bcf2edc2", + "eb9b1399b52f50dbcf99639d50db5ad153d7e33a", [ null, {} @@ -466643,7 +467057,7 @@ ] ], "fcp-with-rtl.html": [ - "868d2fcaf8fdfaf3f20713375688aa106c579b03", + "e9fc2857832b83fdd191697c5aa37c9140763447", [ null, {} @@ -466651,42 +467065,42 @@ ] }, "first-contentful-bg-image.html": [ - "9c3b2200fb667f66925be4333a78b23914749617", + "3da3d2553ee81d65c2b9540d49f8ac8352d41e8d", [ null, {} ] ], "first-contentful-canvas.html": [ - "ab47aa0c21c2cc3312f3f370a2566b80ecf8d13b", + "667591cfe363ec4e677b6f808f63790178f9a354", [ null, {} ] ], "first-contentful-image.html": [ - "034391c796cf23e9a99f2ddcfb5d18fcf5607da2", + "5c29bfe070f5144fbd3f52c3e049486fd611ebef", [ null, {} ] ], "first-contentful-paint.html": [ - "67d7b95eaa5525b184b9d4abbc2e6595570caa09", + "de2ac0352328bb007ccac39756578ca4e91db9f2", [ null, {} ] ], "first-contentful-svg.html": [ - "8cda11c95671f98a5ed6e2b1a83cfd77243f6744", + "9909ec659eff2a110f8ff7d8e867509913bf6d60", [ null, {} ] ], "first-image-child.html": [ - "3f073144692ea6732951aff7839b9cf8baf01e14", + "9b48ff89056cf261a5e469e42569d8df726845b5", [ null, { @@ -466695,14 +467109,14 @@ ] ], "first-paint-bg-color.html": [ - "5e863794d41850bc5422b0f759949b25bad63751", + "21271da4cefba4fe06611ec345372d8477ee806c", [ null, {} ] ], "first-paint-only.html": [ - "ea735a246b3c3c2bf47e0772b0b134c7f3663051", + "99f41f97b175cc55d29628d0e9f052a7b5b581e3", [ null, {} @@ -466741,7 +467155,7 @@ ] ], "paint-visited.html": [ - "9a5561d5f7f317738d406d45bf371013f5cf3f25", + "d611197b28873b2a549dd4c90220be5d1f5af92b", [ null, {} @@ -466755,14 +467169,14 @@ ] ], "sibling-painting-first-image.html": [ - "16a6f145db0265b60a10b5f7da9fab9dc97a946a", + "d8fec53047f91ec20faa4a6959f580d3643794c3", [ null, {} ] ], "supported-paint-type.window.js": [ - "c2c3cf5d6dd8786d69e34012eb9453073affffef", + "518faff5cfb2240a0ab70c5729be77b456ebef93", [ "paint-timing/supported-paint-type.window.html", {} @@ -467688,7 +468102,7 @@ ] ], "po-observe-type.any.js": [ - "2c0719a8d146882ad317ff2418e89d4e77a2da18", + "b9854cc1466fa7856c8807e7234db5fe182c558f", [ "performance-timeline/po-observe-type.any.html", { @@ -467713,7 +468127,7 @@ ] ], "po-observe.any.js": [ - "7d7de376b25ceb1b0c3cd26a4dd27e802b10b155", + "5b593374baf157cd33207956273d049926741ad2", [ "performance-timeline/po-observe.any.html", { @@ -468941,7 +469355,7 @@ }, "portals": { "about-blank-cannot-host.html": [ - "7aba015e69b85a173c7a63dc277aedafeefc63a2", + "c43fbc93ba7b97cf4bf38da2924b597809a97bca", [ null, {} @@ -468958,7 +469372,7 @@ ] ], "frame-src.sub.html": [ - "1b37fd4ac2148e10828112876bb8ad0aaa818075", + "13d9e79667f2d43a8c12817bb374a72a0116b33a", [ null, {} @@ -468974,7 +469388,7 @@ ] ], "history-manipulation-inside-portal.html": [ - "efbf1de136cca726701fc1827dd0a00fda93c987", + "d4b0cf4db9e0b4ab7289dafa73de0bd493ed6605", [ null, {} @@ -468982,14 +469396,14 @@ ] }, "htmlportalelement-event-handler-content-attributes.html": [ - "04b4615205ae9f036231370b9d30aa217608f2c4", + "0836c8c00b5ed1a59fd55b942b7840b34317cb9f", [ null, {} ] ], "portal-activate-data.html": [ - "260bb00ff0686cf30034b9b98317cffebdf05d2c", + "54fdca5d8cded9f7e9625e35239c818af43abe20", [ null, {} @@ -469003,77 +469417,77 @@ ] ], "portal-activate-event.html": [ - "990dc2d4b85ac3ca49e246ba17249a2986592e4d", + "69d8a7c930ef5be41d1dc858a8094c9d0a5bda8a", [ null, {} ] ], "portal-non-http-navigation.html": [ - "e2b5d3d3937e4991d99caa3d87901ffe6202a100", + "aa02c15efa975d63ed6f1e4c3e446ca7c5f99074", [ null, {} ] ], "portal-onload-event.html": [ - "da770013e26506cca3a314e39f6deb962e42578f", + "f6b97a814ed79b4178f8b8e0cd8620f98683cc88", [ null, {} ] ], "portals-activate-empty-browsing-context.html": [ - "d904cd58543ff02c280d3f43267b8d54cad7882b", + "b1787782ffde532600cebd55c1e5cc1a29a0232d", [ null, {} ] ], "portals-activate-inside-iframe.html": [ - "587e483479cf8e616694de345ecb681a69214e61", + "f4039540961dda768c07ef8a580581911fbbb12f", [ null, {} ] ], "portals-activate-inside-portal.html": [ - "bd0d9e27bb6b25adbc3844adc8f8f947cf83dce1", + "19b57b3e42e4227d2af780486d3d1d53ceb4a34d", [ null, {} ] ], "portals-activate-network-error.html": [ - "c2094fd4ded233f33f5a7631c2f9d2309567d624", + "60ee5c902da70a5a1027b8f71528ac7599fa7f5e", [ null, {} ] ], "portals-activate-no-browsing-context.html": [ - "bfc45f68c1859401b015d9cd22aaf50cdefb1770", + "ccf1e9504be301331d93412cc25f7205347ff864", [ null, {} ] ], "portals-activate-resolution.html": [ - "ada8d4619a075df9c8c422c5d8ff54a0f9700deb", + "7094768a4f81fe25136f3b2647d4c9b9451ab817", [ null, {} ] ], "portals-activate-twice.html": [ - "eaef8b7cc94e0e62bc34e32d4c48c7b6bcb9f83d", + "0eea5465a2b2d9629579e409325a1cd948892fe8", [ null, {} ] ], "portals-adopt-predecessor.html": [ - "21893987e63839bbfb8a9d67e0f41e7502c88812", + "04c61960627836b54e1a04da168c075b1ba93723", [ null, {} @@ -469087,14 +469501,14 @@ ] ], "portals-cross-origin-load.sub.html": [ - "be817b8a0aa44de1773f7c9448a572a15bec9866", + "04db38a8e9a2d9b2ac5ffe1078f3015dd0b9204e", [ null, {} ] ], "portals-focus.sub.html": [ - "54fcf3a3d4734f0a1a1f49462afbeba21a5a0644", + "ccbac7db906054b4914f179f1a9aadcbd6960cc3", [ null, { @@ -469104,14 +469518,14 @@ ] ], "portals-host-exposure.sub.html": [ - "3ff88413691db6c64b1cdb7a23fe2191640d47c2", + "93ee8ecdc0968b71aa19927cfce39191b8d33e16", [ null, {} ] ], "portals-host-hidden-after-activation.html": [ - "571ec55810aa8e76c3dd977f774b3a1eeb835904", + "9638a6c7c6a84ccf040b80e9d98160b41c5d66bb", [ null, {} @@ -469125,7 +469539,7 @@ ] ], "portals-host-post-message.sub.html": [ - "8750dd43d011ccf48d40f9671bd02c8dd29047c1", + "e547642c9f27e91a1bd911214fba7750f136ed8d", [ null, { @@ -469134,21 +469548,21 @@ ] ], "portals-navigate-after-adoption.html": [ - "f403902031303f21b9019c159d63b39ba1ff00d1", + "1ca1cfb79f3d68f358cdd8fd70f5ca92665d6c51", [ null, {} ] ], "portals-nested.html": [ - "41d053bd48d11a9511168bf570e2d9d08bd78fdb", + "b4b396ff8dd1be5e2af8048160238a9c7a94be3e", [ null, {} ] ], "portals-post-message.sub.html": [ - "f3927a0c05ace4e9e811548d49f6e0114560abf6", + "2f6b25d97dab30d1b8ae86a6ab27526393dad3eb", [ null, { @@ -469158,42 +469572,42 @@ ] ], "portals-referrer-inherit-header.html": [ - "da908cb2c21ff0c7996d36b326f18f400ad8b6be", + "1fbd88893e41ef0e0d638864e45111250bf96470", [ null, {} ] ], "portals-referrer-inherit-meta.html": [ - "eecb247973e838c6fc5e09f32180fe58c81a2727", + "e77894cfa4d905e87accb98d04f363971350be02", [ null, {} ] ], "portals-referrer.html": [ - "b9abcdb80de70dd5ed8135617945d59bdbb35269", + "4cd3b908958bf2d7aaf9bdee44b2cc99b476ea6d", [ null, {} ] ], "portals-repeated-activate.html": [ - "bf8d8ad42641c4d775db4255087383007df07698", + "f2f36cb76828e23570aab88ec839578967b70690", [ null, {} ] ], "portals-set-src-after-activate.html": [ - "f9728170858792aae99aebeffe507bc5c94b0e19", + "e485ef4d51c3d60a1840d1589bac939f2b3296e6", [ null, {} ] ], "predecessor-fires-unload.html": [ - "dce2afb8e6fde03c292456a7e960b52b8558c8ca", + "cb6d98c01d0d19f0cfa42712026fae5beb9f2c6f", [ null, {} @@ -469201,7 +469615,7 @@ ], "xfo": { "portals-xfo-deny.sub.html": [ - "2110d4906f9dd0769beb07cf428ecf3ce40ef370", + "efc925276c9bf3c05c6ab9743e75090a5fea894e", [ null, { @@ -485189,7 +485603,7 @@ ] ], "historical.html": [ - "9da70c44de9be25933d95d7e6fd2f3ae69a04333", + "99d2fab5f52654f21f6e8f76878b1a44722b101f", [ null, {} @@ -493198,6 +493612,13 @@ null, {} ] + ], + "stroke-dashes-hit-at-high-scale.svg": [ + "b57a9e0aa7714e7a821c74d24f6578ab7d6286b3", + [ + null, + {} + ] ] } }, @@ -493604,6 +494025,13 @@ {} ] ], + "SVGGeometryElement.isPointInStroke-02.svg": [ + "909b035ef4779dd52f3e923a54efb63c526a3457", + [ + null, + {} + ] + ], "SVGGraphicsElement.getBBox-01.html": [ "a56dc4093203bcdcdc1f8b019a52f85f71eae23a", [ @@ -497224,14 +497652,21 @@ ] ], "request-video-frame-callback-repeating.html": [ - "0f9aa55717c73bf0617477fff1fa1b0e258408f7", + "bfdedb4bec00fe99f01ab6225e8b85a47617b3dd", + [ + null, + {} + ] + ], + "request-video-frame-callback-webrtc.https.html": [ + "b6131d6a808759346aa54b9e400e535b6c3ca29c", [ null, {} ] ], "request-video-frame-callback.html": [ - "743cbc60b5479a58f516ff27c0eb8b73b3cce986", + "6660fadeaf47460fb274e2801ff2b2528147e010", [ null, {} @@ -513813,7 +514248,7 @@ ] ], "shared-worker-parse-error-failure.html": [ - "0d8e390382f1127856ed3c26ec5b3cd0a1648280", + "8f63d5f37aaf6a50ee8b0a7d7dd8268db7749eba", [ null, {} diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini new file mode 100644 index 00000000000..f64b45fea6b --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-002.html] + [Hit test float] + expected: FAIL + diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini index 4bfb0c2053a..f29da48a2a0 100644 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini +++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini @@ -1,4 +1,4 @@ -[hit-test-floats-004.html] +[hit-test-floats-003.html] [Miss float below something else] expected: FAIL diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-011.html.ini b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-011.html.ini new file mode 100644 index 00000000000..fdf5abac767 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-011.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-011.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-012.html.ini b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-012.html.ini new file mode 100644 index 00000000000..098fde40fb1 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-012.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-012.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-013.html.ini b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-013.html.ini new file mode 100644 index 00000000000..b3b08d61395 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-013.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-013.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-014.html.ini b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-014.html.ini new file mode 100644 index 00000000000..61a082b5e0f --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-014.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-014.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-015.html.ini b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-015.html.ini new file mode 100644 index 00000000000..c1b8824ba0f --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-015.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-015.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-016.html.ini b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-016.html.ini new file mode 100644 index 00000000000..c329c7f08b9 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/white-space/break-spaces-newline-016.html.ini @@ -0,0 +1,2 @@ +[break-spaces-newline-016.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini new file mode 100644 index 00000000000..e38782d8c85 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/elementFromPoint-001.html.ini @@ -0,0 +1,4 @@ +[elementFromPoint-001.html] + [CSSOM View - 5 - extensions to the Document interface] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index 206418892fe..6dcb54ae103 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -312,15 +312,9 @@ [fetch(): separate response Content-Type: text/plain ] expected: NOTRUN - [<iframe>: combined response Content-Type: text/html;x=" text/plain] - expected: FAIL - [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] expected: FAIL - [<iframe>: combined response Content-Type: */* text/html] - expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] expected: FAIL @@ -330,3 +324,15 @@ [<iframe>: combined response Content-Type: text/html;" \\" text/plain] expected: FAIL + [<iframe>: combined response Content-Type: text/html;" text/plain] + expected: FAIL + + [<iframe>: combined response Content-Type: text/html */*] + expected: FAIL + + [<iframe>: separate response Content-Type: text/plain */*] + expected: FAIL + + [<iframe>: combined response Content-Type: text/html */*;charset=gbk] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/content-type/script.window.js.ini b/tests/wpt/metadata/fetch/content-type/script.window.js.ini index ac4cbcba706..2d5faa72ac7 100644 --- a/tests/wpt/metadata/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/script.window.js.ini @@ -56,6 +56,3 @@ [separate text/javascript;charset=windows-1252 error text/javascript] expected: FAIL - [separate text/javascript x/x] - expected: FAIL - diff --git a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini index 61682d248e2..30e1b851fd4 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,6 +11,3 @@ [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] expected: FAIL - [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini new file mode 100644 index 00000000000..87b07c3e670 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_1.html] + [Multiple history traversals from the same task] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini deleted file mode 100644 index 51f8272a6de..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_3.html] - [Multiple history traversals, last would be aborted] - expected: FAIL - diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini index 6852d7663de..c12c0f8ae48 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/skip-document-with-fragment.html.ini @@ -1,8 +1,4 @@ [skip-document-with-fragment.html] - expected: TIMEOUT [Autofocus elements in iframed documents with URL fragments should be skipped.] expected: FAIL - [Autofocus elements in top-level browsing context's documents with URI fragments should be skipped.] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/performance-timeline/po-observe-type.any.js.ini b/tests/wpt/metadata/performance-timeline/po-observe-type.any.js.ini new file mode 100644 index 00000000000..6cfbce70872 --- /dev/null +++ b/tests/wpt/metadata/performance-timeline/po-observe-type.any.js.ini @@ -0,0 +1,15 @@ +[po-observe-type.any.html] + [Calling observe() with type and entryTypes should throw a TypeError] + expected: FAIL + + [Calling observe() without 'type' or 'entryTypes' throws a TypeError] + expected: FAIL + + +[po-observe-type.any.worker.html] + [Calling observe() with type and entryTypes should throw a TypeError] + expected: FAIL + + [Calling observe() without 'type' or 'entryTypes' throws a TypeError] + expected: FAIL + diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini index df5d2d1dba0..636cb8a14da 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/audiobuffersource-multi-channels.html.ini @@ -152,3 +152,6 @@ [X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44051 more errors.\n\tMax AbsError of 1.9999794363975525e+0 at index of 19632.\n\t[19632\]\t9.9997943639755249e-1\t-1.0000000000000000e+0\t1.9999794363975525e+0\t1.9999794363975525e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 12348.\n\t[12348\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n] expected: FAIL + [X Rendered audio for channel 5 does not equal [0,0.0626220703125,0.125030517578125,0.18695068359375,0.24810791015625,0.308319091796875,0.3673095703125,0.42486572265625,0.480743408203125,0.53472900390625,0.58660888671875,0.636199951171875,0.68328857421875,0.727691650390625,0.76922607421875,0.8077392578125...\] with an element-wise tolerance of {"absoluteThreshold":0.000030517578125,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[1\]\t3.6732959747314453e-1\t6.2622070312500000e-2\t3.0470752716064453e-1\t4.8658168859649127e+0\t3.0517578125000000e-5\n\t[2\]\t6.8329977989196777e-1\t1.2503051757812500e-1\t5.5826926231384277e-1\t4.4650639949963384e+0\t3.0517578125000000e-5\n\t[3\]\t9.0373212099075317e-1\t1.8695068359375000e-1\t7.1678143739700317e-1\t3.8340669508039502e+0\t3.0517578125000000e-5\n\t[4\]\t9.9780619144439697e-1\t2.4810791015625000e-1\t7.4969828128814697e-1\t3.0216621502152523e+0\t3.0517578125000000e-5\n\t[5\]\t9.5236867666244507e-1\t3.0831909179687500e-1\t6.4404958486557007e-1\t2.0889059484187866e+0\t3.0517578125000000e-5\n\t...and 44047 more errors.\n\tMax AbsError of 1.9999794363975525e+0 at index of 37272.\n\t[37272\]\t9.9997943639755249e-1\t-1.0000000000000000e+0\t1.9999794363975525e+0\t1.9999794363975525e+0\t3.0517578125000000e-5\n\tMax RelError of Infinity at index of 12348.\n\t[12348\]\t9.5105654001235962e-1\t0.0000000000000000e+0\t9.5105654001235962e-1\tInfinity\t3.0517578125000000e-5\n] + expected: FAIL + diff --git a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini index 268949ced5c..f584fce5df1 100644 --- a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini +++ b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini @@ -1,4 +1,5 @@ [005.html] + expected: ERROR [dedicated worker in shared worker in dedicated worker] expected: FAIL diff --git a/tests/wpt/web-platform-tests/.taskcluster.yml b/tests/wpt/web-platform-tests/.taskcluster.yml index 815648df512..556b9914d5b 100644 --- a/tests/wpt/web-platform-tests/.taskcluster.yml +++ b/tests/wpt/web-platform-tests/.taskcluster.yml @@ -56,7 +56,7 @@ tasks: owner: ${owner} source: ${event.repository.clone_url} payload: - image: harjgam/web-platform-tests:0.33 + image: hexcles/web-platform-tests:0.35 maxRunTime: 7200 artifacts: public/results: diff --git a/tests/wpt/web-platform-tests/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html b/tests/wpt/web-platform-tests/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html new file mode 100644 index 00000000000..55a80bc8211 --- /dev/null +++ b/tests/wpt/web-platform-tests/2dcontext/path-objects/2d.path.isPointInStroke.scaleddashes.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<!-- DO NOT EDIT! This test has been generated by /2dcontext/tools/gentest.py. --> +<title>Canvas test: 2d.path.isPointInStroke.scaleddashes</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/2dcontext/resources/canvas-tests.js"></script> +<link rel="stylesheet" href="/2dcontext/resources/canvas-tests.css"> +<body class="show_output"> + +<h1>2d.path.isPointInStroke.scaleddashes</h1> +<p class="desc">isPointInStroke() should return correct results on dashed paths at high scale factors</p> + + +<p class="output">Actual output:</p> +<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> + +<ul id="d"></ul> +<script> +var t = async_test("isPointInStroke() should return correct results on dashed paths at high scale factors"); +_addTest(function(canvas, ctx) { + +var scale = 20; +ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle +ctx.scale(scale, scale); +ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false); +ctx.stroke(); + +// hit-test the beginning of the dash (t=0) +_assertSame(ctx.isPointInStroke(11*scale, 10*scale), true, "ctx.isPointInStroke(11*scale, 10*scale)", "true"); +// hit-test the middle of the dash (t=5) +_assertSame(ctx.isPointInStroke(8.70*scale, 14.21*scale), true, "ctx.isPointInStroke(8.70*scale, 14.21*scale)", "true"); +// hit-test the end of the dash (t=9.8) +_assertSame(ctx.isPointInStroke(4.10*scale, 14.63*scale), true, "ctx.isPointInStroke(4.10*scale, 14.63*scale)", "true"); +// hit-test past the end of the dash (t=10.2) +_assertSame(ctx.isPointInStroke(3.74*scale, 14.46*scale), false, "ctx.isPointInStroke(3.74*scale, 14.46*scale)", "false"); + + +}); +</script> + diff --git a/tests/wpt/web-platform-tests/2dcontext/tools/tests2d.yaml b/tests/wpt/web-platform-tests/2dcontext/tools/tests2d.yaml index 42a572995a6..d8ccbe13f6d 100644 --- a/tests/wpt/web-platform-tests/2dcontext/tools/tests2d.yaml +++ b/tests/wpt/web-platform-tests/2dcontext/tools/tests2d.yaml @@ -8646,6 +8646,27 @@ @assert ctx.isPointInPath(NaN, NaN) === false; +- name: 2d.path.isPointInStroke.scaleddashes + desc: isPointInStroke() should return correct results on dashed paths at high scale factors + testing: + - 2d.path.isPointInStroke + code: | + var scale = 20; + ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle + ctx.scale(scale, scale); + ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false); + ctx.stroke(); + + // hit-test the beginning of the dash (t=0) + @assert ctx.isPointInStroke(11*scale, 10*scale) === true; + // hit-test the middle of the dash (t=5) + @assert ctx.isPointInStroke(8.70*scale, 14.21*scale) === true; + // hit-test the end of the dash (t=9.8) + @assert ctx.isPointInStroke(4.10*scale, 14.63*scale) === true; + // hit-test past the end of the dash (t=10.2) + @assert ctx.isPointInStroke(3.74*scale, 14.46*scale) === false; + + - name: 2d.drawImage.3arg testing: - 2d.drawImage.defaultsource diff --git a/tests/wpt/web-platform-tests/cookie-store/change_eventhandler_for_no_name_equals_in_value.tentative.https.window.js b/tests/wpt/web-platform-tests/cookie-store/change_eventhandler_for_no_name_equals_in_value.tentative.https.window.js index fe6a34b3d69..13d721786c9 100644 --- a/tests/wpt/web-platform-tests/cookie-store/change_eventhandler_for_no_name_equals_in_value.tentative.https.window.js +++ b/tests/wpt/web-platform-tests/cookie-store/change_eventhandler_for_no_name_equals_in_value.tentative.https.window.js @@ -6,10 +6,11 @@ cookie_test(async t => { let eventPromise = observeNextCookieChangeEvent(); await cookieStore.set('', 'first-value'); - assert_equals( - (await cookieStore.getAll('')).map(({ value }) => value).join(';'), - 'first-value', - 'Cookie with no name and normal value should have been set'); + const initialCookies = await cookieStore.getAll(''); + assert_equals(initialCookies.length, 1); + assert_equals(initialCookies[0].name, ''); + assert_equals(initialCookies[0].value, 'first-value'); + await verifyCookieChangeEvent( eventPromise, {changed: [{name: '', value: 'first-value'}]}, 'Observed no-name change'); @@ -29,10 +30,11 @@ cookie_test(async t => { 'Expected promise rejection when setting a cookie with' + ' no name and "=" in value (via options)'); - assert_equals( - (await cookieStore.getAll('')).map(({ value }) => value).join(';'), - 'first-value', - 'Cookie with no name should still have previous value'); + const cookies = await cookieStore.getAll(''); + assert_equals(cookies.length, 1); + assert_equals(cookies[0].name, ''); + assert_equals(cookies[0].value, 'first-value', + 'Cookie with no name should still have previous value.'); eventPromise = observeNextCookieChangeEvent(); await cookieStore.delete(''); diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_delete.tenative.https.window.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_delete.tentative.https.window.js index e8c6fc036a7..e8c6fc036a7 100644 --- a/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_delete.tenative.https.window.js +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_event_delete.tentative.https.window.js diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_get_arguments.tentative.https.any.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_get_arguments.tentative.https.any.js index 34f7dbcd948..b0bef77fd89 100644 --- a/tests/wpt/web-platform-tests/cookie-store/cookieStore_get_arguments.tentative.https.any.js +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_get_arguments.tentative.https.any.js @@ -15,6 +15,21 @@ promise_test(async testCase => { }, 'cookieStore.get with no arguments'); promise_test(async testCase => { + await cookieStore.set('cookie-name-1', 'cookie-value-1'); + testCase.add_cleanup(async () => { + await cookieStore.delete('cookie-name-1'); + }); + await cookieStore.set('cookie-name-2', 'cookie-value-2'); + testCase.add_cleanup(async () => { + await cookieStore.delete('cookie-name-2'); + }); + + const cookie = await cookieStore.get(); + assert_equals(cookie.name, 'cookie-name-1'); + assert_equals(cookie.value, 'cookie-value-1'); +},'cookieStore.get with no args and multiple matches'); + +promise_test(async testCase => { await cookieStore.set('cookie-name', 'cookie-value'); testCase.add_cleanup(async () => { await cookieStore.delete('cookie-name'); @@ -44,6 +59,8 @@ promise_test(async testCase => { const cookie = await cookieStore.get('cookie-name', { name: 'wrong-cookie-name' }); + assert_equals(cookie.name, 'cookie-name'); + assert_equals(cookie.value, 'cookie-value'); }, 'cookieStore.get with name in both positional arguments and options'); promise_test(async testCase => { diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_set_arguments.tentative.https.any.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_set_arguments.tentative.https.any.js index b9074c827d2..6685f5fd3b7 100644 --- a/tests/wpt/web-platform-tests/cookie-store/cookieStore_set_arguments.tentative.https.any.js +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_set_arguments.tentative.https.any.js @@ -41,6 +41,22 @@ promise_test(async testCase => { }, 'cookieStore.set with name in both positional arguments and options'); promise_test(async testCase => { + await promise_rejects_js(testCase, TypeError, + cookieStore.set('', 'suspicious-value=resembles-name-and-value')); +}, "cookieStore.set with empty name and an '=' in value"); + +promise_test(async testCase => { + await cookieStore.delete('cookie-name'); + cookieStore.set('cookie-name', 'suspicious-value=resembles-name-and-value'); + testCase.add_cleanup(async () => { + await cookieStore.delete('cookie-name'); + }); + const cookie = await cookieStore.get('cookie-name'); + assert_equals(cookie.name, 'cookie-name'); + assert_equals(cookie.value, 'suspicious-value=resembles-name-and-value'); +}, "cookieStore.set with normal name and an '=' in value"); + +promise_test(async testCase => { await cookieStore.delete('cookie-name'); cookieStore.set('cookie-name', 'cookie-value', diff --git a/tests/wpt/web-platform-tests/css/compositing/root-element-opacity-change-ref.html b/tests/wpt/web-platform-tests/css/compositing/root-element-opacity-change-ref.html new file mode 100644 index 00000000000..be3d3713694 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/compositing/root-element-opacity-change-ref.html @@ -0,0 +1,4 @@ +<!doctype HTML> +<html style="font-size: 200px"> +TEST +</html> diff --git a/tests/wpt/web-platform-tests/css/compositing/root-element-opacity-change.html b/tests/wpt/web-platform-tests/css/compositing/root-element-opacity-change.html new file mode 100644 index 00000000000..de2599de491 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/compositing/root-element-opacity-change.html @@ -0,0 +1,14 @@ +<!doctype HTML> +<html class="test-wait" style="font-size: 200px; opacity: 0.5"> +<link rel="help" href="https://drafts.fxtf.org/compositing/#pagebackdrop"> +<link rel="match" href="root-element-opacity-change-ref.html"> +<meta name="assert" content="View background should be white after opacity changes from 0.5 to 1"> +<script src="/common/rendering-utils.js"></script> +TEST +<script> +waitForAtLeastOneFrame().then(() => { + document.documentElement.style.opacity=1; + document.documentElement.classList.remove('test-wait'); +}); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-003.html b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-003.html index fd07602b568..44b736b1d6b 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-003.html +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-003.html @@ -73,7 +73,7 @@ </div> <div class="grid" style="grid: calc(50px - 10%) / calc(100px + 20%);" - data-expected-width="100" data-expected-height="50"> + data-expected-width="0" data-expected-height="0"> </div> <div class="grid" style="grid: fit-content(50px) / fit-content(100px);" diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-004.html b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-004.html new file mode 100644 index 00000000000..c333c03298c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-004.html @@ -0,0 +1,210 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Containment Test: Size containment on grid containers with percentages</title> +<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size"> +<meta name="assert" content="Checks that grid containers with size containment and their grid items are sized correctly when the track sizing functions contain percentages."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +.grid { + display: grid; + contain: size; + font: 75px/1 Ahem; +} +.min-content { + height: min-content; + width: min-content; +} +.max-content { + height: max-content; + width: max-content; +} +.fixed { + height: 100px; + width: 100px; +} +.percent { + grid: 50% / 200%; +} +.calc { + grid: calc(100px + 50%) / calc(100px + 200%); +} +.minmax-percent-fixed { + grid: minmax(50%, 100px) / minmax(200%, 100px); +} +.minmax-fixed-percent { + grid: minmax(100px, 50%) / minmax(100px, 200%); +} +.minmax-percent-flex { + grid: minmax(50%, 1fr) / minmax(200%, 1fr); +} +.minmax-percent-intrinsic { + grid: minmax(50%, min-content) / minmax(200%, min-content); +} +.minmax-intrinsic-percent { + grid: minmax(min-content, 50%) / minmax(min-content, 200%); +} +.fit-content { + grid: fit-content(50%) / fit-content(200%); +} +</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 id="log"></div> + +<div class="grid percent min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid percent min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0">XXXX</div> +</div> +<div class="grid percent max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid percent max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0">XXXX</div> +</div> +<div class="grid percent fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="50" data-expected-width="200"></div> +</div> +<div class="grid percent fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="50" data-expected-width="200">XXXX</div> +</div> + +<div class="grid calc min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="100" data-expected-width="100"></div> +</div> +<div class="grid calc min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="100" data-expected-width="100">XXXX</div> +</div> +<div class="grid calc max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="100" data-expected-width="100"></div> +</div> +<div class="grid calc max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="100" data-expected-width="100">XXXX</div> +</div> +<div class="grid calc fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="150" data-expected-width="300"></div> +</div> +<div class="grid calc fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="150" data-expected-width="300">XXXX</div> +</div> + +<div class="grid minmax-percent-fixed min-content" data-expected-height="100" data-expected-width="0"> + <div data-expected-height="100" data-expected-width="0"></div> +</div> +<div class="grid minmax-percent-fixed min-content" data-expected-height="100" data-expected-width="0"> + <div data-expected-height="100" data-expected-width="0">XXXX</div> +</div> +<div class="grid minmax-percent-fixed max-content" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="200"></div> +</div> +<div class="grid minmax-percent-fixed max-content" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="200">XXXX</div> +</div> +<div class="grid minmax-percent-fixed fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="200"></div> +</div> +<div class="grid minmax-percent-fixed fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="200">XXXX</div> +</div> + +<div class="grid minmax-fixed-percent min-content" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="100"></div> +</div> +<div class="grid minmax-fixed-percent min-content" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="100">XXXX</div> +</div> +<div class="grid minmax-fixed-percent max-content" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="100"></div> +</div> +<div class="grid minmax-fixed-percent max-content" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="100">XXXX</div> +</div> +<div class="grid minmax-fixed-percent fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="100"></div> +</div> +<div class="grid minmax-fixed-percent fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="100">XXXX</div> +</div> + +<div class="grid minmax-percent-flex min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid minmax-percent-flex min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0">XXXX</div> +</div> +<div class="grid minmax-percent-flex max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid minmax-percent-flex max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0">XXXX</div> +</div> +<div class="grid minmax-percent-flex fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="200"></div> +</div> +<div class="grid minmax-percent-flex fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="100" data-expected-width="200">XXXX</div> +</div> + +<div class="grid minmax-intrinsic-percent min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid minmax-intrinsic-percent min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="75" data-expected-width="300">XXXX</div> +</div> +<div class="grid minmax-intrinsic-percent max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid minmax-intrinsic-percent max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="75" data-expected-width="300">XXXX</div> +</div> +<div class="grid minmax-intrinsic-percent fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="50" data-expected-width="100"></div> +</div> +<div class="grid minmax-intrinsic-percent fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="75" data-expected-width="300">XXXX</div> +</div> + +<div class="grid minmax-percent-intrinsic min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid minmax-percent-intrinsic min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0">XXXX</div> +</div> +<div class="grid minmax-percent-intrinsic max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid minmax-percent-intrinsic max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0">XXXX</div> +</div> +<div class="grid minmax-percent-intrinsic fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="50" data-expected-width="200"></div> +</div> +<div class="grid minmax-percent-intrinsic fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="75" data-expected-width="200">XXXX</div> +</div> + +<div class="grid fit-content min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid fit-content min-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="75" data-expected-width="300">XXXX</div> +</div> +<div class="grid fit-content max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid fit-content max-content" data-expected-height="0" data-expected-width="0"> + <div data-expected-height="75" data-expected-width="300">XXXX</div> +</div> +<div class="grid fit-content fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="0" data-expected-width="0"></div> +</div> +<div class="grid fit-content fixed" data-expected-height="100" data-expected-width="100"> + <div data-expected-height="75" data-expected-width="300">XXXX</div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/flex-shrink-large-value-crash.html b/tests/wpt/web-platform-tests/css/css-flexbox/flex-shrink-large-value-crash.html new file mode 100644 index 00000000000..a48bec65581 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/flex-shrink-large-value-crash.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<title>CSS Flexbox: large flex-shrink value</title> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#scaled-flex-shrink-factor"> +<link rel="help" href="https://crbug.com/543614"> +<meta name="assert" content="This test ensures that large flex-shrink value does crash due to the lost of precision."> +<style> +.flex { + display: inline-flex; + width: 40px; + height: 40px; +} + +.fractional { + height: 50px; + width: 50.5px; + min-width: 50.5px; +} + +.high-shrink { + flex-shrink: 130000000000000; + height: 40px; + width: 40px; + min-width: 40px; +} +</style> + +<div class="flex"> + <div class="fractional"></div> + <div class="high-shrink"></div> +</div> + +<p>The high flex shrink factor can lead to loss of precision as we calculate the +<a href="https://drafts.csswg.org/css-flexbox/#scaled-flex-shrink-factor">sum of +scaled flex shrink factors</a> as required by the spec, and as we later subtract +the scaled flex factors for frozen violations, we can get to a negative value +due to that lost precision.</p> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-editing-crash.html b/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-editing-crash.html new file mode 100644 index 00000000000..01917e3726c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-editing-crash.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<title>CSS Flexbox: inline-flex layout with editing operations</title> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers"> +<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=77772"> +<link rel="help" href="https://crbug.com/118662"> +<meta name="assert" content="This test ensures that inline-flex layout does not crash with editing operations."> +<style>#el0::first-letter, #el0:first-child { height: 100px; }</style> +<div id='container' contentEditable> + <a> + <img> + <div id="el0" style="display: inline-flex"> + <pre>AAAAA</pre> + </div> + </a> +</div> +<script> +window.getSelection().selectAllChildren(document.getElementById('container')); +document.execCommand('FormatBlock', false, '<h5>'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-editing-with-updating-text-crash.html b/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-editing-with-updating-text-crash.html new file mode 100644 index 00000000000..bdf7df85d7b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-editing-with-updating-text-crash.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>CSS Flexbox: inline-flex layout with updating text and editing operations</title> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers"> +<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=77772"> +<link rel="help" href="https://crbug.com/118662"> +<meta name="assert" content="This test ensures that inline-flex layout does not crash with updating text and editing operations."> +<style>#el0::first-letter, #el0:first-child { height: 10px; }</style> +<div id='container' contentEditable> + <a> + <img> + <div id="el0" style="display: inline-flex"> + <pre></pre> + </div> + </a> +</div> +<script> +document.querySelector('pre').textContent = 'AA\u0605'; +window.getSelection().selectAllChildren(document.getElementById('container')); +document.execCommand('FormatBlock', false, '<h1>'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-frameset-main-axis-crash.html b/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-frameset-main-axis-crash.html new file mode 100644 index 00000000000..434897cc7ac --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/inline-flex-frameset-main-axis-crash.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html style="display: inline-flex;"> +<title>CSS Flexbox: the main axis calculation with frameset</title> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#main-axis"> +<link rel="help" href="https://crbug.com/335121"> +<meta name="assert" content="This test ensures that frameset does not crash on computing the main axis."> +<frameset></frameset> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-001.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-001.html new file mode 100644 index 00000000000..ef8c0e4d340 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-001.html @@ -0,0 +1,218 @@ +<!DOCTYPE html> +<html> +<title>CSS Grid: Grid container baseline</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-baselines"> +<link rel="help" href="https://crbug.com/234191"> +<link rel="match" href="references/grid-baseline-001-ref.html"> +<meta name="assert" content="Check the first baselines of a grid container."/> + +<style> +body { + margin: 0; +} +.inline-grid { + display: inline-grid; + background-color: lightgrey; + margin-top: 5px; + grid-auto-flow: column; +} +.grid { + display: grid; + background-color: grey; + margin-top: 10px; + grid-auto-flow: column; +} +.empty { + border-style: solid; + border-width: 5px 0px 10px; + padding: 2px 0px 4px; + margin: 10px 0px 20px; +} +.column { + grid-auto-flow: row; +} +.firstRowFirstColumn { + grid-column: 1; + grid-row: 1; +} +.secondRowFirstColumn { + grid-column: 1; + grid-row: 2; +} +</style> + +<body style="position: relative"> + +<!-- If any of the grid items whose areas intersect the grid container's first +row/column participate in baseline alignment, the grid container's baseline is +the baseline of those grid items. --> +<div> +before text +<div class="inline-grid" style="grid-auto-rows: 50px;"> + <div style="align-self: end">below</div> + <div style="align-self: baseline; margin-top: 15px">baseline</div> + <div style="align-self: start">above</div> +</div> +after text +</div> + +<!-- This grid has a baseline item, it's orthogonal but it still participates +in baseline alignment. --> +<div> +before text +<div class="inline-grid" style="grid-auto-rows: 40px"> + <div style="align-self: end">below</div> + <div style="align-self: baseline; margin-top: 20px; writing-mode: vertical-rl"></div> + <div style="align-self: start">above</div> +</div> +after text +</div> + +<div> +before text +<div class="inline-grid"> + <h2>h2 baseline</h2> + <div>above</div> +</div> +after text +</div> + +<div> +before text +<div class="inline-grid"> + <div>baseline</div> + <h2>h2 below</h2> +</div> +after text +</div> + +<!-- If the first grid item has an orthogonal baseline, use the synthesized +baseline (bottom of the content box of the first item). --> +<div> +should align with the middle +<div class="inline-grid" style="width: 40px; height: 40px"> + <div style="writing-mode: vertical-rl; height: 20px; width: 40px; border-bottom: 1px solid black"></div> +</div> +of the grey box +</div> + +<!-- If there are no griditems, align to the bottom of the margin box. --> +<div> +should align below the bottom +<div class="empty inline-grid" style="width: 30px; height: 30px"> +</div> +of the black line +</div> + +<div> +should align with the bottom +<div class="inline-grid" style="width: 40px; height: 40px;"> + <div style="width: 20px; height: 20px; border: 5px solid black; background: red;"></div> +</div> +of the red box +</div> + +<!-- column-axis test cases. --> +<div> +before text +<div class="inline-grid column"> + <div>baseline</div> + <div>below</div> +</div> +after text +</div> + +<!-- If the first grid item has an orthogonal baseline, use the synthesized +baseline (bottom of the border box of the first item). --> +<div> +should align with the middle +<div class="inline-grid column" style="width: 40px; height: 40px;"> + <div style="writing-mode: vertical-rl; width: 40px; height: 20px; border-bottom: 1px solid black"></div> + <div style="writing-mode: vertical-rl; width: 40px; height: 19px"></div> +</div> +of the grey box +</div> + +<!-- More tests on the right side of the page. --> +<div style="position: absolute; top: 0; left: 400px; width: 360px"> + +<!-- Ignore absolutely positioned grid items. --> +<div> +before text +<div class="inline-grid"> + <div style="position: absolute">absolute</div> + <div style="margin-top: 30px">baseline</div> +</div> +after text +</div> + +<!-- We don't participate in baseline alignment if there's an auto margin. --> +<div> +before text +<div class="inline-grid" style="grid-auto-rows: 40px;"> + <div>baseline</div> + <div style="align-self: baseline; margin-top: auto">below</div> +</div> +after text +</div> + +<div> +before text +<div style="display: inline-block"> +<div class="inline-grid" style="height: 40px;"> + <div>above</div> + <div style="align-self: baseline; margin-top: 10px">baseline</div> + <div>above</div> +</div> +after +</div> +text +</div> + +<!-- The spec is a little unclear what should happen here. For now, +align to the last line box. --> +<div> + before text + <div style="display: inline-block"> + <div class="grid" style="height: 30px;"> + baseline + </div> + </div> + after text +</div> + +<table style="background-color: lightgrey; margin-top: 5px"> +<tr style="height: 50px"> + <td style="vertical-align: bottom">bottom</td> + <td style="vertical-align: baseline">baseline</td> + <td style="vertical-align: top">top</td> + <td style="vertical-align: baseline"><div class="grid"> + <h2>h2 baseline</h2> + <div>above</div> + </div></td> +</table> + +<!-- If a box contributing a baseline has a scrollbar, the box must be treated +as being in its initial scroll position when computing the baseline. --> +<div> +before text +<div id="grid-with-scrollbar" class="inline-grid" style="height: 65px; width: 150px"> + <div id="griditem-with-scrollbar" style="align-self: baseline; padding-top: 15px; height: 50px; overflow-y: scroll;"> + The baseline is based on<br> + the non-scrolled position;<br> + this won't line up. + </div> +</div> +after text +</div> + +</div> + +<script> +document.getElementById("griditem-with-scrollbar").scrollTop = 999; +document.getElementById("grid-with-scrollbar").style.width = "auto"; +</script> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-002.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-002.html new file mode 100644 index 00000000000..b52eeff27e5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-002.html @@ -0,0 +1,68 @@ +<!DOCTYPE html> +<title>CSS Grid: Grid container baseline</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-baselines"> +<link rel="help" href="https://crbug.com/234191"> +<link rel="match" href="references/grid-baseline-002-ref.html"> +<meta name="assert" content="Check that Baseline Alignment works for 1-dimensional Grid like in Flexible Box, even using margins, paddings and borders."/> + +<link href="/css/support/grid.css" rel="stylesheet"> +<style> +.inline-block { display: inline-block; } +.grid, .inline-grid { + background-color: lightgrey; + grid-auto-flow: column; +} +.border { border: 11px solid pink; } +.padding { padding: 13px; } +.margin { margin: 8px 0; } +</style> +<div> +before text +<div class="border" style="display: inline-block; background-color: lightgrey"> +<div class="grid" style="height: 30px; margin-top: 7px; padding-top: 10px;"> + baseline +</div> +</div> +after text +</div> + +<div> +Should align +<div class="inline-block border"> + <div class="grid padding" style="grid-template-columns: 50px; grid-template-rows: 50px; background-color: pink"> + <div style="background-color: lightgrey"></div> + </div> +</div> +with the +<div class="inline-block margin"> + <div class="grid border" style="grid-template-columns: 50px; grid-template-rows: 50px; background-color: pink"> + <div style="background-color: lightgrey"></div> + </div> +</div> +bottom of +<div class="inline-block padding" style="padding-left: 0; padding-right: 0"> + <div class="grid margin border" style="grid-template-columns: 50px; grid-template-rows: 50px; background-color: pink"> + <div style="background-color: lightgrey;"></div> + </div> +</div> +the grey box. +</div> + +<div> +Should align with the +<div class="inline-block"> + <div class="grid" style="background-color: white"> + <div class="border padding margin" style="background-color: lightgrey;"></div> + </div> +</div> +bottom of the pink box. +</div> + +<div> +Should align 8px +<div class="inline-grid margin border" style="grid-template-columns: 30px; grid-template-rows: 30px;"></div> +below the bottom +<div class="inline-grid margin border padding"></div> +of the pink box. +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-003.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-003.html new file mode 100644 index 00000000000..bd411abed91 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-003.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>CSS Grid: Grid container baseline</title> +<link rel="author" title="Manuel Rego" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-baselines"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#synthesize-baseline"> +<link rel="help" href="https://crbug.com/234191"> +<link rel="match" href="references/grid-baseline-003-ref.html"> +<meta name="assert" content="Check that grid container baseline should be synthesized from the border edges when it has no baseline."/> + +<link href="/css/support/grid.css" rel="stylesheet"> +<style> +.inline-block { display: inline-block; } +.grid, .inline-grid { + background-color: lightgrey; + grid-auto-flow: column; +} +.border { border: 11px solid pink; } +.padding { padding: 13px; } +.margin { margin: 8px 0; } +</style> + +<div> +Should align with the bottom +<div class="inline-block border margin padding" style="background-color: pink"> + <div class="grid border margin padding" style="grid-template-columns: 100px; grid-template-rows: 100px; background-color: pink"> + <div style="overflow: scroll; background-color: lightgrey; margin: 10px 0px; border-top: 10px solid pink;"></div> + </div> +</div> +of the horizontal scrollbar. +</div> + +<div> +Should align 10px below the +<div class="inline-block" style="background-color: pink"> + <div class="grid" style="grid-template-columns: 100px; grid-template-rows: 100px; background-color: pink"> + <div style="overflow: scroll; padding-bottom: 10px; background-color: lightgrey; margin: 10px 0px; border-top: 10px solid pink; border-bottom: 10px solid pink;"></div> + </div> +</div> +horizontal scrollbar, if one is visible. +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-004.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-004.html new file mode 100644 index 00000000000..baabc70a3f4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-baseline-004.html @@ -0,0 +1,204 @@ +<!DOCTYPE html> +<title>CSS Grid: Grid container baseline</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-baselines"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#grid-order"> +<link rel="help" href="https://crbug.com/234191"> +<meta name="assert" content="Check that grid container must use its first item in grid-modified document order (grid order) to compute its baseline."/> + +<link href="/css/support/grid.css" rel="stylesheet"> +<link href="/css/support/alignment.css" rel="stylesheet"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +body { margin: 0; } +.container { + position: relative; + font: 10px/1 Ahem; + border: 5px solid; + width: 470px; +} +.grid { + display: inline-grid; + grid-template-columns: 50px 50px; + width: 150px; + background-color: transparent; + position: relative; +} +.twoRows { grid-template-rows: 50px 50px; } +.threeRows { grid-template-rows: 50px 50px 50px; } +.empty { + border-color: black; + border-style: solid; + margin: 15px 0px 30px; + border-width: 5px 0px 10px; + padding: 10px 0px 20px; +} +.item { + height: 25px; + border-color: black; + border-style: solid; +} +.style1 { + border-width: 5px 0px 10px; + padding: 10px 0px 20px; +} +.style2 { + border-width: 10px 0px 5px; + padding: 20px 0px 10px; + margin-top: 10px; +} +.style3 { + border-width: 10px 0px 20px; + padding: 5px 0px 10px; + margin-top: 20px; +} + +.bothRowFirstColumn, .secondRowSecondColumn { + margin-right: 10px; + margin-top: 10px; + margin-bottom: 10px; + background-color: pink; +} +.firstRowBothColumn, .secondRowBothColumn { + margin-top: 15px; + margin-bottom: 15px; + background-color: green; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script type="text/javascript"> + setup({ explicit_done: true }); +</script> +<body onload="document.fonts.ready.then(() => { checkLayout('.grid, container'); })"> +<div id="log"></div> +<p> + The test shows 3 grids each of them with 3 items sorted differently in the DOM.<br> + Each grid container must use its first (grid order) item to compute its baseline, and using document-oder in case of element with same grid-order. Hence they might be baseline aligned each other accordingly. +</p> + +<p> + This case shows 3 items located along the first row and in different columns, so grid baseline is computed using the one located at first column (blue item). +</p> +<div class="container" data-expected-width="480" data-expected-height="120"> + <div class="grid" data-offset-x="0" data-offset-y="20"> + <div class="item style1 firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="item style2 firstRowSecondColumn" data-offset-x="50" data-offset-y="10"></div> + <div class="item style3 firstRowThirdColumn" data-offset-x="100" data-offset-y="20"></div> + </div> + <div class="grid" data-offset-x="160" data-offset-y="10"> + <div class="item style1 firstRowThirdColumn" data-offset-x="100" data-offset-y="0"></div> + <div class="item style2 firstRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + <div class="item style3 firstRowSecondColumn" data-offset-x="50" data-offset-y="20"></div> + </div> + <div class="grid" data-offset-x="320" data-offset-y="0"> + <div class="item style1 firstRowSecondColumn" data-offset-x="50" data-offset-y="0"></div> + <div class="item style2 firstRowThirdColumn" data-offset-x="100" data-offset-y="10"></div> + <div class="item style3 firstRowFirstColumn" data-offset-x="0" data-offset-y="20"></div> + </div> +</div> + +<p> + This case shows 3 items located along the first row and in different columns, so such item is used to determine the grid's baseline instead of using the grid order. +</p> +<div class="container" data-expected-width="480" data-expected-height="120"> + <div class="grid" data-offset-x="0" data-offset-y="0"> + <div class="item style1 firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="item style2 firstRowSecondColumn" data-offset-x="50" data-offset-y="10"></div> + <div class="item style3 firstRowThirdColumn alignSelfBaseline" data-offset-x="100" data-offset-y="20"></div> + </div> + <div class="grid" data-offset-x="160" data-offset-y="0"> + <div class="item style1 firstRowThirdColumn" data-offset-x="100" data-offset-y="0"></div> + <div class="item style2 firstRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + <div class="item style3 firstRowSecondColumn alignSelfBaseline" data-offset-x="50" data-offset-y="20"></div> + </div> + <div class="grid" data-offset-x="320" data-offset-y="20"> + <div class="item style1 firstRowSecondColumn alignSelfBaseline" data-offset-x="50" data-offset-y="0"></div> + <div class="item style2 firstRowThirdColumn" data-offset-x="100" data-offset-y="10"></div> + <div class="item style3 firstRowFirstColumn" data-offset-x="0" data-offset-y="20"></div> + </div> +</div> + +<p> + This case shows 3 items' areas intersecting the first row and first column, so the dom order must be used to determine each grid's baseline. +</p> +<div class="container" data-expected-width="480" data-expected-height="165"> + <div class="grid twoRows" data-offset-x="0" data-offset-y="40"> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + </div> + <div class="grid twoRows" data-offset-x="160" data-offset-y="0"> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + </div> + <div class="grid twoRows" data-offset-x="320" data-offset-y="55"> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + </div> +</div> + +<p> + This case shows 3 items' areas intersecting the first row and first column, but one of the items participates in baseline alignment, so such item is used to determine the grid's baseline instead of using the dom order. +</p> +<div class="container" data-expected-width="480" data-expected-height="165"> + <div class="grid twoRows" data-offset-x="0" data-offset-y="55"> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn alignSelfBaseline" style="width: 100px; height: 20px;" data-offset-x="0" data-offset-y="15"></div> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + </div> + <div class="grid twoRows" data-offset-x="160" data-offset-y="40"> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + <div class="firstRowFirstColumn alignSelfBaseline" style="width: 50px; height: 50px;" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + </div> + <div class="grid twoRows" data-offset-x="320" data-offset-y="0"> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="bothRowFirstColumn alignSelfBaseline" style="width: 40px; height: 80px;" data-offset-x="0" data-offset-y="10"></div> + </div> +</div> + +<p> + This case shows one of the grids with no items, hence its baseline must be synthesized. +</p> +<div class="container" data-expected-width="480" data-expected-height="250"> + <div class="grid twoRows" data-offset-x="0" data-offset-y="140"> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + </div> + <div class="grid twoRows" data-offset-x="160" data-offset-y="100"> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + </div> + <div class="grid empty twoRows" data-offset-x="320" data-offset-y="15"> + </div> +</div> + +<p> + This case shows one of the grids with no items in the first row, hence its baseline must be synthesized. +</p> +<div class="container" data-expected-width="480" data-expected-height="300"> + <div class="grid twoRows" data-offset-x="0" data-offset-y="190"> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + </div> + <div class="grid twoRows" data-offset-x="160" data-offset-y="150"> + <div class="bothRowFirstColumn" data-offset-x="0" data-offset-y="10"></div> + <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0"></div> + <div class="firstRowBothColumn" data-offset-x="0" data-offset-y="15"></div> + </div> + <div class="grid empty threeRows" data-offset-x="320" data-offset-y="15"> + <div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="60"></div> + <div class="thirdRowSecondColumn" data-offset-x="50" data-offset-y="110"></div> + <div class="secondRowBothColumn" data-offset-x="0" data-offset-y="75"></div> + </div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-001-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-001-ref.html new file mode 100644 index 00000000000..6a02ae4796a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-001-ref.html @@ -0,0 +1,205 @@ +<!DOCTYPE html> +<html> +<style> +body { + margin: 0; +} +.inline-flexbox { + display: inline-flex; + background-color: lightgrey; + margin-top: 5px; +} +.flexbox { + display: flex; + background-color: grey; + margin-top: 10px; +} +.empty { + border-style: solid; + border-width: 5px 0px 10px; + padding: 2px 0px 4px; + margin: 10px 0px 20px; +} +.column { + flex-flow: column; +} +.column-reverse { + flex-flow: column-reverse; +} +</style> + +<body style="position: relative"> + +<!-- If any of the flex items on the flex container's first line participate +in baseline alignment, the flex container's main-axis baseline is the baseline +of those flex items. --> +<div> +before text +<div class="inline-flexbox" style="height: 50px;"> + <div style="align-self: flex-end">below</div> + <div style="align-self: baseline; margin-top: 15px">baseline</div> + <div style="align-self: flex-start">above</div> +</div> +after text +</div> + +<!-- This grid has a baseline item, it's orthogonal but it still participates +in baseline alignment. --> +<div> +before text +<div class="inline-flexbox" style="height: 40px"> + <div style="align-self: flex-end">below</div> + <div style="align-self: baseline; margin-top: 20px"></div> + <div style="align-self: flex-start">above</div> +</div> +after text +</div> + +<div> +before text +<div class="inline-flexbox"> + <h2>h2 baseline</h2> + <div>above</div> +</div> +after text +</div> + +<div> +before text +<div class="inline-flexbox"> + <div>baseline</div> + <h2>h2 below</h2> +</div> +after text +</div> + +<!-- If the first flex item has an orthogonal baseline, use the synthesized +baseline (bottom of the content box of the first item). --> +<div> +should align with the middle +<div class="inline-flexbox" style="width: 40px; height: 40px"> + <div style="writing-mode: vertical-rl; height: 20px; width: 40px; border-bottom: 1px solid black"></div> +</div> +of the grey box +</div> + +<!-- If there are no flexitems, align to the bottom of the margin box. --> +<div> +should align below the bottom +<div class="empty inline-flexbox" style="width: 30px; height: 30px"> +</div> +of the black line +</div> + +<!-- If the griditem has not a natural baseline, align to the bottom of the box. --> +<div> +should align with the bottom +<div class="inline-flexbox" style="width: 40px; height: 40px;"> + <div style="width: 20px; height: 20px; border: 5px solid; background: red; "></div> +</div> +of the red box +</div> + +<!-- cross-axis (column) test cases. --> +<div> +before text +<div class="inline-flexbox column"> + <div>baseline</div> + <div>below</div> +</div> +after text +</div> + +<!-- If the first flex item has an orthogonal baseline, use the synthesized +baseline (bottom of the content box of the first item). --> +<div> +should align with the middle +<div class="inline-flexbox column" style="width: 40px; height: 40px;"> + <div style="writing-mode: vertical-rl; width: 40px; height: 20px; border-bottom: 1px solid black"></div> + <div style="writing-mode: vertical-rl; width: 40px; height: 19px"></div> +</div> +of the grey box +</div> + +<!-- More tests on the right side of the page. --> +<div style="position: absolute; top: 0; left: 400px; width: 360px"> + +<!-- Ignore absolutely positioned flex items. --> +<div> +before text +<div class="inline-flexbox"> + <div style="position: absolute">absolute</div> + <div style="margin-top: 30px">baseline</div> +</div> +after text +</div> + +<!-- We don't participate in baseline alignment if there's an auto margin. --> +<div> +before text +<div class="inline-flexbox" style="height: 40px;"> + <div>baseline</div> + <div style="align-self: baseline; margin-top: auto">below</div> +</div> +after text +</div> + +<div> +before text +<div style="display: inline-block"> +<div class="inline-flexbox" style="height: 40px;"> + <div>above</div> + <div style="align-self: baseline; margin-top: 10px">baseline</div> + <div>above</div> +</div> +after +</div> +text +</div> + +<!-- The spec is a little unclear what should happen here. For now, align to +the last line box. --> +<div> +before text +<div style="display: inline-block"> +<div class="flexbox" style="height: 30px;"> + baseline +</div> +</div> +after text +</div> + +<table style="background-color: lightgrey; margin-top: 5px"> +<tr style="height: 50px"> + <td style="vertical-align: bottom">bottom</td> + <td style="vertical-align: baseline">baseline</td> + <td style="vertical-align: top">top</td> + <td style="vertical-align: baseline"><div class="flexbox"> + <h2>h2 baseline</h2> + <div>above</div> + </div></td> +</table> + +<!-- If a box contributing a baseline has a scrollbar, the box must be treated +as being in its initial scroll position when computing the baseline. --> +<div> +before text +<div id="flexbox-with-scrollbar" class="inline-flexbox" style="height: 65px; width: 150px"> + <div id="flexitem-with-scrollbar" style="align-self: baseline; padding-top: 15px; height: 50px; overflow-y: scroll;"> + The baseline is based on<br> + the non-scrolled position;<br> + this won't line up. + </div> +</div> +after text +</div> + +</div> + +<script> +document.getElementById("flexitem-with-scrollbar").scrollTop = 999; +document.getElementById("flexbox-with-scrollbar").style.width = "auto"; +</script> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-002-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-002-ref.html new file mode 100644 index 00000000000..43634e58c38 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-002-ref.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<style> +.flexbox { + display: flex; +} +.inline-flexbox { + display: inline-flex; +} +.flex-one { + flex: 1; +} +.inline-block { display: inline-block; } +.flexbox, .inline-flexbox { background-color: lightgrey; } +.border { border: 11px solid pink; } +.padding { padding: 13px; } +.margin { margin: 8px 0; } +.flexbox > div { + min-width: 0; + min-height: 0; +} +</style> +<div> +before text +<div class="border" style="display: inline-block; background-color: lightgrey"> +<div class="flexbox" style="height: 30px; margin-top: 7px; padding-top: 10px;"> + baseline +</div> +</div> +after text +</div> + +<div> +Should align +<div class="inline-block border"> + <div class="flexbox padding" style="width: 50px; height: 50px; background-color: pink"> + <div class="flex-one" style="background-color: lightgrey"></div> + </div> +</div> +with the +<div class="inline-block margin"> + <div class="flexbox border" style="width: 50px; height: 50px; background-color: pink"> + <div class="flex-one" style="background-color: lightgrey"></div> + </div> +</div> +bottom of +<div class="inline-block padding" style="padding-left: 0; padding-right: 0"> + <div class="flexbox margin border" style="width: 50px; height: 50px; background-color: pink"> + <div class="flex-one" style="background-color: lightgrey;"></div> + </div> +</div> +the grey box. +</div> + +<div> +Should align with the +<div class="inline-block"> + <div class="flexbox" style="background-color: white"> + <div class="flex-one border padding margin" style="background-color: lightgrey;"></div> + </div> +</div> +bottom of the pink box. +</div> + +<div> +Should align 8px +<div class="inline-flexbox margin border" style="width: 30px; height: 30px;"></div> +below the bottom +<div class="inline-flexbox margin border padding"></div> +of the pink box. +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-003-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-003-ref.html new file mode 100644 index 00000000000..446c42f1a29 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/references/grid-baseline-003-ref.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<style> +.flexbox { + display: flex; +} +.inline-flexbox { + display: inline-flex; +} +.flex-one { + flex: 1; +} +.inline-block { display: inline-block; } +.flexbox, .inline-flexbox { background-color: lightgrey; } +.border { border: 11px solid pink; } +.padding { padding: 13px; } +.margin { margin: 8px 0; } +.flexbox > div { + min-width: 0; + min-height: 0; +} +</style> + +<div> +Should align with the bottom +<div class="inline-block border margin padding" style="background-color: pink"> + <div class="flexbox border margin padding" style="width: 100px; height: 100px; background-color: pink"> + <div style="width: 200px; overflow: scroll; background-color: lightgrey; margin: 10px 0px; border-top: 10px solid pink;"></div> + </div> +</div> +of the horizontal scrollbar. +</div> + +<div> +Should align 10px below the +<div class="inline-block" style="background-color: pink"> + <div class="flexbox" style="width: 100px; height: 100px; background-color: pink"> + <div style="width: 200px; overflow: scroll; background-color: lightgrey; padding-bottom: 10px; margin: 10px 0px; border-top: 10px solid pink; border-bottom: 10px solid pink;"></div> + </div> +</div> +horizontal scrollbar, if one is visible. +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/flex-item-grid-container-percentage-rows-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/flex-item-grid-container-percentage-rows-001.html new file mode 100644 index 00000000000..ba655ce8a17 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/flex-item-grid-container-percentage-rows-001.html @@ -0,0 +1,40 @@ +<!DOCTYPE html> +<title>CSS Grid Layout Test: Percentage rows resolution in a flex item grid container</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-item"> +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes"> +<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=617876"> +<link rel="match" href="../reference/flex-item-grid-container-percentage-rows-001-ref.html"> +<meta name="assert" content="This test ensures that percentage rows are properly resolved for a grid container that is a flex item with a definite height."> +<link rel="stylesheet" href="/css/support/grid.css"> +<style> +.flex { + display: flex; + flex-direction: column; + width: 200px; + height: 200px; + border: 5px solid; +} + +.flexitem { + flex: 1; + background: magenta; +} + +.grid { + display: grid; + grid: 50% / 1fr; +} + +.griditem { + background: cyan; +} +</style> + +<p>Test passes if you see a 200x200 box with top half cyan and bottom half magenta.</p> + +<div class="flex"> + <div class="flexitem grid"> + <div class="griditem"></div> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001.html new file mode 100644 index 00000000000..afce3f5fa91 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fill-rows-001.html @@ -0,0 +1,184 @@ +<!DOCTYPE html> +<title>CSS Grid: auto-fill rows</title> +<link rel="author" title="Sergio Villar" href="mailto: svillar@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fill"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-rows"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-row"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-grid-row-gap"> +<link rel="help" href="https://crbug.com/619930"> +<link rel="help" href="https://crbug.com/589460"> +<link rel="help" href="https://crbug.com/648814"> +<meta name="assert" content="Check that auto-fill rows are properly computed in a grid container"/> +<link href="/css/support/grid.css" rel="stylesheet"> +<style> + +.grid { + border: 2px solid magenta; + height: 200px; + width: 25px; + align-content: start; + grid-auto-rows: 157px; + grid-auto-columns: 25px; + + float: left; + position: relative; + margin-right: 2px; +} + +.gridOnlyAutoRepeat { grid-template-rows: repeat(auto-fill, 30px [autobar]); } +.gridAutoRepeatAndFixedBefore { grid-template-rows: 10px [foo] 20% [bar] repeat(auto-fill, [autofoo] 35px); } +.gridAutoRepeatAndFixedAfter { grid-template-rows: repeat(auto-fill, [first] 30px [last]) [foo] minmax(60px, 80px) [bar] minmax(45px, max-content); } +.gridAutoRepeatAndFixed { grid-template-rows: [start] repeat(2, 50px [a]) [middle] repeat(auto-fill, [autofoo] 15px [autobar]) minmax(5%, 10%) [end]; } +.gridMultipleNames { grid-template-rows: [start] 20px [foo] 50% repeat(auto-fill, [bar] 20px [start foo]) [foo] 10% [end bar]; } +.gridMultipleTracks { grid-template-rows: [start] 20px repeat(auto-fill, [a] 2em [b c] 10% [d]) [e] minmax(75px, 1fr) [last]; } + +.item { background-color: blue; } +.item:nth-child(2) { background: green; } +.item:nth-child(3) { background: orange; } + +.gap { grid-row-gap: 20px; } + +</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 id="log"></div> + +<p>This test checks that repeat(auto-fill, ) syntax works as expected.</p> + +<div class="grid gridOnlyAutoRepeat"> + <div class="item" style="grid-row: 1 / span 6" data-offset-y="0" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat"> + <div class="item" style="grid-row: 1 / span 6 autobar" data-offset-y="0" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap"> + <div class="item" style="grid-row: 1 / span 5" data-offset-y="0" data-offset-x="0" data-expected-height="357" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap"> + <div class="item" style="grid-row: autobar 2 / span 3" data-offset-y="100" data-offset-x="0" data-expected-height="257" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap" style="height: auto; max-height: 90px;" data-expected-height="94" data-expected-width="29"> + <div class="item" data-offset-y="0" data-offset-x="0" data-expected-height="30" data-expected-width="25"></div> + <div class="item" data-offset-y="50" data-offset-x="0" data-expected-height="30" data-expected-width="25"></div> + <div class="item" data-offset-y="100" data-offset-x="0" data-expected-height="157" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap" style="height: auto; max-height: 90px; min-height: 130px;" data-expected-height="134" data-expected-width="29"> + <div class="item" data-offset-y="0" data-offset-x="0" data-expected-height="30" data-expected-width="25"></div> + <div class="item" data-offset-y="50" data-offset-x="0" data-expected-height="30" data-expected-width="25"></div> + <div class="item" data-offset-y="100" data-offset-x="0" data-expected-height="30" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-row: 1 / span 6" data-offset-y="0" data-offset-x="0" data-expected-height="190" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-row: foo / autofoo" data-offset-y="10" data-offset-x="0" data-expected-height="40" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-row: bar / 5 autofoo" data-offset-y="50" data-offset-x="0" data-expected-height="297" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-row: span 3 / 2 autofoo" data-offset-y="0" data-offset-x="0" data-expected-height="125" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-row: notPresent / 3 autofoo" data-offset-y="377" data-offset-x="0" data-expected-height="157" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset-x="0" data-expected-height="185" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-row: first / last 2" data-offset-y="0" data-offset-x="0" data-expected-height="60" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-row: last 2 / foo" data-offset-y="60" data-offset-x="0" data-expected-height="80" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-row: 1 / span 3" data-offset-y="0" data-offset-x="0" data-expected-height="195" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-row: 3 / span 1 bar" data-offset-y="130" data-offset-x="0" data-expected-height="222" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-row: first / foo" data-offset-y="0" data-offset-x="0" data-expected-height="30" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-row: 1 / span 8" data-offset-y="0" data-offset-x="0" data-expected-height="195" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-row: a / autobar 2" data-offset-y="50" data-offset-x="0" data-expected-height="80" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-row: autofoo / end" data-offset-y="100" data-offset-x="0" data-expected-height="95" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed gap"> + <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset-x="0" data-expected-height="195" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed gap"> + <div class="item" style="grid-row: autobar / -1" data-offset-y="175" data-offset-x="0" data-expected-height="20" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-row: 1 / -1" data-offset-y="0" data-offset-x="0" data-expected-height="200" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-row: foo 3 / 4 bar" data-offset-y="160" data-offset-x="0" data-expected-height="40" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-row: -6 / span 2 start" data-offset-y="20" data-offset-x="0" data-expected-height="140" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-row: -4 / -2" data-offset-y="40" data-offset-x="0" data-expected-height="140" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-row: bar / foo 2" data-offset-y="160" data-offset-x="0" data-expected-height="20" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-row: foo / bar 2" data-offset-y="40" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleTracks"> + <div class="item" style="grid-row: a / 2 c" data-offset-y="20" data-offset-x="0" data-expected-height="84" data-expected-width="25"></div> + <div class="item" style="grid-row: 3 / e; grid-column: 2;" data-offset-y="52" data-offset-x="25" data-expected-height="72" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleTracks gap"> + <div class="item" style="grid-row: a / c" data-offset-y="40" data-offset-x="0" data-expected-height="32" data-expected-width="25"></div> + <div class="item" style="grid-row: 3 / last; grid-column: 2;" data-offset-y="92" data-offset-x="25" data-expected-height="115" data-expected-width="25"></div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001.html new file mode 100644 index 00000000000..b1dab7e32f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-columns-001.html @@ -0,0 +1,176 @@ +<!DOCTYPE html> +<title>CSS Grid: auto-fit columns</title> +<link rel="author" title="Sergio Villar" href="mailto: svillar@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-columns"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-column"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-grid-column-gap"> +<link rel="help" href="https://crbug.com/619930"> +<link rel="help" href="https://crbug.com/589460"> +<link rel="help" href="https://crbug.com/645746"> +<meta name="assert" content="Check that auto-fit columns are properly computed in a grid container"/> +<link href="/css/support/grid.css" rel="stylesheet"> +<style> + +.grid { + border: 2px solid magenta; + width: 200px; + position: relative; + justify-content: start; + grid-auto-columns: 157px; + grid-auto-rows: 25px; +} + +.gridOnlyAutoRepeat { grid-template-columns: repeat(auto-fit, 30px [autobar]); } +.gridAutoRepeatAndFixedBefore { grid-template-columns: 10px [foo] 20% [bar] repeat(auto-fit, [autofoo] 35px); } +.gridAutoRepeatAndFixedAfter { grid-template-columns: repeat(auto-fit, [first] 30px [last]) [foo] minmax(60px, 80px) [bar] minmax(45px, max-content); } +.gridAutoRepeatAndFixed { grid-template-columns: [start] repeat(2, 50px [a]) [middle] repeat(auto-fit, [autofoo] 15px [autobar]) minmax(5%, 10%) [end]; } +.gridMultipleNames { grid-template-columns: [start] 20px [foo] 50% repeat(auto-fit, [bar] 20px [start foo]) [foo] 10% [end bar]; } +.gridMultipleTracks { grid-template-columns: [start] 20px repeat(auto-fit, [a] 2em [b c] 10% [d]) [e] minmax(75px, 1fr) [last]; } +.gridMinMaxFixedFlex { grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); } + +.item { background-color: cyan; } +.item:nth-child(2n) { background-color: green; } + +.gap { grid-column-gap: 20px; } + +</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 id="log"></div> + +<p>This test checks that repeat(auto-fit, ) syntax works as expected.</p> + +<div class="grid gridOnlyAutoRepeat"> + <div class="item" style="grid-column: 1 / span 6" data-offset-x="0" data-offset-y="0" data-expected-width="180" data-expected-height="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat"> + <div class="item" style="grid-column: 1 / span 6 autobar" data-offset-x="0" data-offset-y="0" data-expected-width="180" data-expected-height="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap"> + <div class="item" style="grid-column: 1 / span 5" data-offset-x="0" data-offset-y="0" data-expected-width="357" data-expected-height="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap"> + <div class="item" style="grid-column: autobar 2 / span 3" data-offset-x="0" data-offset-y="0" data-expected-width="257" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-column: 1 / span 6" data-offset-x="0" data-offset-y="0" data-expected-width="190" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-column: foo / autofoo" data-offset-x="10" data-offset-y="0" data-expected-width="40" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-column: bar / 5 autofoo" data-offset-x="50" data-offset-y="0" data-expected-width="297" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-column: 1 / span 4" data-offset-x="0" data-offset-y="0" data-expected-width="180" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-column: span 3 / 2 autofoo" data-offset-x="0" data-offset-y="0" data-expected-width="125" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-column: notPresent / 3 autofoo" data-offset-x="267" data-offset-y="0" data-expected-width="157" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-column: 1 / span 4" data-offset-x="0" data-offset-y="0" data-expected-width="185" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-column: first / last 2" data-offset-x="0" data-offset-y="0" data-expected-width="60" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-column: last 2 / foo" data-offset-x="0" data-offset-y="0" data-expected-width="80" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-column: 1 / span 3" data-offset-x="0" data-offset-y="0" data-expected-width="195" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-column: 3 / span 1 bar" data-offset-x="80" data-offset-y="0" data-expected-width="222" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-column: first / foo" data-offset-x="0" data-offset-y="0" data-expected-width="30" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-column: 1 / span 8" data-offset-x="0" data-offset-y="0" data-expected-width="195" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-column: a / autobar 2" data-offset-x="50" data-offset-y="0" data-expected-width="80" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-column: autofoo / end" data-offset-x="100" data-offset-y="0" data-expected-width="95" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed gap"> + <div class="item" style="grid-column: 1 / span 4" data-offset-x="0" data-offset-y="0" data-expected-width="195" data-expected-height="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed gap"> + <div class="item" style="grid-column: autobar / -1" data-offset-x="140" data-offset-y="0" data-expected-width="20" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-column: 1 / -1" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-column: foo 3 / 4 bar" data-offset-x="120" data-offset-y="0" data-expected-width="40" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-column: -6 / span 2 start" data-offset-x="20" data-offset-y="0" data-expected-width="140" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-column: -4 / -2" data-offset-x="40" data-offset-y="0" data-expected-width="140" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-column: bar / foo 2" data-offset-x="160" data-offset-y="0" data-expected-width="20" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-column: foo / bar 2" data-offset-x="40" data-offset-y="0" data-expected-width="180" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleTracks"> + <div class="item" style="grid-column: e / last;" data-offset-x="52" data-offset-y="0" data-expected-width="148" data-expected-height="25"></div> + <div class="item" style="grid-column: start / b;" data-offset-x="0" data-offset-y="25" data-expected-width="52" data-expected-height="25"></div> +</div> + +<div class="grid gridMultipleTracks gap"> + <div class="item" style="grid-column: c / -1;" data-offset-x="40" data-offset-y="0" data-expected-width="160" data-expected-height="25"></div> +</div> + +<div class="grid gridMinMaxFixedFlex gap"> + <div class="item" style="grid-column-start: 1" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="25"></div> +</div> + +<div class="grid gridMinMaxFixedFlex gap"> + <div class="item" style="grid-column-start: 1" data-offset-x="0" data-offset-y="0" data-expected-width="90" data-expected-height="25"></div> + <div class="item" style="grid-column-start: 2" data-offset-x="110" data-offset-y="0" data-expected-width="90" data-expected-height="25"></div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001.html new file mode 100644 index 00000000000..7619d9e023e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-rows-001.html @@ -0,0 +1,169 @@ +<!DOCTYPE html> +<title>CSS Grid: auto-fit rows</title> +<link rel="author" title="Sergio Villar" href="mailto: svillar@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-repeat-auto-fit"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-columns"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-rows"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-template-rows"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-row"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-grid-row-gap"> +<link rel="help" href="https://crbug.com/619930"> +<link rel="help" href="https://crbug.com/589460"> +<meta name="assert" content="Check that auto-fit rows are properly computed in a grid container"/> +<link href="/css/support/grid.css" rel="stylesheet"> +<style> + +.grid { + border: 2px solid magenta; + height: 200px; + width: 25px; + align-content: start; + grid-auto-rows: 157px; + grid-auto-columns: 25px; + + float: left; + position: relative; + margin-right: 2px; +} + +.gridOnlyAutoRepeat { grid-template-rows: repeat(auto-fit, 30px [autobar]); } +.gridAutoRepeatAndFixedBefore { grid-template-rows: 10px [foo] 20% [bar] repeat(auto-fit, [autofoo] 35px); } +.gridAutoRepeatAndFixedAfter { grid-template-rows: repeat(auto-fit, [first] 30px [last]) [foo] minmax(60px, 80px) [bar] minmax(45px, max-content); } +.gridAutoRepeatAndFixed { grid-template-rows: [start] repeat(2, 50px [a]) [middle] repeat(auto-fit, [autofoo] 15px [autobar]) minmax(5%, 10%) [end]; } +.gridMultipleNames { grid-template-rows: [start] 20px [foo] 50% repeat(auto-fit, [bar] 20px [start foo]) [foo] 10% [end bar]; } +.gridMultipleTracks { grid-template-rows: [start] 20px repeat(auto-fit, [a] 2em [b c] 10% [d]) [e] minmax(75px, 1fr) [last]; } + +.item { background-color: cyan; } +.item:nth-child(2n) { background-color: green; } + +.gap { grid-row-gap: 20px; } + +</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 id="log"></div> + +<p>This test checks that repeat(auto-fit, ) syntax works as expected.</p> + +<div class="grid gridOnlyAutoRepeat"> + <div class="item" style="grid-row: 1 / span 6" data-offset-y="0" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat"> + <div class="item" style="grid-row: 1 / span 6 autobar" data-offset-y="0" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap"> + <div class="item" style="grid-row: 1 / span 5" data-offset-y="0" data-offset-x="0" data-expected-height="357" data-expected-width="25"></div> +</div> + +<div class="grid gridOnlyAutoRepeat gap"> + <div class="item" style="grid-row: autobar 2 / span 3" data-offset-y="0" data-offset-x="0" data-expected-height="257" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-row: 1 / span 6" data-offset-y="0" data-offset-x="0" data-expected-height="190" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-row: foo / autofoo" data-offset-y="10" data-offset-x="0" data-expected-height="40" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore"> + <div class="item" style="grid-row: bar / 5 autofoo" data-offset-y="50" data-offset-x="0" data-expected-height="297" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-row: span 3 / 2 autofoo" data-offset-y="0" data-offset-x="0" data-expected-height="125" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedBefore gap"> + <div class="item" style="grid-row: notPresent / 3 autofoo" data-offset-y="267" data-offset-x="0" data-expected-height="157" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset-x="0" data-expected-height="185" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-row: first / last 2" data-offset-y="0" data-offset-x="0" data-expected-height="60" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter"> + <div class="item" style="grid-row: last 2 / foo" data-offset-y="0" data-offset-x="0" data-expected-height="80" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-row: 1 / span 3" data-offset-y="0" data-offset-x="0" data-expected-height="195" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-row: 3 / span 1 bar" data-offset-y="80" data-offset-x="0" data-expected-height="222" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixedAfter gap"> + <div class="item" style="grid-row: first / foo" data-offset-y="0" data-offset-x="0" data-expected-height="30" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-row: 1 / span 8" data-offset-y="0" data-offset-x="0" data-expected-height="195" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-row: a / autobar 2" data-offset-y="50" data-offset-x="0" data-expected-height="80" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed"> + <div class="item" style="grid-row: autofoo / end" data-offset-y="100" data-offset-x="0" data-expected-height="95" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed gap"> + <div class="item" style="grid-row: 1 / span 4" data-offset-y="0" data-offset-x="0" data-expected-height="195" data-expected-width="25"></div> +</div> + +<div class="grid gridAutoRepeatAndFixed gap"> + <div class="item" style="grid-row: autobar / -1" data-offset-y="140" data-offset-x="0" data-expected-height="20" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-row: 1 / -1" data-offset-y="0" data-offset-x="0" data-expected-height="200" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-row: foo 3 / 4 bar" data-offset-y="120" data-offset-x="0" data-expected-height="40" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames"> + <div class="item" style="grid-row: -6 / span 2 start" data-offset-y="20" data-offset-x="0" data-expected-height="140" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-row: -4 / -2" data-offset-y="40" data-offset-x="0" data-expected-height="140" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-row: bar / foo 2" data-offset-y="160" data-offset-x="0" data-expected-height="20" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleNames gap"> + <div class="item" style="grid-row: foo / bar 2" data-offset-y="40" data-offset-x="0" data-expected-height="180" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleTracks"> + <div class="item" style="grid-row: e / last;" data-offset-y="52" data-offset-x="0" data-expected-height="148" data-expected-width="25"></div> + <div class="item" style="grid-row: start / b;" data-offset-y="0" data-offset-x="0" data-expected-height="52" data-expected-width="25"></div> +</div> + +<div class="grid gridMultipleTracks gap"> + <div class="item" style="grid-row: c / -1;" data-offset-y="40" data-offset-x="0" data-expected-height="160" data-expected-width="25"></div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-intrinsic-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-intrinsic-001.html new file mode 100644 index 00000000000..a5f6f16407a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-intrinsic-001.html @@ -0,0 +1,109 @@ +<!DOCTYPE html> +<title>CSS Grid: auto repeat computation for intrinsic sizes.</title> +<link rel="author" title="Sergio Villar" href="mailto:svillar@igalia.com"/> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#repeat-notation"/> +<meta name="assert" content="Checks that auto repeat tracks are properly recomputed and items are properly repositioned when grids have intrinsic inline sizes."/> +<link rel="issue" href="https://crbug.com/621517"/> +<link href="/css/support/grid.css" rel="stylesheet"/> +<link href="/css/support/width-keyword-classes.css" rel="stylesheet"/> + +<style> +.grid { + border: 2px solid black; + position: relative; + padding-top: 10px; + justify-items: start; +} + +.item { + background: cyan; + height: 20px; +} + +.gridAutoFillFixed { grid-template-columns: repeat(auto-fill, 20px) minmax(min-content, 40px); } +.gridAutoFillAuto { grid-template-columns: repeat(auto-fill, 10px) minmax(60px, auto); } +.gridAutoFitFixed { grid-template-columns: repeat(auto-fit, 20px) minmax(min-content, 40px); } +.gridAutoFitAuto { grid-template-columns: repeat(auto-fit, 10px) minmax(60px, auto); } + +.paddingTop { padding-top: 10px; } + +.abs { + height: 5px; + position: absolute; + width: 100%; +} +</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="grid gridAutoFillFixed paddingTop max-content" data-expected-width="104" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="20" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="20" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="20" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="40" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +<div class="grid gridAutoFillFixed paddingTop min-content" data-expected-width="104" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="20" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="20" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="20" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="40" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +<div class="grid gridAutoFillAuto paddingTop max-content" data-expected-width="104" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="10" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="10" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="10" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="10" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +<div class="grid gridAutoFillAuto paddingTop min-content" data-expected-width="74" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="10" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="60" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="0" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="70" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +<!-- auto-fill --> + +<div class="grid gridAutoFitFixed paddingTop max-content" data-expected-width="104" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="20" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="20" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="20" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="40" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +<div class="grid gridAutoFitFixed paddingTop min-content" data-expected-width="104" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="20" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="20" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="20" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="40" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +<div class="grid gridAutoFitAuto paddingTop max-content" data-expected-width="104" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="10" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="10" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="10" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="10" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +<div class="grid gridAutoFitAuto paddingTop min-content" data-expected-width="74" data-expected-height="34"> + <div class="item" style="grid-column: 1 / -1; width: 100px;" data-expected-width="100" data-expected-height="20" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 1 / 2; background: purple;" data-expected-width="10" data-expected-height="5" data-expected-x="0" data-expected-y="0"></div> + <div class="abs" style="grid-column: 2 / 3; background: orange;" data-expected-width="60" data-expected-height="5" data-expected-x="20" data-expected-y="0"></div> + <div class="abs" style="grid-column: 3 / 4; background: yellow;" data-expected-width="0" data-expected-height="5" data-expected-x="40" data-expected-y="0"></div> + <div class="abs" style="grid-column: 4 / 5; background: green;" data-expected-width="70" data-expected-height="5" data-expected-x="60" data-expected-y="0"></div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-change-intrinsic-size-with-auto-repeat-tracks-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-change-intrinsic-size-with-auto-repeat-tracks-001.html new file mode 100644 index 00000000000..437ad818799 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-change-intrinsic-size-with-auto-repeat-tracks-001.html @@ -0,0 +1,151 @@ +<!DOCTYPE html> +<title>CSS Grid: auto-repeat tracks and intrinsic sizes.</title> +<link rel="author" title="Sergio Villar" href="mailto:svillar@igalia.com"/> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#repeat-notation"/> +<meta name="assert" content="Test ensure that grids properly recompute the number of auto repeat tracks when the min|max-content contributions of grid items changed."/> +<link rel="issue" href="https://crbug.com/621517"/> +<link rel="issue" href="https://crbug.com/633474"/> +<link href="/css/support/grid.css" rel="stylesheet"/> +<link href="/css/support/width-keyword-classes.css" rel="stylesheet"/> +<style> +.grid { + border: 2px solid black; + position: relative; + min-width: 30px; + + grid-auto-columns: 20px; + + padding-top: 10px; + margin-bottom: 10px; +} + +.abs { height: 5px; position: absolute; width: 100%; } + +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script> +function setGridTemplate(id, gridTemplateRows, gridTemplateColumns) +{ + var gridElement = document.getElementById(id); + gridElement.style.gridTemplateRows = gridTemplateRows; + gridElement.style.gridTemplateColumns = gridTemplateColumns; +} + +function setItemSize(id, width, height) +{ + var gridElement = document.getElementById(id); + gridElement.style.width = width; + gridElement.style.height = height; +} + +function testGridDefinitions(gridItemsData) +{ + var length = gridItemsData.length; + for (i = 0; i < length; ++i) { + var item = document.getElementById(gridItemsData[i].id); + item.setAttribute("data-expected-width", gridItemsData[i].width); + item.setAttribute("data-expected-height", gridItemsData[i].height); + item.setAttribute("data-offset-x", gridItemsData[i].x); + item.setAttribute("data-offset-y", gridItemsData[i].y); + } + + checkLayout(".grid", false); +} + +function testChangingGridDefinitions() +{ + setGridTemplate('grid1', 'none', 'repeat(auto-fill, 20px) minmax(min-content, 40px)'); + + setItemSize('item', '100px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '100', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '20', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '20', 'height': '5', 'x': '40', 'y': '0' }, + { 'id': 'a4', 'width': '40', 'height': '5', 'x': '60', 'y': '0' } + ]); + + setItemSize('item', '80px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '80', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '20', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '40', 'height': '5', 'x': '40', 'y': '0' }, + { 'id': 'a4', 'width': '0', 'height': '5', 'x': '80', 'y': '0' } + ]); + + setItemSize('item', '15px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '15', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '40', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '0', 'height': '5', 'x': '60', 'y': '0' }, + { 'id': 'a4', 'width': '60', 'height': '5', 'x': '0', 'y': '0' } + ]); + + setItemSize('item', '120px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '120', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '20', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '20', 'height': '5', 'x': '40', 'y': '0' }, + { 'id': 'a4', 'width': '20', 'height': '5', 'x': '60', 'y': '0' } + ]); + + var grid = document.getElementById('grid1'); + grid.className = grid.className.replace('max-content', 'min-content'); + + setItemSize('item', '100px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '100', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '20', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '20', 'height': '5', 'x': '40', 'y': '0' }, + { 'id': 'a4', 'width': '40', 'height': '5', 'x': '60', 'y': '0' } + ]); + + setItemSize('item', '80px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '80', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '20', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '40', 'height': '5', 'x': '40', 'y': '0' }, + { 'id': 'a4', 'width': '0', 'height': '5', 'x': '80', 'y': '0' } + ]); + + setItemSize('item', '15px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '15', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '10', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '0', 'height': '5', 'x': '30', 'y': '0' }, + { 'id': 'a4', 'width': '30', 'height': '5', 'x': '0', 'y': '0' } + ]); + + setItemSize('item', '120px', '30px'); + testGridDefinitions([ + { 'id': 'item', 'width': '120', 'height': '30', 'x': '0', 'y': '10' }, + { 'id': 'a1', 'width': '20', 'height': '5', 'x': '0', 'y': '0' }, + { 'id': 'a2', 'width': '20', 'height': '5', 'x': '20', 'y': '0' }, + { 'id': 'a3', 'width': '20', 'height': '5', 'x': '40', 'y': '0' }, + { 'id': 'a4', 'width': '20', 'height': '5', 'x': '60', 'y': '0' } + ]); + + done(); +} + +window.addEventListener("load", testChangingGridDefinitions, false); +</script> + +<div>This test checks that changing the min|max-content contributions of grid items properly recomputes both track sizes and grid positions in grids with auto repeat tracks.</div> +<div id="log"></div> + +<div id="grid1" class="grid max-content"> + <div id="item" style="grid-column: 1 / -1; background: cyan;"></div> + <div id="a1" class="abs" style="grid-column: 1 / 2; background: purple;"></div> + <div id="a2" class="abs" style="grid-column: 2 / 3; background: orange;"></div> + <div id="a3" class="abs" style="grid-column: 3 / 4; background: yellow;"></div> + <div id="a4" class="abs" style="grid-column: 4 / 5; background: magenta;"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-content-alignment-and-self-alignment-001.html b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-content-alignment-and-self-alignment-001.html new file mode 100644 index 00000000000..cd79210f10d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/grid-definition/grid-content-alignment-and-self-alignment-001.html @@ -0,0 +1,378 @@ +<!DOCTYPE html> +<title>CSS Grid Layout Test: content distribution alignment and self alignment.</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#align-justify-content"> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#align-self-property"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-tracks"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=249451"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=376823"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<link rel="stylesheet" href="/css/support/alignment.css"> +<link rel="stylesheet" href="/css/support/grid.css"> +<meta name="assert" content="Test that content distribution alignment works fine in combination with self alignment and items in just one cell." /> + +<style> +.grid { + grid-template-columns: 200px 100px; + grid-template-rows: 100px 50px; + width: 500px; + height: 350px; + position: relative; + font: 10px/1 Ahem; +} + +.gridGaps { + grid-gap: 10px 20px; +} +</style> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script type="text/javascript"> + setup({ explicit_done: true }); +</script> + +<body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })"> + +<div id="log"></div> + +<p>direction: LTR | distribution: 'space-between' | self-alignment: center</p> +<div class="grid contentSpaceBetween itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="95" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="445" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="95" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="445" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | distribution: 'space-between' | self-alignment: end</p> +<div class="grid contentSpaceBetween itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="190" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="490" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="190" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="490" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | distribution: 'space-around' | self-alignment: center</p> +<div class="grid contentSpaceAround itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="145" data-offset-y="95" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="395" data-offset-y="95" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="145" data-offset-y="270" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="395" data-offset-y="270" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | distribution: 'space-around' | self-alignment: end</p> +<div class="grid contentSpaceAround itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="240" data-offset-y="140" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="440" data-offset-y="140" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="240" data-offset-y="290" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="440" data-offset-y="290" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | distribution: 'space-evenly' | self-alignment: center</p> +<div class="grid contentSpaceEvenly itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="162" data-offset-y="112" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="378" data-offset-y="112" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="162" data-offset-y="253" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="378" data-offset-y="253" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | distribution: 'space-evenly' | self-alignment: end</p> +<div class="grid contentSpaceEvenly itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="257" data-offset-y="157" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="423" data-offset-y="157" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="257" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="423" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | grid-gap: 10px 20px | distribution: 'space-between' | self-alignment: center</p> +<div class="grid gridGaps contentSpaceBetween itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="95" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="445" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="95" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="445" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | grid-gap: 10px 20px | distribution: 'space-between' | self-alignment: end</p> +<div class="grid gridGaps contentSpaceBetween itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="190" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="490" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="190" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="490" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | grid-gap: 10px 20px | distribution: 'space-around' | self-alignment: center</p> +<div class="grid gridGaps contentSpaceAround itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="140" data-offset-y="93" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="400" data-offset-y="93" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="140" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="400" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | grid-gap: 10px 20px | distribution: 'space-around' | self-alignment: end</p> +<div class="grid gridGaps contentSpaceAround itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="235" data-offset-y="138" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="445" data-offset-y="138" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="235" data-offset-y="293" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="445" data-offset-y="293" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | grid-gap: 10px 20px | distribution: 'space-evenly' | self-alignment: center</p> +<div class="grid gridGaps contentSpaceEvenly itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="155" data-offset-y="108" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="385" data-offset-y="108" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="155" data-offset-y="257" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="385" data-offset-y="257" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: LTR | grid-gap: 10px 20px | distribution: 'space-evenly' | self-alignment: end</p> +<div class="grid gridGaps contentSpaceEvenly itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="250" data-offset-y="153" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="430" data-offset-y="153" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="250" data-offset-y="277" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="430" data-offset-y="277" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<!-- RTL direction. --> + +<p>direction: RTL | distribution: 'space-between' | self-alignment: center</p> +<div class="grid directionRTL contentSpaceBetween itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="395" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="45" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="395" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="45" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | distribution: 'space-between' | self-alignment: end</p> +<div class="grid directionRTL contentSpaceBetween itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="300" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="300" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="0" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | distribution: 'space-around' | self-alignment: center</p> +<div class="grid directionRTL contentSpaceAround itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="345" data-offset-y="95" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="95" data-offset-y="95" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="345" data-offset-y="270" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="95" data-offset-y="270" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | distribution: 'space-around' | self-alignment: end</p> +<div class="grid directionRTL contentSpaceAround itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="250" data-offset-y="140" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="50" data-offset-y="140" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="250" data-offset-y="290" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="50" data-offset-y="290" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | distribution: 'space-evenly' | self-alignment: center</p> +<div class="grid directionRTL contentSpaceEvenly itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="328" data-offset-y="112" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="112" data-offset-y="112" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="328" data-offset-y="253" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="112" data-offset-y="253" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | distribution: 'space-evenly' | self-alignment: end</p> +<div class="grid directionRTL contentSpaceEvenly itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="233" data-offset-y="157" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="67" data-offset-y="157" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="233" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="67" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | grid-gap: 10px 20px | distribution: 'space-between' | self-alignment: center</p> +<div class="grid directionRTL gridGaps contentSpaceBetween itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="395" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="45" data-offset-y="45" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="395" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="45" data-offset-y="320" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | grid-gap: 10px 20px | distribution: 'space-between' | self-alignment: end</p> +<div class="grid directionRTL gridGaps contentSpaceBetween itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="300" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="0" data-offset-y="90" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="300" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="0" data-offset-y="340" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | grid-gap: 10px 20px | distribution: 'space-around' | self-alignment: center</p> +<div class="grid directionRTL gridGaps contentSpaceAround itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="350" data-offset-y="93" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="90" data-offset-y="93" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="350" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="90" data-offset-y="273" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | grid-gap: 10px 20px | distribution: 'space-around' | self-alignment: end</p> +<div class="grid directionRTL gridGaps contentSpaceAround itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="255" data-offset-y="138" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="45" data-offset-y="138" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="255" data-offset-y="293" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="45" data-offset-y="293" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | grid-gap: 10px 20px | distribution: 'space-evenly' | self-alignment: center</p> +<div class="grid directionRTL gridGaps contentSpaceEvenly itemsCenter"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="335" data-offset-y="108" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="105" data-offset-y="108" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="335" data-offset-y="257" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="105" data-offset-y="257" data-expected-width="10" data-expected-height="10">X</div> +</div> + +<p>direction: RTL | grid-gap: 10px 20px | distribution: 'space-evenly' | self-alignment: end</p> +<div class="grid directionRTL gridGaps contentSpaceEvenly itemsEnd"> + <!-- Dummy DIVs to help checking the result visually. --> + <div class="firstRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="firstRowSecondColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowFirstColumn justifySelfStretch alignSelfStretch"></div> + <div class="secondRowSecondColumn justifySelfStretch alignSelfStretch"></div> + + <div class="firstRowFirstColumn" data-offset-x="240" data-offset-y="153" data-expected-width="10" data-expected-height="10">X</div> + <div class="firstRowSecondColumn" data-offset-x="60" data-offset-y="153" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowFirstColumn" data-offset-x="240" data-offset-y="277" data-expected-width="10" data-expected-height="10">X</div> + <div class="secondRowSecondColumn" data-offset-x="60" data-offset-y="277" data-expected-width="10" data-expected-height="10">X</div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-columns-min-max-width-001.html b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-columns-min-max-width-001.html new file mode 100644 index 00000000000..6b269e5258f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-columns-min-max-width-001.html @@ -0,0 +1,94 @@ +<!DOCTYPE HTML> +<title>CSS Grid Layout Test: min and max size when computing the flex fraction</title> +<link rel="author" title="Sergio Villar" href="mailto:svillar@igalia.com"/> +<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-flex-tracks"/> +<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=660690"/> +<link href="/css/support/grid.css" rel="stylesheet"/> +<link href="/css/support/width-keyword-classes.css" rel="stylesheet"> +<meta name="assert" content="This test ensures that minimum and maximum sizes are used to compute the flex fraction for indefinite free spaces."/> +<style> +.grid { + margin: 3px; + grid: 50px / minmax(10px, 1fr) minmax(10px, 4fr); + grid-column-gap: 33px; + border: 5px dashed; + padding: 2px; +} + +.float { float: left; } + +.item:nth-child(1) { background-color: purple; } +.item:nth-child(2) { background-color: blue; } +</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')"> + +<p>This test PASS if all the grids in the same row look the same.</p> + +<div class="grid float" style="max-width: 70px" data-expected-height="64" data-expected-width="84"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="27"></div> +</div> +<div class="grid float" style="min-width: 70px; max-width: 60px" data-expected-height="64" data-expected-width="84"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="27"></div> +</div> +<div class="grid float" style="width: 70px" data-expected-height="64" data-expected-width="84"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="27"></div> +</div> + +<br clear="all"> + +<div class="grid float" style="min-width: 108px" data-expected-height="64" data-expected-width="122"> + <div class="item" data-expected-height="50" data-expected-width="15"></div> + <div class="item" data-expected-height="50" data-expected-width="60"></div> +</div> +<div class="grid float" style="min-width: 108px; max-width: 60px" data-expected-height="64" data-expected-width="122"> + <div class="item" data-expected-height="50" data-expected-width="15"></div> + <div class="item" data-expected-height="50" data-expected-width="60"></div> +</div> +<div class="grid float" style="width: 108px" data-expected-height="64" data-expected-width="122"> + <div class="item" data-expected-height="50" data-expected-width="15"></div> + <div class="item" data-expected-height="50" data-expected-width="60"></div> +</div> + +<br clear="all"> + +<div class="grid float min-width-max-content" data-expected-height="64" data-expected-width="97"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="40"></div> +</div> +<div class="grid float min-width-max-content max-width-min-content" data-expected-height="64" data-expected-width="97"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="40"></div> +</div> +<div class="grid float max-content" data-expected-height="64" data-expected-width="97"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="40"></div> +</div> + +<br clear="all"> + +<div class="float min-content"> + <div class="grid min-width-max-content" data-expected-height="64" data-expected-width="97"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="40"></div> + </div> +</div> +<div class="float max-content"> + <div class="grid min-width-max-content max-width-min-content" data-expected-height="64" data-expected-width="97"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="40"></div> + </div> +</div> +<div class="float fit-content"> + <div class="grid max-content" data-expected-height="64" data-expected-width="97"> + <div class="item" data-expected-height="50" data-expected-width="10"></div> + <div class="item" data-expected-height="50" data-expected-width="40"></div> + </div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-rows-min-max-height-001.html b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-rows-min-max-height-001.html new file mode 100644 index 00000000000..0789e405301 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/flex-sizing-rows-min-max-height-001.html @@ -0,0 +1,96 @@ +<!DOCTYPE HTML> +<title>CSS Grid Layout Test: min and max height when computing the flex row</title> +<link rel="author" title="Sergio Villar" href="mailto:svillar@igalia.com"/> +<link rel="help" href="https://drafts.csswg.org/css-grid/#algo-flex-tracks"/> +<link rel="issue" href="https://bugs.chromium.org/p/chromium/issues/detail?id=660690"/> +<link href="/css/support/grid.css" rel="stylesheet"/> +<link href="/css/support/height-keyword-classes.css" rel="stylesheet"> +<meta name="assert" content="This test ensures that minimum and maximum heights are used to compute the flex fraction for grid rows."/> +<style> +.grid { + margin: 3px; + grid: minmax(10px, 1fr) minmax(10px, 4fr) / 50px; + grid-row-gap: 33px; + border: 5px dashed; + padding: 2px; +} + +.float { float: left; } + +.item:nth-child(1) { background-color: purple; } +.item:nth-child(2) { background-color: blue; } +</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 id="log"></div> + +<p>This test PASS if all the grids in the same row look the same.</p> + +<div class="grid float" style="max-height: 70px" data-expected-width="64" data-expected-height="84"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="27"></div> +</div> +<div class="grid float" style="min-height: 70px; max-height: 60px" data-expected-width="64" data-expected-height="84"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="27"></div> +</div> +<div class="grid float" style="height: 70px" data-expected-width="64" data-expected-height="84"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="27"></div> +</div> + +<br clear="all"> + +<div class="grid float" style="min-height: 108px" data-expected-width="64" data-expected-height="122"> + <div class="item" data-expected-width="50" data-expected-height="15"></div> + <div class="item" data-expected-width="50" data-expected-height="60"></div> +</div> +<div class="grid float" style="min-height: 108px; max-height: 60px" data-expected-width="64" data-expected-height="122"> + <div class="item" data-expected-width="50" data-expected-height="15"></div> + <div class="item" data-expected-width="50" data-expected-height="60"></div> +</div> +<div class="grid float" style="height: 108px" data-expected-width="64" data-expected-height="122"> + <div class="item" data-expected-width="50" data-expected-height="15"></div> + <div class="item" data-expected-width="50" data-expected-height="60"></div> +</div> + +<br clear="all"> + +<div class="grid float min-height-max-content" data-expected-width="64" data-expected-height="97"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="40"></div> +</div> +<div class="grid float min-height-max-content max-height-min-content" data-expected-width="64" data-expected-height="97"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="40"></div> +</div> +<div class="grid float max-content" data-expected-width="64" data-expected-height="97"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="40"></div> +</div> + +<br clear="all"> + +<div class="float min-content"> + <div class="grid min-height-max-content" data-expected-width="64" data-expected-height="97"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="40"></div> + </div> +</div> +<div class="float max-content"> + <div class="grid min-height-max-content max-height-min-content" data-expected-width="64" data-expected-height="97"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="40"></div> + </div> +</div> +<div class="float fit-content"> + <div class="grid max-content" data-expected-width="64" data-expected-height="97"> + <div class="item" data-expected-width="50" data-expected-height="10"></div> + <div class="item" data-expected-width="50" data-expected-height="40"></div> + </div> +</div> + +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-container-percentage-001.html b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-container-percentage-001.html new file mode 100644 index 00000000000..511e0cd99ea --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-container-percentage-001.html @@ -0,0 +1,262 @@ +<!DOCTYPE html> +<title>CSS Grid: indefinite grid container and percentage columns.</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"/> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#valdef-grid-template-columns-length-percentage"/> +<meta name="assert" content="Checks that percentage columns are only indefinite during intrinsic size computation. Aftewards, they are properly resolved against the grid container intrinsic sizes."/> +<link rel="issue" href="https://crbug.com/616716"/> +<link rel="stylesheet" href="/css/support/grid.css"/> +<link rel="stylesheet" href="/css/support/width-keyword-classes.css"/> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"/> +<style> +.wrapper { + position: relative; + clear: both; +} + +.grid { + font: 10px/1 Ahem; +} + +.float { + float: left; +} + +.abspos { + position: absolute; +} + +.fixedSize { + width: 200px; + height: 200px; +} + +.oneColumn100 { + grid-template-columns: 100%; +} + +.oneColumn50 { + grid-template-columns: 50%; +} + +.twoColumns { + grid-template-columns: 50% 100px; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script type="text/javascript"> + setup({ explicit_done: true }); +</script> +<body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })"> +<div id="log"></div> +<div class="wrapper"> + <div class="grid float oneColumn100" data-expected-width="40" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid abspos oneColumn100" data-expected-width="40" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid max-content oneColumn100" data-expected-width="40" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid fit-content oneColumn100" data-expected-width="40" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid min-content oneColumn100" data-expected-width="20" data-expected-height="20"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid float oneColumn50" data-expected-width="40" data-expected-height="20"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid abspos oneColumn50" data-expected-width="40" data-expected-height="20"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid max-content oneColumn50" data-expected-width="40" data-expected-height="20"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid fit-content oneColumn50" data-expected-width="40" data-expected-height="20"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="20"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid min-content oneColumn50" data-expected-width="20" data-expected-height="20"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="20"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid float twoColumns" data-expected-width="140" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10"> + XX X + </div> + <div class="firstRowSecondColumn" + data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid abspos twoColumns" data-expected-width="140" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10"> + XX X + </div> + <div class="firstRowSecondColumn" + data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid max-content twoColumns" data-expected-width="140" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10"> + XX X + </div> + <div class="firstRowSecondColumn" + data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid fit-content twoColumns" data-expected-width="140" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="10"> + XX X + </div> + <div class="firstRowSecondColumn" + data-offset-x="70" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid min-content twoColumns" data-expected-width="120" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="60" data-expected-height="10"> + XX X + </div> + <div class="firstRowSecondColumn" + data-offset-x="60" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid float twoColumns" data-expected-width="100" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10"> + </div> + <div class="firstRowSecondColumn" + data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid abspos twoColumns" data-expected-width="100" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10"> + </div> + <div class="firstRowSecondColumn" + data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid max-content twoColumns" data-expected-width="100" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10"> + </div> + <div class="firstRowSecondColumn" + data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid min-content twoColumns" data-expected-width="100" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10"> + </div> + <div class="firstRowSecondColumn" + data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + XX X + </div> + </div> +</div> + +<div class="wrapper"> + <div class="grid fit-content twoColumns" data-expected-width="100" data-expected-height="10"> + <div class="firstRowFirstColumn" + data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="10"> + </div> + <div class="firstRowSecondColumn" + data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="10"> + XX X + </div> + </div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-item-margin-auto-columns-rows-vertical-lr-001.html b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-item-margin-auto-columns-rows-vertical-lr-001.html new file mode 100644 index 00000000000..63bf55f293b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-item-margin-auto-columns-rows-vertical-lr-001.html @@ -0,0 +1,86 @@ +<!DOCTYPE html> +<title>CSS Grid: 'auto' sizes with item's margins with vertical-lr</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#layout-algorithm"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=357419"> +<meta name="assert" content="Check that the grid's rows and columns 'auto' sizes are updated accordingly to its grid-item's before and start margins when using vertical-lr writing mode."/> +<link href="/css/support/grid.css" rel="stylesheet"> +<link href="/css/support/width-keyword-classes.css" rel="stylesheet"> + +<style> +.grid { + grid-template-rows: auto auto; + grid-template-columns: auto auto; +} + +.gridItem { + width: 20px; + height: 40px; +} + +.marginTop { + margin-top: 20px; +} + +.marginBottom { + margin-bottom: 20px; +} + +.borderTop { + border-top: 5px solid; +} + +.borderBottom { + border-bottom: 5px solid; +} + +.paddingTop { + padding-top: 10px; +} + +.paddingBottom { + padding-bottom: 10px; +} +</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> + <div class="grid fit-content verticalLR" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop firstRowFirstColumn"></div> + <div class="gridItem marginBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> + +<div> + <div class="grid fit-content verticalLR" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> + <div class="gridItem borderTop borderBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> + +<div> + <div class="grid fit-content verticalLR" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> + <div class="gridItem borderTop borderBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> + +<div> + <div class="grid fit-content verticalLR" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> + <div class="gridItem paddingBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-item-margin-auto-columns-rows-vertical-rl-001.html b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-item-margin-auto-columns-rows-vertical-rl-001.html new file mode 100644 index 00000000000..d6767e3f4a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/layout-algorithm/grid-item-margin-auto-columns-rows-vertical-rl-001.html @@ -0,0 +1,86 @@ +<!DOCTYPE html> +<title>CSS Grid: 'auto' sizes with item's margins with vertical-rl</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid/#layout-algorithm"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=357419"> +<meta name="assert" content="Check that the grid's rows and columns 'auto' sizes are updated accordingly to its grid-item's before and start margins when using vertical-rl writing mode."/> +<link href="/css/support/grid.css" rel="stylesheet"> +<link href="/css/support/width-keyword-classes.css" rel="stylesheet"> + +<style> +.grid { + grid-template-rows: auto auto; + grid-template-columns: auto auto; +} + +.gridItem { + width: 20px; + height: 40px; +} + +.marginTop { + margin-top: 20px; +} + +.marginBottom { + margin-bottom: 20px; +} + +.borderTop { + border-top: 5px solid; +} + +.borderBottom { + border-bottom: 5px solid; +} + +.paddingTop { + padding-top: 10px; +} + +.paddingBottom { + padding-bottom: 10px; +} +</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 style="position: relative"> + <div class="grid fit-content verticalRL" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop firstRowFirstColumn"></div> + <div class="gridItem marginBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> + +<div style="position: relative"> + <div class="grid fit-content verticalRL" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> + <div class="gridItem borderTop borderBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> + +<div style="position: relative"> + <div class="grid fit-content verticalRL" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> + <div class="gridItem borderTop borderBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> + +<div style="position: relative"> + <div class="grid fit-content verticalRL" data-expected-width="40" data-expected-height="120"> + <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> + <div class="gridItem paddingBottom firstRowSecondColumn"></div> + <div class="gridItem secondRowFirstColumn"></div> + <div class="gridItem secondRowSecondColumn"></div> + </div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/placement/grid-auto-flow-sparse-001.html b/tests/wpt/web-platform-tests/css/css-grid/placement/grid-auto-flow-sparse-001.html new file mode 100644 index 00000000000..373371ac2bf --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/placement/grid-auto-flow-sparse-001.html @@ -0,0 +1,118 @@ +<!DOCTYPE html> +<title>CSS Grid: auto-placement with 'grid-auto-flow: column'</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#propdef-grid-auto-flow"> +<link rel="help" href="https://drafts.csswg.org/css-grid-1/#auto-placement-algo"> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=384099"> +<meta name="assert" content="Check that the auto-placement algorithm is sparse by default."> +<link rel="stylesheet" href="/css/support/grid.css"> +<link rel="stylesheet" href="/fonts/ahem.css"> + +<style> +.grid { + grid-template-columns: 50px 100px 150px 200px; + grid-template-rows: 50px 100px 150px 200px; +} + +.unconstrainedContainer { + /* For accurate x / y offset. */ + position: relative; +} +</style> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script type="text/javascript"> + setup({ explicit_done: true }); +</script> + +<body onload="document.fonts.ready.then(() => { checkLayout('.grid'); })"> +<div class="unconstrainedContainer"> + <div class="grid"> + <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowAutoColumnSpanning2" data-offset-x="150" data-offset-y="0" data-expected-width="350" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowAutoColumnSpanning2" data-offset-x="50" data-offset-y="50" data-expected-width="250" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowAutoColumnSpanning2" data-offset-x="0" data-offset-y="150" data-expected-width="150" data-expected-height="150"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="150" data-offset-y="150" data-expected-width="150" data-expected-height="150"></div> + </div> +</div> + +<div class="unconstrainedContainer"> + <div class="grid"> + <div class="sizedToGridArea autoRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowAutoColumnSpanning2" data-offset-x="150" data-offset-y="0" data-expected-width="350" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowFirstColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowThirdColumn" data-offset-x="150" data-offset-y="50" data-expected-width="150" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="300" data-offset-y="50" data-expected-width="200" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="0" data-offset-y="150" data-expected-width="50" data-expected-height="150"></div> + <div class="sizedToGridArea autoRowSpanning2AutoColumnSpanning3" data-offset-x="50" data-offset-y="150" data-expected-width="450" data-expected-height="350"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="0" data-offset-y="300" data-expected-width="50" data-expected-height="200"></div> + </div> +</div> + +<div class="unconstrainedContainer"> + <div class="grid"> + <div class="sizedToGridArea firstRowAutoColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div> + <div class="sizedToGridArea secondRowAutoColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowFirstColumn" data-offset-x="0" data-offset-y="150" data-expected-width="50" data-expected-height="150"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="50" data-offset-y="150" data-expected-width="100" data-expected-height="150"></div> + </div> +</div> + +<div class="unconstrainedContainer"> + <div class="grid"> + <div class="sizedToGridArea autoRowFirstColumn" data-offset-x="0" data-offset-y="150" data-expected-width="50" data-expected-height="150"></div> + <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea secondRowAutoColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea firstRowAutoColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="50" data-offset-y="150" data-expected-width="100" data-expected-height="150"></div> + </div> +</div> + +<div class="unconstrainedContainer"> + <div class="grid gridAutoFlowColumnSparse"> + <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowSpanning2AutoColumn" data-offset-x="0" data-offset-y="150" data-expected-width="50" data-expected-height="350"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowSpanning2AutoColumn" data-offset-x="50" data-offset-y="50" data-expected-width="100" data-expected-height="250"></div> + <div class="sizedToGridArea autoRowSpanning2AutoColumn" data-offset-x="150" data-offset-y="0" data-expected-width="150" data-expected-height="150"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="150" data-offset-y="150" data-expected-width="150" data-expected-height="150"></div> + </div> +</div> + +<div class="unconstrainedContainer"> + <div class="grid gridAutoFlowColumnSparse"> + <div class="sizedToGridArea secondRowAutoColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowSpanning2AutoColumn" data-offset-x="0" data-offset-y="150" data-expected-width="50" data-expected-height="350"></div> + <div class="sizedToGridArea firstRowAutoColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea thirdRowAutoColumn" data-offset-x="50" data-offset-y="150" data-expected-width="100" data-expected-height="150"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="50" data-offset-y="300" data-expected-width="100" data-expected-height="200"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="150" data-offset-y="0" data-expected-width="150" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowSpanning3AutoColumnSpanning2" data-offset-x="150" data-offset-y="50" data-expected-width="350" data-expected-height="450"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="300" data-offset-y="0" data-expected-width="200" data-expected-height="50"></div> + </div> +</div> + +<div class="unconstrainedContainer"> + <div class="grid gridAutoFlowColumnSparse"> + <div class="sizedToGridArea autoRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea secondRowAutoColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea firstRowAutoColumn" data-offset-x="150" data-offset-y="0" data-expected-width="150" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="150" data-offset-y="50" data-expected-width="150" data-expected-height="100"></div> + </div> +</div> + +<div class="unconstrainedContainer"> + <div class="grid gridAutoFlowColumnSparse"> + <div class="sizedToGridArea firstRowAutoColumn" data-offset-x="150" data-offset-y="0" data-expected-width="150" data-expected-height="50"></div> + <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="100"></div> + <div class="sizedToGridArea autoRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="100" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50"></div> + <div class="sizedToGridArea autoRowAutoColumn" data-offset-x="150" data-offset-y="50" data-expected-width="150" data-expected-height="100"></div> + </div> +</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-grid/placement/grid-container-change-grid-tracks-recompute-child-positions-001.html b/tests/wpt/web-platform-tests/css/css-grid/placement/grid-container-change-grid-tracks-recompute-child-positions-001.html new file mode 100644 index 00000000000..a2485142e1b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/placement/grid-container-change-grid-tracks-recompute-child-positions-001.html @@ -0,0 +1,88 @@ +<!DOCTYPE html> +<html> +<title>CSS Grid: Grid tracks changes recomputed child positions.</title> +<link rel="author" title="Julien Chaffraix" href="mailto:jchaffraix@chromium.org"/> +<link rel="help" href="https://drafts.csswg.org/css-grid/#placement"/> +<meta name="assert" content="Checks that grid-template-{rows|columns} dynamic updates recomputes the positions of automatically placed grid items."/> +<link rel="issue" href="https://crbug.com/248151"/> +<link href="/css/support/grid.css" rel="stylesheet"/> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"/> +<style> +.grid { + grid-auto-flow: row dense; + grid-auto-rows: 5px; + grid-auto-columns: 5px; +} +#firstGridItem { + grid-row: auto; + grid-column: 1; +} + +#secondGridItem { + grid-row: 1; + grid-column: auto; +} + +#thirdGridItem { + grid-row: auto; + grid-column: auto; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script> +function testGridDefinitions(gridTemplateRows, gridTemplateColumns, gridTemplateAreas, firstGridItemData, secondGridItemData, thirdGridItemData) +{ + var gridElement = document.getElementsByClassName("grid")[0]; + gridElement.style.gridTemplateRows = gridTemplateRows; + gridElement.style.gridTemplateColumns = gridTemplateColumns; + gridElement.style.gridTemplateAreas = gridTemplateAreas; + + var firstGridItem = document.getElementById("firstGridItem"); + firstGridItem.setAttribute("data-expected-width", firstGridItemData.width); + firstGridItem.setAttribute("data-expected-height", firstGridItemData.height); + firstGridItem.setAttribute("data-offset-x", firstGridItemData.x); + firstGridItem.setAttribute("data-offset-y", firstGridItemData.y); + + var secondGridItem = document.getElementById("secondGridItem"); + secondGridItem.setAttribute("data-expected-width", secondGridItemData.width); + secondGridItem.setAttribute("data-expected-height", secondGridItemData.height); + secondGridItem.setAttribute("data-offset-x", secondGridItemData.x); + secondGridItem.setAttribute("data-offset-y", secondGridItemData.y); + + var thirdGridItem = document.getElementById("thirdGridItem"); + thirdGridItem.setAttribute("data-expected-width", thirdGridItemData.width); + thirdGridItem.setAttribute("data-expected-height", thirdGridItemData.height); + thirdGridItem.setAttribute("data-offset-x", thirdGridItemData.x); + thirdGridItem.setAttribute("data-offset-y", thirdGridItemData.y); + + checkLayout(".grid", false); +} + +function testChangingGridDefinitions() +{ + testGridDefinitions('10px 20px', '10px', '', { 'width': '10', 'height': '20', 'x': '0', 'y': '10' }, { 'width': '10', 'height': '10', 'x': '0', 'y': '0' }, { 'width': '10', 'height': '5', 'x': '0', 'y': '30' }); + testGridDefinitions('10px', '10px', '"a"', { 'width': '10', 'height': '5', 'x': '0', 'y': '10' }, { 'width': '10', 'height': '10', 'x': '0', 'y': '0' }, { 'width': '10', 'height': '5', 'x': '0', 'y': '15' }); + testGridDefinitions('10px', '10px', '"a ."', { 'width': '10', 'height': '5', 'x': '0', 'y': '10' }, { 'width': '10', 'height': '10', 'x': '0', 'y': '0' }, { 'width': '5', 'height': '10', 'x': '10', 'y': '0' }); + testGridDefinitions('50px', '30px 40px', '', { 'width': '30', 'height': '5', 'x': '0', 'y': '50' }, { 'width': '30', 'height': '50', 'x': '0', 'y': '0' }, { 'width': '40', 'height': '50', 'x': '30', 'y': '0' }); + testGridDefinitions('50px', '60px', '', { 'width': '60', 'height': '5', 'x': '0', 'y': '50' }, { 'width': '60', 'height': '50', 'x': '0', 'y': '0' }, { 'width': '60', 'height': '5', 'x': '0', 'y': '55' }); + testGridDefinitions('50px 100px 150px', '60px', '', { 'width': '60', 'height': '100', 'x': '0', 'y': '50' }, { 'width': '60', 'height': '50', 'x': '0', 'y': '0' }, { 'width': '60', 'height': '150', 'x': '0', 'y': '150' }); + + done(); +} + +</script> +<script type="text/javascript"> + setup({ explicit_done: true }); +</script> +<body onload="document.fonts.ready.then(() => { testChangingGridDefinitions(); })"> +<div style="position: relative"> + <div class="grid"> + <div class="sizedToGridArea" id="firstGridItem"></div> + <div class="sizedToGridArea" id="secondGridItem"></div> + <div class="sizedToGridArea" id="thirdGridItem"></div> + </div> +</div> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-grid/placement/grid-container-change-named-grid-recompute-child-positions-001.html b/tests/wpt/web-platform-tests/css/css-grid/placement/grid-container-change-named-grid-recompute-child-positions-001.html new file mode 100644 index 00000000000..d702d30b3ba --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/placement/grid-container-change-named-grid-recompute-child-positions-001.html @@ -0,0 +1,84 @@ +<!DOCTYPE html> +<html> +<title>CSS Grid: Change named grid lines.</title> +<link rel="author" title="Julien Chaffraix" href="mailto:jchaffraix@chromium.org"/> +<link rel="help" href="https://drafts.csswg.org/css-grid/#placement"/> +<meta name="assert" content="Checks that updating the named grid lines definitions in grid-template-{rows|columns} recomputes the positions of automatically placed grid items."/> +<link rel="issue" href="https://crbug.com/248151"/> +<link href="/css/support/grid.css" rel="stylesheet"/> +<link href="/css/support/alignment.css" rel="stylesheet"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"/> +<style> +.grid { + grid-auto-flow: row dense; +} +#firstGridItem { + grid-row: auto; + grid-column: column; +} + +#secondGridItem { + grid-row: row; + grid-column: auto; +} + +#thirdGridItem { + grid-row: auto; + grid-column: auto; +} +</style> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/check-layout-th.js"></script> +<script> +function testGridDefinitions(gridTemplateRows, gridTemplateColumns, firstGridItemData, secondGridItemData, thirdGridItemData) +{ + var gridElement = document.getElementsByClassName("grid")[0]; + gridElement.style.gridTemplateRows = gridTemplateRows; + gridElement.style.gridTemplateColumns = gridTemplateColumns; + + var firstGridItem = document.getElementById("firstGridItem"); + firstGridItem.setAttribute("data-expected-width", firstGridItemData.width); + firstGridItem.setAttribute("data-expected-height", firstGridItemData.height); + firstGridItem.setAttribute("data-offset-x", firstGridItemData.x); + firstGridItem.setAttribute("data-offset-y", firstGridItemData.y); + + var secondGridItem = document.getElementById("secondGridItem"); + secondGridItem.setAttribute("data-expected-width", secondGridItemData.width); + secondGridItem.setAttribute("data-expected-height", secondGridItemData.height); + secondGridItem.setAttribute("data-offset-x", secondGridItemData.x); + secondGridItem.setAttribute("data-offset-y", secondGridItemData.y); + + var thirdGridItem = document.getElementById("thirdGridItem"); + thirdGridItem.setAttribute("data-expected-width", thirdGridItemData.width); + thirdGridItem.setAttribute("data-expected-height", thirdGridItemData.height); + thirdGridItem.setAttribute("data-offset-x", thirdGridItemData.x); + thirdGridItem.setAttribute("data-offset-y", thirdGridItemData.y); + + checkLayout(".grid", false); +} + +function testChangingGridDefinitions() +{ + testGridDefinitions('10px [row] 20px', '30px [column]', { 'width': '0', 'height': '10', 'x': '30', 'y': '0' }, { 'width': '30', 'height': '20', 'x': '0', 'y': '10' }, { 'width': '30', 'height': '10', 'x': '0', 'y': '0' }); + testGridDefinitions('10px [row] 20px', '30px', { 'width': '0', 'height': '10', 'x': '30', 'y': '0' }, { 'width': '30', 'height': '20', 'x': '0', 'y': '10' }, { 'width': '30', 'height': '10', 'x': '0', 'y': '0' }); + testGridDefinitions('10px 20px [row]', '30px', { 'width': '0', 'height': '10', 'x': '30', 'y': '0' }, { 'width': '30', 'height': '0', 'x': '0', 'y': '30' }, { 'width': '30', 'height': '10', 'x': '0', 'y': '0' }); + testGridDefinitions('10px 20px [row]', '30px [column]', { 'width': '0', 'height': '10', 'x': '30', 'y': '0' }, { 'width': '30', 'height': '0', 'x': '0', 'y': '30' }, { 'width': '30', 'height': '10', 'x': '0', 'y': '0' }); + done(); +} + +</script> +<script type="text/javascript"> + setup({ explicit_done: true }); +</script> +<body onload="document.fonts.ready.then(() => { testChangingGridDefinitions(); })"> +<div style="position: relative"> + <div class="grid justifyContentStart"> + <div class="sizedToGridArea" id="firstGridItem"></div> + <div class="sizedToGridArea" id="secondGridItem"></div> + <div class="sizedToGridArea" id="thirdGridItem"></div> + </div> +</div> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-grid/reference/flex-item-grid-container-percentage-rows-001-ref.html b/tests/wpt/web-platform-tests/css/css-grid/reference/flex-item-grid-container-percentage-rows-001-ref.html new file mode 100644 index 00000000000..1f4b23952e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/reference/flex-item-grid-container-percentage-rows-001-ref.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<style> +.wrapper { + width: 200px; + border: 5px solid; +} + +.wrapper > div { + height: 100px; +} + +.magenta { + background: magenta; +} + +.cyan { + background: cyan; +} +</style> + +<p>Test passes if you see a 200x200 box with top half cyan and bottom half magenta.</p> + +<div class="wrapper"> + <div class="cyan"></div> + <div class="magenta"></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-reference-restore.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-reference-restore.html new file mode 100644 index 00000000000..eccebd8fbcc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-reference-restore.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<title>CSS Masking: Consecutive clip-paths don't affect each other.</title> +<link rel="author" title="Fredrik Söderquist" href="mailto:fs@opera.com"> +<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-clip-path"> +<link rel="issue" href="https://crbug.com/391291"> +<link rel="match" href="reference/clip-path-reference-restore-ref.html"> +<meta name="assert" content="Check that consecutive clip-paths don't affect each other"/> +<style> +.error { + width: 100px; + height: 100px; + background-color: red; + position: absolute; +} +.test { + width: 200px; + height: 50px; + background-color: green; + clip-path: url(#c); +} +</style> +<div class="error"></div> +<div class="test"></div> +<div class="test"></div> +<svg> + <defs> + <clipPath id="c" clipPathUnits="objectBoundingBox"> + <rect width="0.5" height="1"/> + </clipPath> + </defs> +</svg> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-002.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-002.html new file mode 100644 index 00000000000..de00a013ad4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-002.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<title>CSS Masking: Mutating a <clipPath>s 'transform' updates the clip path</title> +<link rel="author" title="Fredrik Söderquist" href="mailto:fs@opera.com"> +<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-clip-path""> +<link rel="help" href="https://crbug.com/881700"> +<link rel="match" href="reference/clip-path-transform-mutated-002-ref.html"> +<meta name="assert" content="Check that clipPath's clients should be notified when the 'transform' presentation attribute (or CSS property) was mutated on a <clipPath>."/> + +<script src="/common/reftest-wait.js"></script> +<script src="/common/rendering-utils.js"></script> + +<style> +#target { + width: 100px; + height: 100px; + background-color: green; + clip-path: url(#clip); +} +</style> +<div id="target"></div> +<svg> + <clipPath id="clip"> + <rect width="1" height="1"/> + </clipPath> +</svg> +<script> + waitForAtLeastOneFrame().then(function() { + clip.setAttribute('transform', 'scale(100 100)'); + takeScreenshot(); + }); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-reference-restore-ref.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-reference-restore-ref.html new file mode 100644 index 00000000000..683511fd800 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-reference-restore-ref.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<div style="width: 100px; height: 100px; background-color: green;"></div> diff --git a/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-transform-mutated-002-ref.html b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-transform-mutated-002-ref.html new file mode 100644 index 00000000000..f718ea6abfb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-masking/clip-path/reference/clip-path-transform-mutated-002-ref.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<div style="width: 100px; height: 100px; background-color: green"></div> diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/font-size-animation.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/font-size-animation.html new file mode 100644 index 00000000000..4b8ce1c2551 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/font-size-animation.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.css-houdini.org/css-properties-values-api-1"> +<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/3751"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + CSS.registerProperty({ + name: '--length', + syntax: '<length>', + initialValue: '0px', + inherits: false + }); +</script> +<style> + @keyframes font_size_animation { + from { + font-size: 10px; + width: 10em; + --length: 10em; + } + to { + font-size: 20px; + width: 20em; + --length: 20em; + } + } + #target1 { + font-size: 1px; + animation: font_size_animation 10s -5s linear paused; + } +</style> +<div id=target1></div> +<script> + test(function() { + // At the time of writing, the correct (absolute) answer is not + // yet defined. However, whatever the correct answer is, there should + // be no difference in 'width' and a custom property registered with + // "<length>". + // + // See https://github.com/w3c/csswg-drafts/issues/3751 + assert_equals(getComputedStyle(target1).getPropertyValue('width'), + getComputedStyle(target1).getPropertyValue('--length')); + }, 'Animating font-size handled identically for standard and custom properties'); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-auto-inline-010.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-auto-inline-010.html index cb6a6222b7b..03776617bf6 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-auto-inline-010.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-auto-inline-010.html @@ -6,7 +6,18 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-text-3/#hyphenation"> - <link rel="match" href="reference/hyphens-auto-inline-010-ref.html"> + <link rel="match" href="reference/hyphens-auto-inline-010M-ref.html"> + <link rel="match" href="reference/hyphens-auto-inline-010H-ref.html"> + + <!-- + User agents may use U+2010 HYPHEN <https://codepoints.net/U+2010> + when the font has the glyph, or + may use U+002D HYPHEN-MINUS <https://codepoints.net/U+002d> + otherwise. Some fonts will display slightly different glyphs for + these code points. Therefore these 2 reference files. + The M-ref.html reference file means the hyphen-Minus character U+002D. + The H-ref.html reference file means the Hyphen character U+2010. + --> <meta content="" name="flags"> <meta content="When 'hyphens' is set to 'auto' and applied to an inline element and when 'lang' attribute is also set to a valid value, then words may be broken at hyphenation opportunities determined automatically by an hyphenation resource appropriate to the language of the text involved."> @@ -17,25 +28,25 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - margin-bottom: 0.25em; width: 6ch; } - span#test + span { hyphens: auto; } - - div#reference - { - hyphens: none; - } </style> <body lang="en"> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. - - <div>There are <span id="test">new guidelines now</span>.</div> - - <div id="reference">There are new guide-lines now.</div> + <div>There are <span>new guidelines now</span>.</div> + + <!-- + Expected result: + There + are + new + guide- + lines + now. + --> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-011.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-011.html index 060dc75619a..862ca80fc64 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-011.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-011.html @@ -6,7 +6,18 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-text-3/#hyphenation"> - <link rel="match" href="reference/hyphens-manual-011-ref.html"> + <link rel="match" href="reference/hyphens-manual-011M-ref.html"> + <link rel="match" href="reference/hyphens-manual-011H-ref.html"> + + <!-- + User agents may use U+2010 HYPHEN <https://codepoints.net/U+2010> + when the font has the glyph, or + may use U+002D HYPHEN-MINUS <https://codepoints.net/U+002d> + otherwise. Some fonts will display slightly different glyphs for + these code points. Therefore these 2 reference files. + The M-ref.html reference file means the hyphen-Minus character U+002D. + The H-ref.html reference file means the Hyphen character U+2010. + --> <meta content="" name="flags"> <meta content="When 'hyphens' is set to 'manual', then words can be hyphenated only if characters inside the words explicitly define hyphenation opportunities. In this test, the characters inside the word 'Deoxyribonucleic' explicitly define 2 hyphenation opportunities, so it can be hyphenated. Since 9 characters can all fit inside the line box of the block box, then the word 'Deoxyribonucleic' is hyphenated only after the 2nd soft hyphen." name="assert"> @@ -17,26 +28,19 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - margin-bottom: 0.25em; - width: 10ch; - } - - div#test - { hyphens: manual; - } - - div#reference - { - hyphens: none; + width: 10ch; } </style> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. + <div>Deoxy­ribo­nucleic acid</div> - <div id="test">Deoxy­ribo­nucleic acid</div> - - <div id="reference">Deoxyribo-nucleic acid</div> + <!-- + Expected result: + Deoxyribo- + nucleic + acid + --> <!-- diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-012.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-012.html index 871f7c39b69..7ffece5ff6d 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-012.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-012.html @@ -6,7 +6,18 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-text-3/#hyphenation"> - <link rel="match" href="reference/hyphens-manual-011-ref.html"> + <link rel="match" href="reference/hyphens-manual-011M-ref.html"> + <link rel="match" href="reference/hyphens-manual-011H-ref.html"> + + <!-- + User agents may use U+2010 HYPHEN <https://codepoints.net/U+2010> + when the font has the glyph, or + may use U+002D HYPHEN-MINUS <https://codepoints.net/U+002d> + otherwise. Some fonts will display slightly different glyphs for + these code points. Therefore these 2 reference files. + The M-ref.html reference file means the hyphen-Minus character U+002D. + The H-ref.html reference file means the Hyphen character U+2010. + --> <meta content="" name="flags"> <meta content="When 'hyphens' is set to 'manual', then words can be hyphenated only if characters inside the words explicitly define hyphenation opportunities. In this test, the characters inside the word 'Deoxyribonucleic' explicitly define 4 hyphenation opportunities. Since 9 characters can all fit inside the line box of the block box, then the word 'Deoxyribonucleic' is hyphenated only after the 3rd soft hyphen." name="assert"> @@ -17,26 +28,19 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - margin-bottom: 0.25em; - width: 10ch; - } - - div#test - { hyphens: manual; - } - - div#reference - { - hyphens: none; + width: 10ch; } </style> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. + <div>Deo­xy­ribo­nu­cleic acid</div> - <div id="test">Deo­xy­ribo­nu­cleic acid</div> - - <div id="reference">Deoxyribo-nucleic acid</div> + <!-- + Expected result: + Deoxyribo- + nucleic + acid + --> <!-- diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-013.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-013.html index 17e3f6f8157..31c57c5382a 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-013.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-013.html @@ -6,7 +6,18 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-text-3/#hyphenation"> - <link rel="match" href="reference/hyphens-manual-013-ref.html"> + <link rel="match" href="reference/hyphens-manual-013M-ref.html"> + <link rel="match" href="reference/hyphens-manual-013H-ref.html"> + + <!-- + User agents may use U+2010 HYPHEN <https://codepoints.net/U+2010> + when the font has the glyph, or + may use U+002D HYPHEN-MINUS <https://codepoints.net/U+002d> + otherwise. Some fonts will display slightly different glyphs for + these code points. Therefore these 2 reference files. + The M-ref.html reference file means the hyphen-Minus character U+002D. + The H-ref.html reference file means the Hyphen character U+2010. + --> <meta content="" name="flags"> <meta content="When 'hyphens' is set to 'manual', then words can be hyphenated only if characters inside the words explicitly define hyphenation opportunities. In this test, the characters inside the word 'Deoxyribonucleic' explicitly define 1 and only 1 hyphenation opportunity, so it can be hyphenated only at such point." name="assert"> @@ -17,26 +28,19 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - margin-bottom: 0.25em; - width: 10ch; - } - - div#test - { hyphens: manual; - } - - div#reference - { - hyphens: none; + width: 10ch; } </style> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. Only the "c" of "nucleic" should be outside of each black-bordered rectangles. + <div>Deoxy­ribonucleic acid</div> - <div id="test">Deoxy­ribonucleic acid</div> - - <div id="reference">Deoxy-ribonucleic acid</div> + <!-- + Expected result: + Deoxy- + ribonucleic + acid + --> <!-- diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-011.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-011.html index ec08f4d3887..9eba15b5291 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-011.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-011.html @@ -6,7 +6,18 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-text-3/#hyphenation"> - <link rel="match" href="reference/hyphens-manual-inline-011-ref.html"> + <link rel="match" href="reference/hyphens-manual-inline-011M-ref.html"> + <link rel="match" href="reference/hyphens-manual-inline-011H-ref.html"> + + <!-- + User agents may use U+2010 HYPHEN <https://codepoints.net/U+2010> + when the font has the glyph, or + may use U+002D HYPHEN-MINUS <https://codepoints.net/U+002d> + otherwise. Some fonts will display slightly different glyphs for + these code points. Therefore these 2 reference files. + The M-ref.html reference file means the hyphen-Minus character U+002D. + The H-ref.html reference file means the Hyphen character U+2010. + --> <meta content="" name="flags"> <meta content="When 'hyphens' is set to 'manual' and applied to an inline element, then words can be hyphenated only if characters inside the words explicitly define hyphenation opportunities. In this test, the characters inside the word 'Deoxyribonucleic' explicitly define 2 hyphenation opportunities, so it can be hyphenated. Since 9 characters can all fit inside the line box of the block box, then the word 'Deoxyribonucleic' is hyphenated only after the 2nd soft hyphen." name="assert"> @@ -17,23 +28,21 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - margin-bottom: 0.25em; width: 10ch; } - span#test + span { hyphens: manual; } - - div#reference - { - hyphens: none; - } </style> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. - - <div>DNA <span id="test">means Deoxy­ribo­nucleic acid</span>.</div> + <div>DNA <span>means Deoxy­ribo­nucleic acid</span>.</div> - <div id="reference">DNA means Deoxyribo-nucleic acid.</div> + <!-- + Expected result: + DNA means + Deoxyribo- + nucleic + acid. + --> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-012.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-012.html index 0267fa7baaa..b2aa04f7a6f 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-012.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-manual-inline-012.html @@ -6,7 +6,18 @@ <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <link rel="help" href="https://www.w3.org/TR/css-text-3/#hyphenation"> - <link rel="match" href="reference/hyphens-manual-inline-012-ref.html"> + <link rel="match" href="reference/hyphens-manual-inline-012M-ref.html"> + <link rel="match" href="reference/hyphens-manual-inline-012H-ref.html"> + + <!-- + User agents may use U+2010 HYPHEN <https://codepoints.net/U+2010> + when the font has the glyph, or + may use U+002D HYPHEN-MINUS <https://codepoints.net/U+002d> + otherwise. Some fonts will display slightly different glyphs for + these code points. Therefore these 2 reference files. + The M-ref.html reference file means the hyphen-Minus character U+002D. + The H-ref.html reference file means the Hyphen character U+2010. + --> <meta content="" name="flags"> <meta content="When 'hyphens' is set to 'manual' and applied to an inline element, then words can be hyphenated only if characters inside the words explicitly define hyphenation opportunities. In this test, the characters inside the word 'Deoxyribonucleic' explicitly define 4 hyphenation opportunities. Since 'Deoxy' has 5 characters and 'Deoxyribo' has 9 characters and since the content width of the block box can take 8 characters, then a soft hyphen will occur after 'Deoxy'. Since 'ribonu' has 6 characters and 'ribonucleic' has 11 characters and since the content width of the block box can take 8 characters, then a soft hyphen will occur after 'ribonu'." name="assert"> @@ -17,23 +28,23 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - margin-bottom: 0.25em; width: 8ch; } - span#test + span { hyphens: manual; } - - div#reference - { - hyphens: none; - } </style> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. - - <div>DNA <span id="test">means Deo­xy­ribo­nu­cleic acid</span>.</div> - - <div id="reference">DNA means Deoxy-ribonu-cleic acid.</div> + <div>DNA <span>means Deo­xy­ribo­nu­cleic acid</span>.</div> + + <!-- + Expected result: + DNA + means + Deoxy- + ribonu- + cleic + acid. + --> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-auto-inline-010-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-auto-inline-010H-ref.html index ce1296eb78c..c3e6271c19f 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-auto-inline-010-ref.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-auto-inline-010H-ref.html @@ -12,16 +12,18 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - hyphens: none; - margin-bottom: 0.25em; width: 6ch; } </style> <body lang="en"> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. + <div>There<br>are<br>new<br>guide‐<br>lines<br>now.</div> - <div>There are new guide-lines now.</div> +<!-- - <div>There are new guide-lines now.</div> + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-auto-inline-010M-ref.html index 5dfc2b8e221..ace0c5e7537 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012-ref.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-auto-inline-010M-ref.html @@ -12,16 +12,18 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - hyphens: none; - margin-bottom: 0.25em; - width: 8ch; + width: 6ch; } </style> <body lang="en"> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. + <div>There<br>are<br>new<br>guide-<br>lines<br>now.</div> - <div>DNA means Deoxy-ribonu-cleic acid.</div> +<!-- - <div>DNA means Deoxy-ribonu-cleic acid.</div> + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-011-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-011H-ref.html index 98581bd37c0..99612206f8e 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-011-ref.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-011H-ref.html @@ -12,16 +12,16 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - hyphens: none; - margin-bottom: 0.25em; width: 10ch; } </style> - <body> + <div>Deoxyribo‐<br>nucleic acid</div> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. +<!-- - <div>Deoxyribo-nucleic acid</div> + Hyphen-minus == - == - - <div>Deoxyribo-nucleic acid</div> + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-011M-ref.html index 17254a09f17..191095a413b 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011-ref.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-011M-ref.html @@ -12,16 +12,16 @@ border: black solid 2px; font-family: monospace; font-size: 32px; - hyphens: none; - margin-bottom: 0.25em; width: 10ch; } </style> - <body> + <div>Deoxyribo-<br>nucleic acid</div> - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. +<!-- - <div>DNA means Deoxyribo-nucleic acid.</div> + Hyphen-minus == - == - - <div>DNA means Deoxyribo-nucleic acid.</div> + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013-ref.html deleted file mode 100644 index 9fa6bee4215..00000000000 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013-ref.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE html> - - <meta charset="UTF-8"> - - <title>CSS Reference Test</title> - - <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> - - <style> - div - { - border: black solid 2px; - font-family: monospace; - font-size: 32px; - hyphens: none; - margin-bottom: 0.25em; - width: 10ch; - } - </style> - - <body> - - <p>Test passes if the characters inside of each black-bordered rectangles are laid out identically. Only the "c" of "nucleic" should be outside of each black-bordered rectangles. - - <div>Deoxy-ribonucleic acid</div> - - <div>Deoxy-ribonucleic acid</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013H-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013H-ref.html new file mode 100644 index 00000000000..12ad0ed5059 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013H-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference Test</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border: black solid 2px; + font-family: monospace; + font-size: 32px; + width: 10ch; + } + </style> + + <div>Deoxy‐<br>ribonucleic acid</div> + +<!-- + + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013M-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013M-ref.html new file mode 100644 index 00000000000..3c7121242b7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-013M-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference Test</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border: black solid 2px; + font-family: monospace; + font-size: 32px; + width: 10ch; + } + </style> + + <div>Deoxy-<br>ribonucleic acid</div> + +<!-- + + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011H-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011H-ref.html new file mode 100644 index 00000000000..0cd1ef9f9b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011H-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference Test</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border: black solid 2px; + font-family: monospace; + font-size: 32px; + width: 10ch; + } + </style> + + <div>DNA means<br>Deoxyribo‐<br>nucleic<br>acid.</div> + +<!-- + + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011M-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011M-ref.html new file mode 100644 index 00000000000..836919648e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-011M-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference Test</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border: black solid 2px; + font-family: monospace; + font-size: 32px; + width: 10ch; + } + </style> + + <div>DNA means<br>Deoxyribo-<br>nucleic<br>acid.</div> + +<!-- + + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012H-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012H-ref.html new file mode 100644 index 00000000000..8b2ff04ade5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012H-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference Test</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border: black solid 2px; + font-family: monospace; + font-size: 32px; + width: 8ch; + } + </style> + + <div>DNA<br>means<br>Deoxy‐<br>ribonu‐<br>cleic<br>acid.</div> + +<!-- + + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012M-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012M-ref.html new file mode 100644 index 00000000000..0c8db033c8b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-manual-inline-012M-ref.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Reference Test</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + + <style> + div + { + border: black solid 2px; + font-family: monospace; + font-size: 32px; + width: 8ch; + } + </style> + + <div>DNA<br>means<br>Deoxy-<br>ribonu-<br>cleic<br>acid.</div> + +<!-- + + Hyphen-minus == - == - + + Hyphen == ‐ == ‐ + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-011.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-011.html new file mode 100644 index 00000000000..068119c2929 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-011.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Text: 'white-space: break-spaces' with 4 white spaces and 4 line feeda</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property"> + <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + + <meta content="" name="flags"> + <meta content="This test checks that when 'white-space' is set to 'break-spaces', then line feeds (&NewLine; in the code) are preserved, just like with 'white-space: pre' or with 'white-space: pre-wrap'."> + + <style> + div + { + font-family: Ahem; + font-size: 25px; + line-height: 1; + width: 4em; + } + + div#overlapped-red-reference + { + background-color: red; + height: 4em; + } + + div#overlapping-green-test + { + background-color: green; + bottom: 4em; + color: red; + position: relative; + white-space: break-spaces; + } + </style> + + <p>Test passes if there is a filled green square and <strong>no red</strong>. + + <div id="overlapped-red-reference"></div> + + <div id="overlapping-green-test">

 

</div> + <!-- ^ ^ + 4 consecutive white spaces: 1234 + --> + +<!-- + + 
 == Line feed == 
 == 
 + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-012.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-012.html new file mode 100644 index 00000000000..766bcc1feee --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-012.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Text: 'white-space: break-spaces', 10 white spaces and 1 line feed</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property"> + <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + + <meta content="" name="flags"> + <meta content="This test checks that when 'white-space' is set to 'break-spaces', then line feeds (&NewLine; in the code) are preserved, just like with 'white-space: pre' or with 'white-space: pre-wrap'."> + + <style> + div + { + font-family: Ahem; + font-size: 25px; + line-height: 1; + width: 4em; + } + + div#overlapped-red-reference + { + background-color: red; + height: 4em; + } + + div#overlapping-green-test + { + background-color: green; + bottom: 4em; + color: red; + position: relative; + white-space: break-spaces; + } + </style> + + <p>Test passes if there is a filled green square and <strong>no red</strong>. + + <div id="overlapped-red-reference"></div> + + <div id="overlapping-green-test"> 
 </div> + <!-- ^ ^ ^ + 10 white spaces: 1 234567890 + --> + +<!-- + + 
 == Line feed == 
 == 
 + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-013.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-013.html new file mode 100644 index 00000000000..5b45e5c1cce --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-013.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Text: 'white-space: break-spaces', 7 white spaces and 2 line feeds</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property"> + <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + + <meta content="" name="flags"> + <meta content="This test checks that when 'white-space' is set to 'break-spaces', then line feeds (&NewLine; in the code) are preserved, just like with 'white-space: pre' or with 'white-space: pre-wrap'."> + + <style> + div + { + font-family: Ahem; + font-size: 25px; + line-height: 1; + width: 4em; + } + + div#overlapped-red-reference + { + background-color: red; + height: 4em; + } + + div#overlapping-green-test + { + background-color: green; + bottom: 4em; + color: red; + position: relative; + white-space: break-spaces; + } + </style> + + <p>Test passes if there is a filled green square and <strong>no red</strong>. + + <div id="overlapped-red-reference"></div> + + <div id="overlapping-green-test"> 
 
 </div> + <!-- ^ ^ ^ ^ + 7 white spaces: 1 2 34567 + --> + +<!-- + + 
 == Line feed == 
 == 
 + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-014.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-014.html new file mode 100644 index 00000000000..56281dee347 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-014.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Text: 'white-space: break-spaces', 4 white spaces and 3 line feeds</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property"> + <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + + <meta content="" name="flags"> + <meta content="This test checks that when 'white-space' is set to 'break-spaces', then line feeds (&NewLine; in the code) are preserved, just like with 'white-space: pre' or with 'white-space: pre-wrap'."> + + <style> + div + { + font-family: Ahem; + font-size: 25px; + line-height: 1; + width: 4em; + } + + div#overlapped-red-reference + { + background-color: red; + height: 4em; + } + + div#overlapping-green-test + { + background-color: green; + bottom: 4em; + color: red; + position: relative; + white-space: break-spaces; + } + </style> + + <p>Test passes if there is a filled green square and <strong>no red</strong>. + + <div id="overlapped-red-reference"></div> + + <div id="overlapping-green-test"> 
 
 
 </div> + <!-- ^ ^ ^ ^ + 4 white spaces: 1 2 3 4 + --> + +<!-- + + 
 == Line feed == 
 == 
 + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-015.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-015.html new file mode 100644 index 00000000000..96a7d836638 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-015.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Text: 'white-space: break-spaces', 3 white spaces and 3 line feeds</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property"> + <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + + <meta content="" name="flags"> + <meta content="This test checks that when 'white-space' is set to 'break-spaces', then line feeds (&NewLine; in the code) are preserved, just like with 'white-space: pre' or with 'white-space: pre-wrap'."> + + <style> + div + { + font-family: Ahem; + font-size: 25px; + line-height: 1; + width: 4em; + } + + div#overlapped-red-reference + { + background-color: red; + height: 4em; + } + + div#overlapping-green-test + { + background-color: green; + bottom: 4em; + color: red; + position: relative; + white-space: break-spaces; + } + </style> + + <p>Test passes if there is a filled green square and <strong>no red</strong>. + + <div id="overlapped-red-reference"></div> + + <div id="overlapping-green-test">
 
 
 </div> + <!-- ^ ^ ^ + 3 white spaces: 1 2 3 + --> + +<!-- + + 
 == Line feed == 
 == 
 + +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-016.html b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-016.html new file mode 100644 index 00000000000..4156e6a7da1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/white-space/break-spaces-newline-016.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Text: 'white-space: break-spaces' and 4 consecutive line feeds</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-text-3/#white-space-property"> + <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> + <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> + + <meta content="" name="flags"> + <meta content="This test checks that when 'white-space' is set to 'break-spaces', then line feeds (&NewLine; in the code) are preserved, just like with 'white-space: pre' or with 'white-space: pre-wrap'."> + + <style> + div + { + font-family: Ahem; + font-size: 25px; + line-height: 1; + width: 4em; + } + + div#overlapped-red-reference + { + background-color: red; + height: 4em; + } + + div#overlapping-green-test + { + background-color: green; + bottom: 4em; + color: red; + position: relative; + white-space: break-spaces; + } + </style> + + <p>Test passes if there is a filled green square and <strong>no red</strong>. + + <div id="overlapped-red-reference"></div> + + <div id="overlapping-green-test">



</div> + +<!-- + + 
 == Line feed == 
 == 
 + +--> diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/testharness-api.md b/tests/wpt/web-platform-tests/docs/writing-tests/testharness-api.md index 2ee52786add..bb855b17238 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/testharness-api.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/testharness-api.md @@ -313,40 +313,44 @@ NOTE: All asserts must be located in a `test()` or a step of an these places won't be detected correctly by the harness and may cause unexpected exceptions that will lead to an error in the harness. -## Preconditions ## +## Optional Features ## -When a test would be invalid unless certain conditions are met, but yet -doesn't explicitly depend on those preconditions, `assert_precondition` can be -used. For example: +If a test depends on a specification or specification feature that is OPTIONAL +(in the [RFC 2119 sense](https://tools.ietf.org/html/rfc2119)), +`assert_implements_optional` can be used to indicate that failing the test does +not mean violating a web standard. For example: ```js async_test((t) => { const video = document.createElement("video"); - assert_precondition(video.canPlayType("video/webm")); + assert_implements_optional(video.canPlayType("video/webm")); video.src = "multitrack.webm"; // test something specific to multiple audio tracks in a WebM container t.done(); }, "WebM with multiple audio tracks"); ``` -A failing `assert_precondition` call is reported as a status of -`PRECONDITION_FAILED` for the subtest. +A failing `assert_implements_optional` call is reported as a status of +`PRECONDITION_FAILED` for the subtest. This unusual status code is a legacy +leftover from the deprecated `assert_precondition`; see the [RFC that renamed +it](https://github.com/web-platform-tests/rfcs/pull/48). -`assert_precondition` can also be used during test setup. For example: +`assert_implements_optional` can also be used during test setup. For example: ```js setup(() => { - assert_precondition("onfoo" in document.body, "'foo' event supported"); + assert_implements_optional("optionalfeature" in document.body, + "'optionalfeature' event supported"); }); -async_test(() => { /* test #1 waiting for "foo" event */ }); -async_test(() => { /* test #2 waiting for "foo" event */ }); +async_test(() => { /* test #1 waiting for "optionalfeature" event */ }); +async_test(() => { /* test #2 waiting for "optionalfeature" event */ }); ``` -A failing `assert_precondition` during setup is reported as a status of +A failing `assert_implements_optional` during setup is reported as a status of `PRECONDITION_FAILED` for the test, and the subtests will not run. -See also the `.optional` [file name convention](file-names.md), which is -appropriate when the precondition is explicitly optional behavior. +See also the `.optional` [file name convention](file-names.md), which may be +preferable if the entire test is optional. ## Cleanup ## @@ -772,10 +776,6 @@ workers and want to ensure they run in series: ## List of Assertions ## -### `assert_precondition(condition, description)` -asserts that `condition` is truthy. -See [preconditions](#preconditions) for usage. - ### `assert_true(actual, description)` asserts that `actual` is strictly true @@ -885,6 +885,13 @@ that the exception should have as its .constructor. For example, `func` - a function that should throw +### `assert_implements(condition, description)` +asserts that a feature is supported, by checking if `condition` is truthy. + +### `assert_implements_optional(condition, description)` +asserts that an optional feature is supported, by checking if `condition` is truthy. +See [Optional Features](#optional-features) for usage. + ### `assert_unreached(description)` asserts if called. Used to ensure that some codepath is *not* taken e.g. an event does not fire. @@ -897,6 +904,9 @@ asserts that one `assert_func(actual, expected_array_N, extra_arg1, ..., extra_a allows multiple behaviours. Test authors should not use this method simply to hide UA bugs. +### **DEPRECATED** `assert_precondition(condition, description)` +Use `assert_implements` or `assert_implements_optional` instead. + ## Utility functions ## ### **DEPRECATED** `on_event(object, event, callback)` diff --git a/tests/wpt/web-platform-tests/element-timing/background-image-data-uri.html b/tests/wpt/web-platform-tests/element-timing/background-image-data-uri.html index 540668ae3c3..9722463742a 100644 --- a/tests/wpt/web-platform-tests/element-timing/background-image-data-uri.html +++ b/tests/wpt/web-platform-tests/element-timing/background-image-data-uri.html @@ -18,7 +18,7 @@ body { <script> let beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/background-image-multiple-elements.html b/tests/wpt/web-platform-tests/element-timing/background-image-multiple-elements.html index 61a284a5df3..11f8c05f966 100644 --- a/tests/wpt/web-platform-tests/element-timing/background-image-multiple-elements.html +++ b/tests/wpt/web-platform-tests/element-timing/background-image-multiple-elements.html @@ -23,7 +23,7 @@ body { <script src="resources/element-timing-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let beforeRender = performance.now(); let numObservedElements = 0; let observedDiv1 = false; diff --git a/tests/wpt/web-platform-tests/element-timing/background-image-stretched.html b/tests/wpt/web-platform-tests/element-timing/background-image-stretched.html index d5534c3257a..3ad8976ccf1 100644 --- a/tests/wpt/web-platform-tests/element-timing/background-image-stretched.html +++ b/tests/wpt/web-platform-tests/element-timing/background-image-stretched.html @@ -18,7 +18,7 @@ body { <script> let beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/buffer-before-onload.html b/tests/wpt/web-platform-tests/element-timing/buffer-before-onload.html index 79dd64e2977..17c8238f6e7 100644 --- a/tests/wpt/web-platform-tests/element-timing/buffer-before-onload.html +++ b/tests/wpt/web-platform-tests/element-timing/buffer-before-onload.html @@ -13,7 +13,7 @@ is available from the observer with the buffered flag set to true. */ async_test(function(t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); beforeRender = performance.now(); const img = document.createElement('img'); img.src = 'resources/square20.jpg'; diff --git a/tests/wpt/web-platform-tests/element-timing/buffered-flag.html b/tests/wpt/web-platform-tests/element-timing/buffered-flag.html index 1fca1178792..e7fcf059fb1 100644 --- a/tests/wpt/web-platform-tests/element-timing/buffered-flag.html +++ b/tests/wpt/web-platform-tests/element-timing/buffered-flag.html @@ -12,7 +12,7 @@ body { <script src="resources/element-timing-helpers.js"></script> <script> async_test(t => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const beforeRender = performance.now(); const img = document.createElement('img'); // Initial observer used to know when entry has been dispatched diff --git a/tests/wpt/web-platform-tests/element-timing/cross-origin-element.sub.html b/tests/wpt/web-platform-tests/element-timing/cross-origin-element.sub.html index b5b06f30469..1052bf246d0 100644 --- a/tests/wpt/web-platform-tests/element-timing/cross-origin-element.sub.html +++ b/tests/wpt/web-platform-tests/element-timing/cross-origin-element.sub.html @@ -12,7 +12,7 @@ body { <script src="resources/element-timing-helpers.js"></script> <script> async_test((t) => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let img; const pathname = 'http://{{domains[www]}}:{{ports[http][1]}}' + '/element-timing/resources/square100.png'; diff --git a/tests/wpt/web-platform-tests/element-timing/cross-origin-iframe-element.sub.html b/tests/wpt/web-platform-tests/element-timing/cross-origin-iframe-element.sub.html index b183fe289aa..2f49933ab96 100644 --- a/tests/wpt/web-platform-tests/element-timing/cross-origin-iframe-element.sub.html +++ b/tests/wpt/web-platform-tests/element-timing/cross-origin-iframe-element.sub.html @@ -7,7 +7,7 @@ <script src="resources/element-timing-helpers.js"></script> <script> async_test((t) => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done((entryList) => { assert_unreached("We should not observe a cross origin element."); diff --git a/tests/wpt/web-platform-tests/element-timing/css-generated-text.html b/tests/wpt/web-platform-tests/element-timing/css-generated-text.html index 4b7dea73ca8..d1bbf5a7eee 100644 --- a/tests/wpt/web-platform-tests/element-timing/css-generated-text.html +++ b/tests/wpt/web-platform-tests/element-timing/css-generated-text.html @@ -17,7 +17,7 @@ body { <script> async_test(function (t) { const beforeRender = performance.now(); - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/disconnect-image.html b/tests/wpt/web-platform-tests/element-timing/disconnect-image.html index 9c2be0e45ac..6f9f2ce7b9f 100644 --- a/tests/wpt/web-platform-tests/element-timing/disconnect-image.html +++ b/tests/wpt/web-platform-tests/element-timing/disconnect-image.html @@ -9,7 +9,7 @@ let beforeRender; let img; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/element-only-when-fully-active.html b/tests/wpt/web-platform-tests/element-timing/element-only-when-fully-active.html index 001430516dc..ff08074d574 100644 --- a/tests/wpt/web-platform-tests/element-timing/element-only-when-fully-active.html +++ b/tests/wpt/web-platform-tests/element-timing/element-only-when-fully-active.html @@ -8,7 +8,7 @@ <script> let t = async_test('Only expose element attribute for fully active documents'); t.step(() => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); }); window.triggerTest = t.step_func_done(elementEntry => { assert_not_equals(elementEntry.element, null); diff --git a/tests/wpt/web-platform-tests/element-timing/first-letter-background.html b/tests/wpt/web-platform-tests/element-timing/first-letter-background.html index b24ed542c88..f05f2f92234 100644 --- a/tests/wpt/web-platform-tests/element-timing/first-letter-background.html +++ b/tests/wpt/web-platform-tests/element-timing/first-letter-background.html @@ -16,7 +16,7 @@ <script> let beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const div = document.getElementById('target'); let textObserved = false; let imageObserved = false; diff --git a/tests/wpt/web-platform-tests/element-timing/fixed-id-identifier.html b/tests/wpt/web-platform-tests/element-timing/fixed-id-identifier.html index ae8303f021d..749b9ada2f3 100644 --- a/tests/wpt/web-platform-tests/element-timing/fixed-id-identifier.html +++ b/tests/wpt/web-platform-tests/element-timing/fixed-id-identifier.html @@ -8,7 +8,7 @@ <p elementtiming='my_identifier' id='my_id'>Text</p> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/image-TAO.sub.html b/tests/wpt/web-platform-tests/element-timing/image-TAO.sub.html index ee2b0617900..7b455dfa4c4 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-TAO.sub.html +++ b/tests/wpt/web-platform-tests/element-timing/image-TAO.sub.html @@ -7,7 +7,7 @@ <script src="resources/element-timing-helpers.js"></script> <script> async_test(t => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const beforeRender = performance.now(); const remote_img = 'http://{{domains[www]}}:{{ports[http][1]}}/element-timing/resources/TAOImage.py?' + 'origin=' + window.location.origin +'&tao='; diff --git a/tests/wpt/web-platform-tests/element-timing/image-carousel.html b/tests/wpt/web-platform-tests/element-timing/image-carousel.html index ce6ac951e24..2b3b618f8c4 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-carousel.html +++ b/tests/wpt/web-platform-tests/element-timing/image-carousel.html @@ -26,7 +26,7 @@ body { <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const beforeRenderTimes = []; let entry_count = 0; const entry_count_per_element = [0, 0]; diff --git a/tests/wpt/web-platform-tests/element-timing/image-clipped-svg.html b/tests/wpt/web-platform-tests/element-timing/image-clipped-svg.html index c8e4a67cea6..4c2bb360794 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-clipped-svg.html +++ b/tests/wpt/web-platform-tests/element-timing/image-clipped-svg.html @@ -7,7 +7,7 @@ <script> let beforeRender; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/image-data-uri.html b/tests/wpt/web-platform-tests/element-timing/image-data-uri.html index afe203ae1bf..02d88fb2448 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-data-uri.html +++ b/tests/wpt/web-platform-tests/element-timing/image-data-uri.html @@ -16,7 +16,7 @@ body { <script> let beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/image-not-added.html b/tests/wpt/web-platform-tests/element-timing/image-not-added.html index 83a6cc60844..d77049ecd49 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-not-added.html +++ b/tests/wpt/web-platform-tests/element-timing/image-not-added.html @@ -5,7 +5,7 @@ <script src="/resources/testharnessreport.js"></script> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(() => { // The image should not have caused an entry, so fail test. diff --git a/tests/wpt/web-platform-tests/element-timing/image-not-fully-visible.html b/tests/wpt/web-platform-tests/element-timing/image-not-fully-visible.html index c51c24a965a..504d17592f2 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-not-fully-visible.html +++ b/tests/wpt/web-platform-tests/element-timing/image-not-fully-visible.html @@ -14,7 +14,7 @@ body { let beforeRender; let img; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/image-rect-iframe.html b/tests/wpt/web-platform-tests/element-timing/image-rect-iframe.html index a97ed5a8507..00986366e61 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-rect-iframe.html +++ b/tests/wpt/web-platform-tests/element-timing/image-rect-iframe.html @@ -11,7 +11,7 @@ body { <script src="/resources/testharnessreport.js"></script> <script> async_test((t) => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); on_event(window, 'message', e => { assert_equals(e.data.length, 1); assert_equals(e.data.entryType, 'element'); diff --git a/tests/wpt/web-platform-tests/element-timing/image-src-change.html b/tests/wpt/web-platform-tests/element-timing/image-src-change.html index e9e13742a65..88436123fe9 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-src-change.html +++ b/tests/wpt/web-platform-tests/element-timing/image-src-change.html @@ -13,7 +13,7 @@ body { <img src='resources/square100.png' elementtiming='my_image' id='my_id'/> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let beforeRender = performance.now(); const img = document.getElementById('my_id'); let firstCallback = true; diff --git a/tests/wpt/web-platform-tests/element-timing/image-with-css-scale.html b/tests/wpt/web-platform-tests/element-timing/image-with-css-scale.html index 9bd71086a75..a0490f375cc 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-with-css-scale.html +++ b/tests/wpt/web-platform-tests/element-timing/image-with-css-scale.html @@ -21,7 +21,7 @@ body { <script> const beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/image-with-rotation.html b/tests/wpt/web-platform-tests/element-timing/image-with-rotation.html index 64ff942f0cd..229e9ae96c8 100644 --- a/tests/wpt/web-platform-tests/element-timing/image-with-rotation.html +++ b/tests/wpt/web-platform-tests/element-timing/image-with-rotation.html @@ -21,7 +21,7 @@ body { <script> const beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/images-repeated-resource.html b/tests/wpt/web-platform-tests/element-timing/images-repeated-resource.html index 6090e75f26e..f7296e05e73 100644 --- a/tests/wpt/web-platform-tests/element-timing/images-repeated-resource.html +++ b/tests/wpt/web-platform-tests/element-timing/images-repeated-resource.html @@ -20,7 +20,7 @@ body { let img; let img2; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/invisible-images.html b/tests/wpt/web-platform-tests/element-timing/invisible-images.html index 8225996e255..ffde3ce2f6f 100644 --- a/tests/wpt/web-platform-tests/element-timing/invisible-images.html +++ b/tests/wpt/web-platform-tests/element-timing/invisible-images.html @@ -16,7 +16,7 @@ </style> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done((entries) => { // The image should not have caused an entry, so fail test. diff --git a/tests/wpt/web-platform-tests/element-timing/multiple-background-images.html b/tests/wpt/web-platform-tests/element-timing/multiple-background-images.html index c2a32c3c8e6..380e5e825e1 100644 --- a/tests/wpt/web-platform-tests/element-timing/multiple-background-images.html +++ b/tests/wpt/web-platform-tests/element-timing/multiple-background-images.html @@ -18,7 +18,7 @@ body { <script> let beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let numObservedElements = 0; let observedCircle = false; let observedSquare = false; diff --git a/tests/wpt/web-platform-tests/element-timing/multiple-redirects-TAO.html b/tests/wpt/web-platform-tests/element-timing/multiple-redirects-TAO.html index 6800f7cf687..3a45b552bea 100644 --- a/tests/wpt/web-platform-tests/element-timing/multiple-redirects-TAO.html +++ b/tests/wpt/web-platform-tests/element-timing/multiple-redirects-TAO.html @@ -11,7 +11,7 @@ <body> <script> async_test(t => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let destUrl = get_host_info().HTTP_REMOTE_ORIGIN + '/element-timing/resources/multiple-redirects.py?'; destUrl += 'redirect_count=2'; diff --git a/tests/wpt/web-platform-tests/element-timing/observe-background-image.html b/tests/wpt/web-platform-tests/element-timing/observe-background-image.html index e02714b7021..6a43401cd0f 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-background-image.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-background-image.html @@ -18,7 +18,7 @@ body { <script> let beforeRender = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/observe-child-element.html b/tests/wpt/web-platform-tests/element-timing/observe-child-element.html index 4293e814eb9..c8071998c52 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-child-element.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-child-element.html @@ -12,7 +12,7 @@ body { <script src="resources/element-timing-helpers.js"></script> <script> async_test((t) => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done((entryList) => { assert_unreached("Should not have received an entry!"); diff --git a/tests/wpt/web-platform-tests/element-timing/observe-elementtiming.html b/tests/wpt/web-platform-tests/element-timing/observe-elementtiming.html index ee8960bd728..a204f0d6772 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-elementtiming.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-elementtiming.html @@ -14,7 +14,7 @@ body { let beforeRender; let img; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/observe-empty-attribute.html b/tests/wpt/web-platform-tests/element-timing/observe-empty-attribute.html index 25d3492f73b..baec6ee48d7 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-empty-attribute.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-empty-attribute.html @@ -7,7 +7,7 @@ <script> let beforeRender; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let observedImage = false; let observedText = false; const observer = new PerformanceObserver( diff --git a/tests/wpt/web-platform-tests/element-timing/observe-multiple-images.html b/tests/wpt/web-platform-tests/element-timing/observe-multiple-images.html index 9a0657aa60f..c5ea700553b 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-multiple-images.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-multiple-images.html @@ -22,7 +22,7 @@ body { <script> let beforeRender, image1Observed=0, image2Observed=0, image3Observed=0; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func(function(entryList) { entryList.getEntries().forEach( entry => { diff --git a/tests/wpt/web-platform-tests/element-timing/observe-shadow-image.html b/tests/wpt/web-platform-tests/element-timing/observe-shadow-image.html index 1c12c5fe031..e2a81d62449 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-shadow-image.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-shadow-image.html @@ -12,7 +12,7 @@ body { <div id='target'></div> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_unreached('Should not observe elements in shadow trees!'); diff --git a/tests/wpt/web-platform-tests/element-timing/observe-shadow-text.html b/tests/wpt/web-platform-tests/element-timing/observe-shadow-text.html index 3167a1225c5..6e6347e60d2 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-shadow-text.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-shadow-text.html @@ -12,7 +12,7 @@ body { <div id='target'></div> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_unreached('Should not observe text elements in shadow trees!'); diff --git a/tests/wpt/web-platform-tests/element-timing/observe-svg-image.html b/tests/wpt/web-platform-tests/element-timing/observe-svg-image.html index 83ca4f40aae..737f94f92bc 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-svg-image.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-svg-image.html @@ -7,7 +7,7 @@ <script> let beforeRender; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/observe-text.html b/tests/wpt/web-platform-tests/element-timing/observe-text.html index a054b261726..5d8955269f8 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-text.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-text.html @@ -15,7 +15,7 @@ p { <script src="resources/element-timing-helpers.js"></script> <script> async_test((t) => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let paragraph; let beforeRender; const observer = new PerformanceObserver( diff --git a/tests/wpt/web-platform-tests/element-timing/observe-video-poster.html b/tests/wpt/web-platform-tests/element-timing/observe-video-poster.html index f64da173c6f..56077335296 100644 --- a/tests/wpt/web-platform-tests/element-timing/observe-video-poster.html +++ b/tests/wpt/web-platform-tests/element-timing/observe-video-poster.html @@ -7,7 +7,7 @@ <script> let beforeRender; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/progressively-loaded-image.html b/tests/wpt/web-platform-tests/element-timing/progressively-loaded-image.html index 0d59052cf3a..6695d8f9c32 100644 --- a/tests/wpt/web-platform-tests/element-timing/progressively-loaded-image.html +++ b/tests/wpt/web-platform-tests/element-timing/progressively-loaded-image.html @@ -14,7 +14,7 @@ let numInitial = 75; let sleep = 500; async_test(function(t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const img_src = 'resources/progressive-image.py?name=square20.jpg&numInitial=' + numInitial + '&sleep=' + sleep; const observer = new PerformanceObserver( diff --git a/tests/wpt/web-platform-tests/element-timing/rectangular-image.html b/tests/wpt/web-platform-tests/element-timing/rectangular-image.html index a97c549a9aa..65f190e7530 100644 --- a/tests/wpt/web-platform-tests/element-timing/rectangular-image.html +++ b/tests/wpt/web-platform-tests/element-timing/rectangular-image.html @@ -14,7 +14,7 @@ body { let beforeRender; let img; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/element-timing/redirects-tao-star.html b/tests/wpt/web-platform-tests/element-timing/redirects-tao-star.html index f8e4d19bd07..e5067d3d6bd 100644 --- a/tests/wpt/web-platform-tests/element-timing/redirects-tao-star.html +++ b/tests/wpt/web-platform-tests/element-timing/redirects-tao-star.html @@ -11,7 +11,7 @@ <body> <script> async_test(t => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); let destUrl = get_host_info().HTTP_REMOTE_ORIGIN + '/resource-timing/resources/multi_redirect.py?'; destUrl += 'page_origin=' + get_host_info().HTTP_ORIGIN; diff --git a/tests/wpt/web-platform-tests/element-timing/retrievability.html b/tests/wpt/web-platform-tests/element-timing/retrievability.html index 5c6113bdc93..cd2c2a956e1 100644 --- a/tests/wpt/web-platform-tests/element-timing/retrievability.html +++ b/tests/wpt/web-platform-tests/element-timing/retrievability.html @@ -7,7 +7,7 @@ <script> let img; async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const beforeRender = performance.now(); new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/element-timing/same-origin-redirects.html b/tests/wpt/web-platform-tests/element-timing/same-origin-redirects.html index 3527d805f3e..e52fcecc1ae 100644 --- a/tests/wpt/web-platform-tests/element-timing/same-origin-redirects.html +++ b/tests/wpt/web-platform-tests/element-timing/same-origin-redirects.html @@ -10,7 +10,7 @@ <body> <script> async_test(t => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); // First redirect let destUrl = '/common/redirect.py?location=' // Second redirect diff --git a/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html b/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html index ca06e91c530..0508d2bcf99 100644 --- a/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html +++ b/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html @@ -15,7 +15,7 @@ <p elementtiming='observeMe'>Test text</p> <script> async_test((t) => { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver(t.step_func_done(() => {})); observer.observe({type: 'element', buffered: true}); window.onload = () => { diff --git a/tests/wpt/web-platform-tests/element-timing/text-with-display-style.html b/tests/wpt/web-platform-tests/element-timing/text-with-display-style.html index faf644fd8d2..94e89fcf727 100644 --- a/tests/wpt/web-platform-tests/element-timing/text-with-display-style.html +++ b/tests/wpt/web-platform-tests/element-timing/text-with-display-style.html @@ -21,7 +21,7 @@ h3 { <h3 id='title3' elementtiming='h3'>I am h3</h3> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const beforeRender = performance.now(); let observedFlex = false; let observedGrid = false; diff --git a/tests/wpt/web-platform-tests/element-timing/toJSON.html b/tests/wpt/web-platform-tests/element-timing/toJSON.html index ba13a0fa907..24c7d1e0a65 100644 --- a/tests/wpt/web-platform-tests/element-timing/toJSON.html +++ b/tests/wpt/web-platform-tests/element-timing/toJSON.html @@ -8,7 +8,7 @@ <img elementtiming='img' src="resources/square100.png"/> <script> async_test(function (t) { - assert_precondition(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); + assert_implements(window.PerformanceElementTiming, "PerformanceElementTiming is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { assert_equals(entryList.getEntries().length, 1); diff --git a/tests/wpt/web-platform-tests/event-timing/buffered-flag.html b/tests/wpt/web-platform-tests/event-timing/buffered-flag.html index dc70ff253ff..7ee152be938 100644 --- a/tests/wpt/web-platform-tests/event-timing/buffered-flag.html +++ b/tests/wpt/web-platform-tests/event-timing/buffered-flag.html @@ -12,7 +12,7 @@ let firstInputSeen = false; let eventSeen = false; async_test(t => { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); const validateEntry = t.step_func(entry => { if (entry.entryType === 'first-input') firstInputSeen = true; diff --git a/tests/wpt/web-platform-tests/event-timing/click-timing.html b/tests/wpt/web-platform-tests/event-timing/click-timing.html index 376372a3f11..4544734f73f 100644 --- a/tests/wpt/web-platform-tests/event-timing/click-timing.html +++ b/tests/wpt/web-platform-tests/event-timing/click-timing.html @@ -21,7 +21,7 @@ let timeAfterSecondClick; let observedEntries = []; async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); new PerformanceObserver(t.step_func(entryList => { observedEntries = observedEntries.concat(entryList.getEntries().filter( entry => entry.name === 'mousedown')); diff --git a/tests/wpt/web-platform-tests/event-timing/crossiframe.html b/tests/wpt/web-platform-tests/event-timing/crossiframe.html index 55e2becfcbc..71140868434 100644 --- a/tests/wpt/web-platform-tests/event-timing/crossiframe.html +++ b/tests/wpt/web-platform-tests/event-timing/crossiframe.html @@ -48,7 +48,7 @@ } promise_test(async t => { - assert_precondition(window.PerformanceEventTiming, "Event Timing is not supported"); + assert_implements(window.PerformanceEventTiming, "Event Timing is not supported"); clickTimeMin = performance.now(); let observedEntries = false; const observerPromise = new Promise(resolve => { diff --git a/tests/wpt/web-platform-tests/event-timing/event-click-counts.html b/tests/wpt/web-platform-tests/event-timing/event-click-counts.html index 034e172c1df..d4e87c58969 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-click-counts.html +++ b/tests/wpt/web-platform-tests/event-timing/event-click-counts.html @@ -10,7 +10,7 @@ <button id='button'>Click me</button> <script> promise_test( t => { - assert_precondition(window.EventCounts, "Event Counts isn't supported"); + assert_implements(window.EventCounts, "Event Counts isn't supported"); function testClicks(expectedCount, resolve) { const clickCount = performance.eventCounts.get('click'); if (clickCount < expectedCount) { diff --git a/tests/wpt/web-platform-tests/event-timing/event-counts-zero.html b/tests/wpt/web-platform-tests/event-timing/event-counts-zero.html index 0cc9e2ee38a..3ec90dd6913 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-counts-zero.html +++ b/tests/wpt/web-platform-tests/event-timing/event-counts-zero.html @@ -8,7 +8,7 @@ <script src=/resources/testdriver-vendor.js></script> <script> test(() => { - assert_precondition(window.EventCounts, "Event Counts isn't supported"); + assert_implements(window.EventCounts, "Event Counts isn't supported"); const eventTypes = [ 'auxclick', 'click', diff --git a/tests/wpt/web-platform-tests/event-timing/only-observe-firstInput.html b/tests/wpt/web-platform-tests/event-timing/only-observe-firstInput.html index ad71153d40b..54a6036f91a 100644 --- a/tests/wpt/web-platform-tests/event-timing/only-observe-firstInput.html +++ b/tests/wpt/web-platform-tests/event-timing/only-observe-firstInput.html @@ -20,7 +20,7 @@ PerformanceObserver should observe one and only one entry. */ async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); let hasObservedFirstInput = false; new PerformanceObserver(t.step_func((entryList) => { assert_false(hasObservedFirstInput); diff --git a/tests/wpt/web-platform-tests/event-timing/programmatic-click-not-observed.html b/tests/wpt/web-platform-tests/event-timing/programmatic-click-not-observed.html index 1c2921ca489..0a189b0bc2a 100644 --- a/tests/wpt/web-platform-tests/event-timing/programmatic-click-not-observed.html +++ b/tests/wpt/web-platform-tests/event-timing/programmatic-click-not-observed.html @@ -18,7 +18,7 @@ delayCalled = true; } async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); const observer = new PerformanceObserver(t.step_func_done((entryList) => { const entries = entryList.getEntries().filter(e => e.name === 'mousedown'); // There must only be one click entry: from the clickAndBlockMain() call. diff --git a/tests/wpt/web-platform-tests/event-timing/retrievability.html b/tests/wpt/web-platform-tests/event-timing/retrievability.html index d2b6da2439f..087cd13184b 100644 --- a/tests/wpt/web-platform-tests/event-timing/retrievability.html +++ b/tests/wpt/web-platform-tests/event-timing/retrievability.html @@ -30,7 +30,7 @@ Validate entries */ async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); new PerformanceObserver(t.step_func_done(() => { validateEntries(); t.done(); diff --git a/tests/wpt/web-platform-tests/event-timing/retrieve-firstInput.html b/tests/wpt/web-platform-tests/event-timing/retrieve-firstInput.html index acff788259f..27b17cd1816 100644 --- a/tests/wpt/web-platform-tests/event-timing/retrieve-firstInput.html +++ b/tests/wpt/web-platform-tests/event-timing/retrieve-firstInput.html @@ -12,7 +12,7 @@ <script> async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); function testEntries() { // First callback is not ensured to have the entry. if (performance.getEntriesByType('first-input').length === 0) { diff --git a/tests/wpt/web-platform-tests/event-timing/supported-types.window.js b/tests/wpt/web-platform-tests/event-timing/supported-types.window.js index 5360bdd9e82..1cc43495c09 100644 --- a/tests/wpt/web-platform-tests/event-timing/supported-types.window.js +++ b/tests/wpt/web-platform-tests/event-timing/supported-types.window.js @@ -1,6 +1,6 @@ test(() => { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); - assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); const types = PerformanceObserver.supportedEntryTypes; assert_true(types.includes("first-input"), diff --git a/tests/wpt/web-platform-tests/event-timing/timingconditions.html b/tests/wpt/web-platform-tests/event-timing/timingconditions.html index 02da2976cee..12280cb894a 100644 --- a/tests/wpt/web-platform-tests/event-timing/timingconditions.html +++ b/tests/wpt/web-platform-tests/event-timing/timingconditions.html @@ -35,7 +35,7 @@ } async_test(function(t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); new PerformanceObserver(t.step_func_done(entryList => { const observerCallbackTime = performance.now(); const entries = entryList.getEntries().filter( diff --git a/tests/wpt/web-platform-tests/event-timing/toJSON.html b/tests/wpt/web-platform-tests/event-timing/toJSON.html index a11073aa9a0..a2d7df42da5 100644 --- a/tests/wpt/web-platform-tests/event-timing/toJSON.html +++ b/tests/wpt/web-platform-tests/event-timing/toJSON.html @@ -10,7 +10,7 @@ <button id='button'>Generate a 'click' event</button> <script> async_test(function (t) { - assert_precondition(window.PerformanceEventTiming, 'Event Timing is not supported.'); + assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { const entry = entryList.getEntries()[0]; diff --git a/tests/wpt/web-platform-tests/fetch/metadata/portal.https.sub.html b/tests/wpt/web-platform-tests/fetch/metadata/portal.https.sub.html index 96067ae82ab..8403a296fe1 100644 --- a/tests/wpt/web-platform-tests/fetch/metadata/portal.https.sub.html +++ b/tests/wpt/web-platform-tests/fetch/metadata/portal.https.sub.html @@ -12,7 +12,7 @@ function create_test(host, expectations) { async_test(t => { - assert_precondition("HTMLPortalElement" in window, "Portals are not supported."); + assert_implements("HTMLPortalElement" in window, "Portals are not supported."); let p = document.createElement('portal'); p.addEventListener('message', t.step_func(e => { diff --git a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/reporting-empty-frame.html.headers b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/reporting-empty-frame.html.headers index 66302f108fd..b7c8b304178 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/reporting-empty-frame.html.headers +++ b/tests/wpt/web-platform-tests/html/cross-origin-embedder-policy/resources/reporting-empty-frame.html.headers @@ -1,2 +1,2 @@ cross-origin-embedder-policy: require-corp; report-to="endpoint" -cross-origin-embedder-policy-report-only: require-corp; report-to="report-only-endpoint"; +cross-origin-embedder-policy-report-only: require-corp; report-to="report-only-endpoint" diff --git a/tests/wpt/web-platform-tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html b/tests/wpt/web-platform-tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html index 1c0b312eb45..5f677b5f0f6 100644 --- a/tests/wpt/web-platform-tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html +++ b/tests/wpt/web-platform-tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html @@ -174,7 +174,7 @@ This table gets populated by the script. // wait for images to load await new Promise(resolve => window.onload = e => resolve()); for (const img of document.images) { - assert_precondition(img.complete); // either error state or loaded + assert_true(img.complete); // either error state or loaded } // get layout info from refs @@ -218,7 +218,7 @@ This table gets populated by the script. const allowedDelta = 3; // This is not using test() because promise_setup() only allows promise_test(). promise_test(async () => { - assert_precondition(input.type === input.getAttribute('type'), 'input type should be supported') + assert_equals(input.type, input.getAttribute('type'), 'input type should be supported') const offsetTopActual = row.firstChild.firstChild.offsetTop; assert_approx_equals(offsetTopActual, expectedOffsetTop(input), allowedDelta, '<span>.offsetTop'); }, testName(input.outerHTML)); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback.html index 3ade1effc4b..1b057bbeac3 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback.html @@ -12,7 +12,7 @@ for (const format of ['mp4', 'webm']) { promise_test(async (t) => { const video = document.createElement('video'); - assert_precondition(video.canPlayType(`video/${format}`), `${format} supported`); + assert_implements_optional(video.canPlayType(`video/${format}`), `${format} supported`); // Load the video and wait for initial resize event. video.src = `/media/400x300-red-resize-200x150-green.${format}`; diff --git a/tests/wpt/web-platform-tests/interfaces/netinfo.idl b/tests/wpt/web-platform-tests/interfaces/netinfo.idl index 72967839688..530deb998c4 100644 --- a/tests/wpt/web-platform-tests/interfaces/netinfo.idl +++ b/tests/wpt/web-platform-tests/interfaces/netinfo.idl @@ -36,7 +36,6 @@ interface NetworkInformation : EventTarget { readonly attribute Megabit downlinkMax; readonly attribute Megabit downlink; readonly attribute Millisecond rtt; - readonly attribute boolean saveData; attribute EventHandler onchange; }; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/contracted-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/contracted-image.html index ed6adfb2c7c..8816bf4ba99 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/contracted-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/contracted-image.html @@ -13,7 +13,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/cross-origin-image.sub.html b/tests/wpt/web-platform-tests/largest-contentful-paint/cross-origin-image.sub.html index be0c8a1e11e..0cfdd1791ba 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/cross-origin-image.sub.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/cross-origin-image.sub.html @@ -7,7 +7,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html index e0b3545c21c..55adff91f2f 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/expanded-image.html @@ -13,7 +13,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html b/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html index 80b8f1891fd..09fe1f5beb6 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/first-letter-background.html @@ -15,7 +15,7 @@ div { <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad = performance.now(); let observedFirstLetter = false; const observer = new PerformanceObserver( diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html b/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html index 7a01cb15943..97eb67e320e 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/first-paint-equals-lcp-text.html @@ -6,8 +6,8 @@ <script src="/resources/testharnessreport.js"></script> <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "PerformancePaintTiming is not implemented"); - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.PerformancePaintTiming, "PerformancePaintTiming is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let firstPaintTime = 0; let firstContentfulPaintTime = 0; let largestContentfulPaintTime = 0; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/iframe-content-not-observed.html b/tests/wpt/web-platform-tests/largest-contentful-paint/iframe-content-not-observed.html index ea8e0d79f38..e605e9f21f6 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/iframe-content-not-observed.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/iframe-content-not-observed.html @@ -8,7 +8,7 @@ <body> <script> async_test((t) => { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const observer = new PerformanceObserver( t.step_func_done(entryList => { assert_unreached("Should not have received an entry!"); diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html b/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html index cbe46f402b4..bd78476390c 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/image-src-change.html @@ -8,7 +8,7 @@ <img src='/images/blue.png' id='image_id'/> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad = performance.now(); let firstCallback = true; const observer = new PerformanceObserver( diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html index a571b8afe79..a9675386a08 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-image.html @@ -13,7 +13,7 @@ <p>More text!</p> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); const observer = new PerformanceObserver( t.step_func(entryList => { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html index af8bbc06b32..ca711f22411 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/larger-text.html @@ -18,7 +18,7 @@ <img src='/images/green-2x2.png'/> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeRender; const observer = new PerformanceObserver( t.step_func(entryList => { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html b/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html index f320b03df4d..2d19e73e60f 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/loadTime-after-appendChild.html @@ -7,7 +7,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad; const observer = new PerformanceObserver( t.step_func_done(entryList => { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html b/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html index ec8ddc3ec61..ee832c41043 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/multiple-redirects-TAO.html @@ -12,7 +12,7 @@ <body> <script> async_test(t => { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let destUrl = get_host_info().HTTP_REMOTE_ORIGIN + '/element-timing/resources/multiple-redirects.py?'; destUrl += 'redirect_count=2'; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-after-untrusted-scroll.html b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-after-untrusted-scroll.html index 4a1a214c833..c84f922e5e5 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-after-untrusted-scroll.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-after-untrusted-scroll.html @@ -7,7 +7,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-image.html index 58eb5364a92..707840671b1 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-image.html @@ -7,7 +7,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-text.html b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-text.html index 402fcd80195..a0a07d9422d 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/observe-text.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/observe-text.html @@ -11,7 +11,7 @@ p { </style> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeRender; const observer = new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html b/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html index 0667266e6d2..1daea61486c 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/redirects-tao-star.html @@ -11,7 +11,7 @@ <body> <script> async_test(t => { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let destUrl = get_host_info().HTTP_REMOTE_ORIGIN + '/resource-timing/resources/multi_redirect.py?'; destUrl += 'page_origin=' + get_host_info().HTTP_ORIGIN; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html b/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html index 8c3c8909099..a28409a848c 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/repeated-image.html @@ -13,7 +13,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeLoad = performance.now(); let firstCallback = true; const url = window.location.origin + '/images/black-rectangle.png'; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/resources/invisible-images.js b/tests/wpt/web-platform-tests/largest-contentful-paint/resources/invisible-images.js index fd13e9454de..bad078e35f0 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/resources/invisible-images.js +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/resources/invisible-images.js @@ -1,5 +1,5 @@ async_test(t => { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const observer = new PerformanceObserver( t.step_func(entryList => { entryList.getEntries().forEach(entry => { diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/same-origin-redirects.html b/tests/wpt/web-platform-tests/largest-contentful-paint/same-origin-redirects.html index e17fdbb69e6..b5cf9da2d12 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/same-origin-redirects.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/same-origin-redirects.html @@ -10,7 +10,7 @@ <body> <script> async_test(t => { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); // First redirect let destUrl = '/common/redirect.py?location=' // Second redirect diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/text-with-display-style.html b/tests/wpt/web-platform-tests/largest-contentful-paint/text-with-display-style.html index 24541541a8b..e041a9fc21a 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/text-with-display-style.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/text-with-display-style.html @@ -12,7 +12,7 @@ <h1 id='title'>I am a title!</h1> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); let beforeRender; /* In this test, we first observe a header with style 'display: flex'. * Once observed, we remove it and add a header with style 'display: grid'. diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/toJSON.html b/tests/wpt/web-platform-tests/largest-contentful-paint/toJSON.html index 25be5eb2dc9..36e2a7fdfa2 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/toJSON.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/toJSON.html @@ -7,7 +7,7 @@ <p>Text!</p> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { const entry = entryList.getEntries()[0]; diff --git a/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html b/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html index 535f30e2565..b3a29188630 100644 --- a/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html +++ b/tests/wpt/web-platform-tests/largest-contentful-paint/video-poster.html @@ -6,7 +6,7 @@ <script src="resources/largest-contentful-paint-helpers.js"></script> <script> async_test(function (t) { - assert_precondition(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); + assert_implements(window.LargestContentfulPaint, "LargestContentfulPaint is not implemented"); const beforeLoad = performance.now(); const observer = new PerformanceObserver( t.step_func_done(function(entryList) { diff --git a/tests/wpt/web-platform-tests/layout-instability/buffer-layout-shift.html b/tests/wpt/web-platform-tests/layout-instability/buffer-layout-shift.html index 50cabda8d20..705569f96cf 100644 --- a/tests/wpt/web-platform-tests/layout-instability/buffer-layout-shift.html +++ b/tests/wpt/web-platform-tests/layout-instability/buffer-layout-shift.html @@ -11,7 +11,7 @@ <script src="resources/util.js"></script> <script> promise_test(async t => { - assert_precondition(window.LayoutShift, 'Layout Instability is not supported.'); + assert_implements(window.LayoutShift, 'Layout Instability is not supported.'); // Wait for the initial render to complete. await waitForAnimationFrames(2); diff --git a/tests/wpt/web-platform-tests/layout-instability/buffered-flag.html b/tests/wpt/web-platform-tests/layout-instability/buffered-flag.html index 1d200712c28..1c672624732 100644 --- a/tests/wpt/web-platform-tests/layout-instability/buffered-flag.html +++ b/tests/wpt/web-platform-tests/layout-instability/buffered-flag.html @@ -11,7 +11,7 @@ <script src="resources/util.js"></script> <script> promise_test(async t => { - assert_precondition(window.LayoutShift, 'Layout Instability is not supported.'); + assert_implements(window.LayoutShift, 'Layout Instability is not supported.'); // Wait for the initial render to complete. await waitForAnimationFrames(2); diff --git a/tests/wpt/web-platform-tests/layout-instability/recent-input.html b/tests/wpt/web-platform-tests/layout-instability/recent-input.html index 52adbf723ea..292b683bcb5 100644 --- a/tests/wpt/web-platform-tests/layout-instability/recent-input.html +++ b/tests/wpt/web-platform-tests/layout-instability/recent-input.html @@ -22,7 +22,7 @@ let timeAfterClick; promise_test(async t => { - assert_precondition(window.LayoutShift, 'Layout Instability is not supported.'); + assert_implements(window.LayoutShift, 'Layout Instability is not supported.'); // Wait for the initial render to complete. await waitForAnimationFrames(2); diff --git a/tests/wpt/web-platform-tests/layout-instability/supported-layout-type.html b/tests/wpt/web-platform-tests/layout-instability/supported-layout-type.html index cee4b808c87..3ba209f50a4 100644 --- a/tests/wpt/web-platform-tests/layout-instability/supported-layout-type.html +++ b/tests/wpt/web-platform-tests/layout-instability/supported-layout-type.html @@ -7,8 +7,8 @@ <script src="/resources/testharnessreport.js"></script> <script> test(() => { - assert_precondition(window.LayoutShift, 'Layout Instability is not supported.'); - assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", + assert_implements(window.LayoutShift, 'Layout Instability is not supported.'); + assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported.'); assert_greater_than(PerformanceObserver.supportedEntryTypes.indexOf("layout-shift"), -1, "There should be an entry 'layout-shift' in PerformanceObserver.supportedEntryTypes"); diff --git a/tests/wpt/web-platform-tests/layout-instability/toJSON.html b/tests/wpt/web-platform-tests/layout-instability/toJSON.html index 00f074a4dd8..711cd238431 100644 --- a/tests/wpt/web-platform-tests/layout-instability/toJSON.html +++ b/tests/wpt/web-platform-tests/layout-instability/toJSON.html @@ -11,7 +11,7 @@ <script src="resources/util.js"></script> <script> promise_test(async t => { - assert_precondition(window.LayoutShift, 'Layout Instability is not supported.'); + assert_implements(window.LayoutShift, 'Layout Instability is not supported.'); // Wait for the initial render to complete. await waitForAnimationFrames(2); diff --git a/tests/wpt/web-platform-tests/longtask-timing/buffered-flag.window.js b/tests/wpt/web-platform-tests/longtask-timing/buffered-flag.window.js index f1ca54f5322..88e1363beba 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/buffered-flag.window.js +++ b/tests/wpt/web-platform-tests/longtask-timing/buffered-flag.window.js @@ -1,5 +1,5 @@ async_test(t => { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); new PerformanceObserver(t.step_func((entryList, obs) => { const observer = new PerformanceObserver(t.step_func_done(list => { let longtaskObserved = false; diff --git a/tests/wpt/web-platform-tests/longtask-timing/containerTypes.html b/tests/wpt/web-platform-tests/longtask-timing/containerTypes.html index 94daab793c6..5a703f3995c 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/containerTypes.html +++ b/tests/wpt/web-platform-tests/longtask-timing/containerTypes.html @@ -19,7 +19,7 @@ const Containers = [ ]; Containers.forEach(container => { promise_test(async t => { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const initialTime = performance.now(); return new Promise(resolve => { const observer = new PerformanceObserver(t.step_func(entryList => { diff --git a/tests/wpt/web-platform-tests/longtask-timing/long-microtask.window.js b/tests/wpt/web-platform-tests/longtask-timing/long-microtask.window.js index 9219fdb5c49..ef16f00dbe5 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/long-microtask.window.js +++ b/tests/wpt/web-platform-tests/longtask-timing/long-microtask.window.js @@ -1,5 +1,5 @@ async_test(function (t) { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); new PerformanceObserver( t.step_func_done(entryList => { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-attributes.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-attributes.html index 24540d7c22f..9af1c7bf95b 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-attributes.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-attributes.html @@ -10,7 +10,7 @@ <div id="log"></div> <script> async_test(function (t) { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const observer = new PerformanceObserver( t.step_func(function (entryList) { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe-crossorigin.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe-crossorigin.html index 20a94a1eef4..d0fdf742804 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe-crossorigin.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe-crossorigin.html @@ -10,7 +10,7 @@ <div id="log"></div> <script> async_test(function (t) { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const observer = new PerformanceObserver( t.step_func(function (entryList) { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe.html index 4feae7e55c1..4c325c42adb 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-childiframe.html @@ -11,7 +11,7 @@ <script> const initialTime = performance.now(); async_test(function (t) { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const observer = new PerformanceObserver( t.step_func(function (entryList) { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-externalscript.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-externalscript.html index db5c9db4a16..8636025cf28 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-externalscript.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-externalscript.html @@ -10,7 +10,7 @@ <div id="log"></div> <script> async_test(function (t) { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const observer = new PerformanceObserver( t.step_func(function (entryList) { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-parentiframe.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-parentiframe.html index c6b7e3e5838..7fd5fb672bd 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-parentiframe.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-parentiframe.html @@ -8,7 +8,7 @@ <script> const t = async_test(t => { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); window.addEventListener('message', t.step_func(e => { assert_equals(e.data['entryType'], 'longtask'); assert_equals(e.data['frame-attribution'], 'same-origin-ancestor'); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-raf.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-raf.html index 110ae751ee3..40508e1e677 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-raf.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-raf.html @@ -10,7 +10,7 @@ <div id="log"></div> <script> async_test(function (t) { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const observer = new PerformanceObserver( t.step_func(function (entryList) { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe-crossorigin.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe-crossorigin.html index ba9c7170626..d66fe0c63ba 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe-crossorigin.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe-crossorigin.html @@ -8,7 +8,7 @@ <script> async_test(t => { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); window.addEventListener('message', t.step_func(e => { assert_equals(e.data['entryType'], 'longtask'); assert_equals(e.data['frame-attribution'], 'cross-origin-unreachable'); diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe.html index 8f530fab069..396a9beeeaa 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-in-sibling-iframe.html @@ -8,7 +8,7 @@ <script> async_test(t => { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); window.addEventListener('message', t.step_func(e => { assert_equals(e.data['entryType'], 'longtask'); // Ignore any long task that may be produced by the top-level frame. diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-tojson.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-tojson.html index 6574b62d348..b1f9b3c9b1c 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/longtask-tojson.html +++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-tojson.html @@ -7,7 +7,7 @@ <body> <script> async_test(function (t) { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const observer = new PerformanceObserver( t.step_func(function (entryList) { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/shared-renderer/longtask-in-new-window.html b/tests/wpt/web-platform-tests/longtask-timing/shared-renderer/longtask-in-new-window.html index 18d36b1e734..7668d995d86 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/shared-renderer/longtask-in-new-window.html +++ b/tests/wpt/web-platform-tests/longtask-timing/shared-renderer/longtask-in-new-window.html @@ -11,7 +11,7 @@ This window opens a new window which contains a longtask. We test that the longtask from the new window is not observed by the observer of this window. */ async_test(t => { - assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); const observer = new PerformanceObserver( t.step_func(function (entryList) { const entries = entryList.getEntries(); diff --git a/tests/wpt/web-platform-tests/longtask-timing/supported-longtask-types.window.js b/tests/wpt/web-platform-tests/longtask-timing/supported-longtask-types.window.js index aaa6415a8d3..efb393ad844 100644 --- a/tests/wpt/web-platform-tests/longtask-timing/supported-longtask-types.window.js +++ b/tests/wpt/web-platform-tests/longtask-timing/supported-longtask-types.window.js @@ -1,5 +1,5 @@ test(() => { - assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); + assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); const types = PerformanceObserver.supportedEntryTypes; assert_true(types.includes("longtask"), "There should be 'longtask' in PerformanceObserver.supportedEntryTypes"); @@ -21,8 +21,8 @@ function syncWait(waitDuration) { const entryType = "longtask"; promise_test(async () => { - assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); - assert_precondition(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`); + assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); + assert_implements(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`); await new Promise((resolve) => { new PerformanceObserver(function (list, observer) { observer.disconnect(); diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-font-relative-lengths-001.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-font-relative-lengths-001.html new file mode 100644 index 00000000000..b18d7dbfbe2 --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/operators/mo-font-relative-lengths-001.html @@ -0,0 +1,113 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Font-relative lengths on an operator</title> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#dictionary-based-attributes"> +<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#embellished-operators"> +<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#definition-of-space-like-elements"> +<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#layout-of-mrow"> +<meta name="assert" content="Verify font-relative lengths refer to the core operator, not the embellished operator"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + math { + font: 100px/1 Ahem; + } + @font-face { + font-family: operators; + src: url("/fonts/math/operators.woff"); + } + mo { + font-family: operators; + } +</style> +<script> + setup({ explicit_done: true }); + window.addEventListener("load", () => { document.fonts.ready.then(runTests); }); + + function runTests() { + var epsilon = 1; + var baseSizePx = 100; + + test(function() { + var beforeRight = document.getElementById("before1").getBoundingClientRect().right; + var afterLeft = document.getElementById("after1").getBoundingClientRect().left; + var fontScalePercent = .5; + var lspaceEm = 1; + var moWidthEm = 1; + assert_approx_equals(afterLeft - beforeRight, baseSizePx * fontScalePercent * (lspaceEm + moWidthEm), epsilon, "baseSizePx * fontScalePercent * lspaceEm"); + }, `font-relative lspace refers to the core operator`); + + test(function() { + var beforeRight = document.getElementById("before2").getBoundingClientRect().right; + var afterLeft = document.getElementById("after2").getBoundingClientRect().left; + var fontScalePercent = 2; + var rspaceEm = 1; + var moWidthEm = 1; + assert_approx_equals(afterLeft - beforeRight, baseSizePx * fontScalePercent * (rspaceEm + moWidthEm), epsilon, "baseSizePx * fontScalePercent * rspaceEm"); + }, `font-relative rspace refers to the core operator`); + + test(function() { + var moStretchSize = document.getElementById("operator1").getBoundingClientRect().height; + var fontScalePercent = .5; + var minsizeEm = 8; + var beforeHeight = document.getElementById("before1").getBoundingClientRect().height; + + assert_approx_equals(moStretchSize, baseSizePx * minsizeEm * fontScalePercent, epsilon, "baseSizePx * fontScalePercent * minsizeEm"); + + // This is really testing the same thing but do make sure minsize is + // applied i.e. the unconstrained target size is less than the actual + // stretch size. + assert_approx_equals(beforeHeight, moStretchSize / 2, epsilon); + + }, `font-relative minsize refers to the core operator`); + + test(function() { + var moStretchSize = document.getElementById("operator2").getBoundingClientRect().height; + var fontScalePercent = 2; + var maxsizeEm = 1; + var afterHeight = document.getElementById("after2").getBoundingClientRect().height; + + assert_approx_equals(moStretchSize, baseSizePx * maxsizeEm * fontScalePercent, epsilon, "baseSizePx * fontScalePercent * maxsizeEm"); + + // This is really testing the same thing but do make sure maxsize is + // applied i.e. the unconstrained target size is more than the actual + // stretch size. + assert_approx_equals(afterHeight, 2 * moStretchSize, epsilon); + + }, `font-relative maxsize refers to the core operator`); + + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <p> + <math> + <mrow> + <mspace id="before1" width="1em" height="1em" depth="1em" style="background: blue"/> + <mrow style="font-size: 50%;"> + <mo id="operator1" lspace="1em" rspace="0em" minsize="8em">⥯</mo> + <mspace id="after1" width="1em" height=".5em" depth=".5em" style="background: green"/> + </mrow> + <mn><!-- not space like --></mn> + </mrow> + </math> + </p> + <p> + <math> + <mrow> + <mrow style="font-size: 200%"> + <mspace id="before2" width="1em" height=".5em" depth=".5em" style="background: green"/> + <mo id="operator2" lspace="0em" rspace="1em" maxsize="1em">⥯</mo> + </mrow> + <mspace id="after2" width="1em" height="2em" depth="2em" style="background: blue"/> + <mn><!-- not space like --></mn> + </mrow> + </math> + </p> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/paint-timing/basetest.html b/tests/wpt/web-platform-tests/paint-timing/basetest.html index d4dfe7ed822..1c875984598 100644 --- a/tests/wpt/web-platform-tests/paint-timing/basetest.html +++ b/tests/wpt/web-platform-tests/paint-timing/basetest.html @@ -9,7 +9,7 @@ <script> async_test(function(t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); t.step(function() { const bufferedEntries = performance.getEntriesByType('paint'); assert_equals(bufferedEntries.length, 0, "No paint entries yet"); diff --git a/tests/wpt/web-platform-tests/paint-timing/buffered-flag.window.js b/tests/wpt/web-platform-tests/paint-timing/buffered-flag.window.js index 4654c925ca0..b3a6a6374c7 100644 --- a/tests/wpt/web-platform-tests/paint-timing/buffered-flag.window.js +++ b/tests/wpt/web-platform-tests/paint-timing/buffered-flag.window.js @@ -1,5 +1,5 @@ async_test(t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); // First observer creates second in callback to ensure the entry has been dispatched by the time // the second observer begins observing. let entries_seen = 0; diff --git a/tests/wpt/web-platform-tests/paint-timing/child-painting-first-image.html b/tests/wpt/web-platform-tests/paint-timing/child-painting-first-image.html index d78af081ef8..a7ed2c6f101 100644 --- a/tests/wpt/web-platform-tests/paint-timing/child-painting-first-image.html +++ b/tests/wpt/web-platform-tests/paint-timing/child-painting-first-image.html @@ -5,7 +5,7 @@ <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); window.addEventListener('message', t.step_func(e => { assert_equals(e.data, '2 paint first-paint paint first-contentful-paint'); // When only child frame paints, expect only first-paint. diff --git a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html index 5f3c9d9983b..077c1aa3ddc 100644 --- a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html +++ b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html @@ -9,7 +9,7 @@ <canvas id="canvas" width="50" height="50"></canvas> <script> promise_test(async t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); await new Promise(r => window.addEventListener('load', r)); await assertNoFirstContentfulPaint(t); const canvas = document.getElementById('canvas'); diff --git a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html index 1d15812a0f3..b9f86d8dd73 100644 --- a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html +++ b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html @@ -16,7 +16,7 @@ <div id="main"></div> <script> promise_test(async t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); await new Promise(r => window.addEventListener('load', r)); await assertNoFirstContentfulPaint(t); }, 'Gradients should not count as contentful'); diff --git a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html index b22c618c119..0b7e568359f 100644 --- a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html +++ b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html @@ -9,7 +9,7 @@ <input id="input" type="text" /> <script> promise_test(async t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); await new Promise(r => window.addEventListener('load', r)); await assertNoFirstContentfulPaint(t); const input = document.getElementById('input'); diff --git a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html index 0f61b7e5289..cdfd1670715 100644 --- a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html +++ b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html @@ -9,7 +9,7 @@ <video id="video" autoplay></video> <script> promise_test(async t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); await new Promise(r => window.addEventListener('load', r)); await assertNoFirstContentfulPaint(t); // Set actual video content to trigger FCP. diff --git a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html index 5c1048ac0a7..eb9b1399b52 100644 --- a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html +++ b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html @@ -9,7 +9,7 @@ <video id="video" width="50" height="50"></video> <script> promise_test(async t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); await new Promise(r => window.addEventListener('load', r)); await assertNoFirstContentfulPaint(t); const video = document.getElementById('video'); diff --git a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html index 868d2fcaf8f..e9fc2857832 100644 --- a/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html +++ b/tests/wpt/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html @@ -19,7 +19,7 @@ <div id="text">TEXT</div> <script> promise_test(async t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); await new Promise(r => window.addEventListener('load', r)); await assertNoFirstContentfulPaint(t); document.body.style.direction = 'ltr' diff --git a/tests/wpt/web-platform-tests/paint-timing/first-contentful-bg-image.html b/tests/wpt/web-platform-tests/paint-timing/first-contentful-bg-image.html index 9c3b2200fb6..3da3d2553ee 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-contentful-bg-image.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-contentful-bg-image.html @@ -11,7 +11,7 @@ <footer> <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); const body = document.getElementsByTagName('body')[0]; body.style.backgroundImage = 'url(resources/circles.png)'; window.onload = function() { diff --git a/tests/wpt/web-platform-tests/paint-timing/first-contentful-canvas.html b/tests/wpt/web-platform-tests/paint-timing/first-contentful-canvas.html index ab47aa0c21c..667591cfe36 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-contentful-canvas.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-contentful-canvas.html @@ -9,7 +9,7 @@ <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); const canvas = document.getElementById("canvas"); const context = canvas.getContext("2d"); context.beginPath(); diff --git a/tests/wpt/web-platform-tests/paint-timing/first-contentful-image.html b/tests/wpt/web-platform-tests/paint-timing/first-contentful-image.html index 034391c796c..5c29bfe070f 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-contentful-image.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-contentful-image.html @@ -9,7 +9,7 @@ <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); const img = document.createElement("IMG"); img.src = "resources/circles.png"; img.onload = function() { diff --git a/tests/wpt/web-platform-tests/paint-timing/first-contentful-paint.html b/tests/wpt/web-platform-tests/paint-timing/first-contentful-paint.html index 67d7b95eaa5..de2ac035232 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-contentful-paint.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-contentful-paint.html @@ -10,7 +10,7 @@ <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); const bufferedEntries = performance.getEntriesByType('paint'); assert_equals(bufferedEntries.length, 0, "No paint entries yet"); const div = document.createElement("div"); diff --git a/tests/wpt/web-platform-tests/paint-timing/first-contentful-svg.html b/tests/wpt/web-platform-tests/paint-timing/first-contentful-svg.html index 8cda11c9567..9909ec659ef 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-contentful-svg.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-contentful-svg.html @@ -9,7 +9,7 @@ <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); const img = document.createElement("IMG"); img.src = "resources/circle.svg"; img.onload = function() { diff --git a/tests/wpt/web-platform-tests/paint-timing/first-image-child.html b/tests/wpt/web-platform-tests/paint-timing/first-image-child.html index 3f073144692..9b48ff89056 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-image-child.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-image-child.html @@ -10,7 +10,7 @@ <img src='resources/circles.png'/> <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); window.addEventListener('message', t.step_func(e => { // Child iframe should not have any paint-timing entries. diff --git a/tests/wpt/web-platform-tests/paint-timing/first-paint-bg-color.html b/tests/wpt/web-platform-tests/paint-timing/first-paint-bg-color.html index 5e863794d41..21271da4cef 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-paint-bg-color.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-paint-bg-color.html @@ -11,7 +11,7 @@ <footer> <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); document.body.style.backgroundColor = "#AA0000"; function testPaintEntries() { diff --git a/tests/wpt/web-platform-tests/paint-timing/first-paint-only.html b/tests/wpt/web-platform-tests/paint-timing/first-paint-only.html index ea735a246b3..99f41f97b17 100644 --- a/tests/wpt/web-platform-tests/paint-timing/first-paint-only.html +++ b/tests/wpt/web-platform-tests/paint-timing/first-paint-only.html @@ -9,7 +9,7 @@ <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); const div = document.createElement("div"); div.style.width = "100px"; div.style.height = "100px"; diff --git a/tests/wpt/web-platform-tests/paint-timing/paint-visited.html b/tests/wpt/web-platform-tests/paint-timing/paint-visited.html index 9a5561d5f7f..d611197b288 100644 --- a/tests/wpt/web-platform-tests/paint-timing/paint-visited.html +++ b/tests/wpt/web-platform-tests/paint-timing/paint-visited.html @@ -21,7 +21,7 @@ window.onload = function() { history.replaceState({}, "", current_url); } async_test(function(t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); function testPaintEntries() { const bufferedEntries = performance.getEntriesByType('paint'); if (bufferedEntries.length < 2) { diff --git a/tests/wpt/web-platform-tests/paint-timing/resources/utils.js b/tests/wpt/web-platform-tests/paint-timing/resources/utils.js index a1fb993eb90..2ee0e3d0626 100644 --- a/tests/wpt/web-platform-tests/paint-timing/resources/utils.js +++ b/tests/wpt/web-platform-tests/paint-timing/resources/utils.js @@ -36,7 +36,7 @@ async function test_fcp(label) { const style = document.createElement('style'); document.head.appendChild(style); await promise_test(async t => { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); const main = document.getElementById('main'); await new Promise(r => window.addEventListener('load', r)); await assertNoFirstContentfulPaint(t); diff --git a/tests/wpt/web-platform-tests/paint-timing/sibling-painting-first-image.html b/tests/wpt/web-platform-tests/paint-timing/sibling-painting-first-image.html index 16a6f145db0..d8fec53047f 100644 --- a/tests/wpt/web-platform-tests/paint-timing/sibling-painting-first-image.html +++ b/tests/wpt/web-platform-tests/paint-timing/sibling-painting-first-image.html @@ -6,7 +6,7 @@ <iframe id="listening-iframe" src="resources/subframe-sending-paint.html"></iframe> <script> async_test(function (t) { - assert_precondition(window.PerformancePaintTiming, "Paint Timing isn't supported."); + assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); let paintingIframeHasDispatchedEntries = false; window.addEventListener('message', t.step_func(e => { if (!paintingIframeHasDispatchedEntries) { diff --git a/tests/wpt/web-platform-tests/paint-timing/supported-paint-type.window.js b/tests/wpt/web-platform-tests/paint-timing/supported-paint-type.window.js index c2c3cf5d6dd..518faff5cfb 100644 --- a/tests/wpt/web-platform-tests/paint-timing/supported-paint-type.window.js +++ b/tests/wpt/web-platform-tests/paint-timing/supported-paint-type.window.js @@ -1,13 +1,13 @@ test(() => { - assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); + assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); assert_true(PerformanceObserver.supportedEntryTypes.includes("paint"), "There should be an entry 'paint' in PerformanceObserver.supportedEntryTypes"); }, "supportedEntryTypes contains 'paint'."); const entryType = 'paint'; promise_test(async() => { - assert_precondition(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); - assert_precondition(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`); + assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined", 'supportedEntryTypes is not supported'); + assert_implements(typeof PerformanceObserver.supportedEntryTypes.includes(entryType), `supportedEntryTypes does not include '${entryType}'`); await new Promise((resolve) => { new PerformanceObserver(function (list, observer) { observer.disconnect(); diff --git a/tests/wpt/web-platform-tests/performance-timeline/po-observe-type.any.js b/tests/wpt/web-platform-tests/performance-timeline/po-observe-type.any.js index 2c0719a8d14..b9854cc1466 100644 --- a/tests/wpt/web-platform-tests/performance-timeline/po-observe-type.any.js +++ b/tests/wpt/web-platform-tests/performance-timeline/po-observe-type.any.js @@ -1,5 +1,15 @@ // META: script=performanceobservers.js +test(function () { + const obs = new PerformanceObserver(() => {}); + assert_throws_js(TypeError, function () { + obs.observe({}); + }); + assert_throws_js(TypeError, function () { + obs.observe({entryType: ['mark', 'measure']}); + }); +}, "Calling observe() without 'type' or 'entryTypes' throws a TypeError"); + test(() => { const obs = new PerformanceObserver(() =>{}); obs.observe({entryTypes: ["mark"]}); @@ -18,10 +28,10 @@ test(() => { test(() => { const obs = new PerformanceObserver(() =>{}); - assert_throws_dom("SyntaxError", function () { + assert_throws_js(TypeError, function () { obs.observe({type: "mark", entryTypes: ["measure"]}); }); -}, "Calling observe() with type and entryTypes should throw a SyntaxError"); +}, "Calling observe() with type and entryTypes should throw a TypeError"); test(function () { const obs = new PerformanceObserver(() =>{}); diff --git a/tests/wpt/web-platform-tests/performance-timeline/po-observe.any.js b/tests/wpt/web-platform-tests/performance-timeline/po-observe.any.js index 7d7de376b25..5b593374baf 100644 --- a/tests/wpt/web-platform-tests/performance-timeline/po-observe.any.js +++ b/tests/wpt/web-platform-tests/performance-timeline/po-observe.any.js @@ -1,34 +1,25 @@ // META: script=performanceobservers.js test(function () { - var obs = new PerformanceObserver(function () { return true; }); - assert_throws_dom("SyntaxError", function () { - obs.observe({}); - }); - assert_throws_dom("SyntaxError", function () { - obs.observe({entryType: []}); - }); - }, "no 'type' or 'entryTypes' throws a SyntaxError"); - test(function () { - var obs = new PerformanceObserver(function () { return true; }); + const obs = new PerformanceObserver(() => {}); assert_throws_js(TypeError, function () { obs.observe({entryTypes: "mark"}); }); }, "entryTypes must be a sequence or throw a TypeError"); test(function () { - var obs = new PerformanceObserver(function () { return true; }); + const obs = new PerformanceObserver(() => {}); obs.observe({entryTypes: []}); }, "Empty sequence entryTypes does not throw an exception."); test(function () { - var obs = new PerformanceObserver(function () { return true; }); + const obs = new PerformanceObserver(() => {}); obs.observe({entryTypes: ["this-cannot-match-an-entryType"]}); obs.observe({entryTypes: ["marks","navigate", "resources"]}); }, "Unknown entryTypes do not throw an exception."); test(function () { - var obs = new PerformanceObserver(function () { return true; }); + const obs = new PerformanceObserver(() => {}); obs.observe({entryTypes: ["mark","this-cannot-match-an-entryType"]}); obs.observe({entryTypes: ["this-cannot-match-an-entryType","mark"]}); obs.observe({entryTypes: ["mark"], others: true}); diff --git a/tests/wpt/web-platform-tests/portals/about-blank-cannot-host.html b/tests/wpt/web-platform-tests/portals/about-blank-cannot-host.html index 7aba015e69b..c43fbc93ba7 100644 --- a/tests/wpt/web-platform-tests/portals/about-blank-cannot-host.html +++ b/tests/wpt/web-platform-tests/portals/about-blank-cannot-host.html @@ -4,7 +4,7 @@ <script> promise_test(async (t) => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let hostWindow = window.open(); assert_equals(hostWindow.location.href, "about:blank"); diff --git a/tests/wpt/web-platform-tests/portals/csp/frame-src.sub.html b/tests/wpt/web-platform-tests/portals/csp/frame-src.sub.html index 1b37fd4ac21..13d9e79667f 100644 --- a/tests/wpt/web-platform-tests/portals/csp/frame-src.sub.html +++ b/tests/wpt/web-platform-tests/portals/csp/frame-src.sub.html @@ -6,7 +6,7 @@ </body> <script> async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var w = window.open("resources/frame-src.sub.html?frame_src_policy=%27none%27"); w.onload = function() { w.document.addEventListener("securitypolicyviolation", @@ -21,7 +21,7 @@ }, "Tests that a portal can't be loaded when it violates frame-src"); async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var w = window.open(`resources/frame-src.sub.html?frame_src_policy=http://{{hosts[][www]}}:{{ports[http][0]}}`); w.onload = function() { w.document.onsecuritypolicyviolation = t.unreached_func("Portal should load."); @@ -32,7 +32,7 @@ } }, "Tests that a portal can be loaded when the origin matches the frame-src CSP header."); async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var w = window.open(`resources/frame-src.sub.html?frame_src_policy=http://{{hosts[][www]}}:{{ports[http][0]}}`); w.onload = function() { var portal = w.document.createElement("portal"); diff --git a/tests/wpt/web-platform-tests/portals/history/history-manipulation-inside-portal.html b/tests/wpt/web-platform-tests/portals/history/history-manipulation-inside-portal.html index efbf1de136c..d4b0cf4db9e 100644 --- a/tests/wpt/web-platform-tests/portals/history/history-manipulation-inside-portal.html +++ b/tests/wpt/web-platform-tests/portals/history/history-manipulation-inside-portal.html @@ -16,42 +16,42 @@ } promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); assertInitialHistoryState(); await runTestInPortal(portalSrc, 'testHistoryPushStateInPortal'); assertInitialHistoryState(); }, 'history.pushState navigates independently with replacement in a portal'); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); assertInitialHistoryState(); await runTestInPortal(portalSrc, 'testHistoryReplaceStateInPortal'); assertInitialHistoryState(); }, 'history.replaceState navigates independently in a portal'); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); assertInitialHistoryState(); await runTestInPortal(portalSrc, 'testLocationAssignInPortal'); assertInitialHistoryState(); }, 'location.assign navigates independently with replacement in a portal'); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); assertInitialHistoryState(); await runTestInPortal(portalSrc, 'testLocationReplaceInPortal'); assertInitialHistoryState(); }, 'location.replace navigates independently in a portal'); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); assertInitialHistoryState(); await runTestInPortal(portalSrc, 'testSetLocationHrefInPortal'); assertInitialHistoryState(); }, 'Setting location.href navigates independently with replacement in a portal'); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); assertInitialHistoryState(); await runTestInPortal(portalSrc, 'testSyntheticAnchorClickInPortal'); assertInitialHistoryState(); diff --git a/tests/wpt/web-platform-tests/portals/htmlportalelement-event-handler-content-attributes.html b/tests/wpt/web-platform-tests/portals/htmlportalelement-event-handler-content-attributes.html index 04b4615205a..0836c8c00b5 100644 --- a/tests/wpt/web-platform-tests/portals/htmlportalelement-event-handler-content-attributes.html +++ b/tests/wpt/web-platform-tests/portals/htmlportalelement-event-handler-content-attributes.html @@ -7,7 +7,7 @@ let eventNames = ["load", "message", "messageerror"]; test(() => { try { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let portal = document.createElement("portal"); for (let eventName of eventNames) { window.testValue = "not fired"; diff --git a/tests/wpt/web-platform-tests/portals/portal-activate-data.html b/tests/wpt/web-platform-tests/portals/portal-activate-data.html index 260bb00ff06..54fdca5d8cd 100644 --- a/tests/wpt/web-platform-tests/portals/portal-activate-data.html +++ b/tests/wpt/web-platform-tests/portals/portal-activate-data.html @@ -13,7 +13,7 @@ function nextMessage(target) { } async function openPortalAndActivate(logic, activateOptions, testWindow) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); const w = testWindow || await openBlankPortalHost(); try { const portal = w.document.createElement('portal'); diff --git a/tests/wpt/web-platform-tests/portals/portal-activate-event.html b/tests/wpt/web-platform-tests/portals/portal-activate-event.html index 990dc2d4b85..69d8a7c930e 100644 --- a/tests/wpt/web-platform-tests/portals/portal-activate-event.html +++ b/tests/wpt/web-platform-tests/portals/portal-activate-event.html @@ -4,7 +4,7 @@ <script src="/resources/testharnessreport.js"></script> <script> async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let test = "eventlistener"; var bc = new BroadcastChannel(`test-${test}`); bc.onmessage = t.step_func_done(function(e) { @@ -16,7 +16,7 @@ }, "Tests that the PortalActivateEvent is dispatched when a portal is activated."); async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let test = "eventhandler"; var bc = new BroadcastChannel(`test-${test}`); bc.onmessage = t.step_func_done(function(e) { @@ -28,7 +28,7 @@ }, "Tests that the portalactivate event handler is dispatched when a portal is activated."); async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let test = "bodyeventhandler"; var bc = new BroadcastChannel(`test-${test}`); bc.onmessage = t.step_func_done(function(e) { diff --git a/tests/wpt/web-platform-tests/portals/portal-non-http-navigation.html b/tests/wpt/web-platform-tests/portals/portal-non-http-navigation.html index e2b5d3d3937..aa02c15efa9 100644 --- a/tests/wpt/web-platform-tests/portals/portal-non-http-navigation.html +++ b/tests/wpt/web-platform-tests/portals/portal-non-http-navigation.html @@ -5,7 +5,7 @@ <body> <script> async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = "data:text/html,empty portal"; portal.onload = t.unreached_func("Portal loaded data URL."); @@ -14,7 +14,7 @@ async_test(t => { }, "Tests that a portal can't navigate to a data URL."); async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = "about:blank"; portal.onload = t.unreached_func("Portal loaded about:blank."); @@ -23,7 +23,7 @@ async_test(t => { }, "Tests that a portal can't navigate to about:blank."); async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = "resources/simple-portal.html"; portal.onload = t.step_func(() => { diff --git a/tests/wpt/web-platform-tests/portals/portal-onload-event.html b/tests/wpt/web-platform-tests/portals/portal-onload-event.html index da770013e26..f6b97a814ed 100644 --- a/tests/wpt/web-platform-tests/portals/portal-onload-event.html +++ b/tests/wpt/web-platform-tests/portals/portal-onload-event.html @@ -4,7 +4,7 @@ <script src="/resources/testharnessreport.js"></script> <script> async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var w = window.open("resources/simple-portal.html"); w.onload = function() { var portal = w.document.createElement("portal"); diff --git a/tests/wpt/web-platform-tests/portals/portals-activate-empty-browsing-context.html b/tests/wpt/web-platform-tests/portals/portals-activate-empty-browsing-context.html index d904cd58543..b1787782ffd 100644 --- a/tests/wpt/web-platform-tests/portals/portals-activate-empty-browsing-context.html +++ b/tests/wpt/web-platform-tests/portals/portals-activate-empty-browsing-context.html @@ -4,7 +4,7 @@ <body> <script> promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let portal = document.createElement('portal'); document.body.appendChild(portal); t.add_cleanup(() => { document.body.removeChild(portal); }); @@ -13,7 +13,7 @@ promise_test(async t => { }, "A portal that has never been navigated cannot be activated"); promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let portal = document.createElement('portal'); document.body.appendChild(portal); t.add_cleanup(() => { document.body.removeChild(portal); }); diff --git a/tests/wpt/web-platform-tests/portals/portals-activate-inside-iframe.html b/tests/wpt/web-platform-tests/portals/portals-activate-inside-iframe.html index 587e483479c..f4039540961 100644 --- a/tests/wpt/web-platform-tests/portals/portals-activate-inside-iframe.html +++ b/tests/wpt/web-platform-tests/portals/portals-activate-inside-iframe.html @@ -4,7 +4,7 @@ <body> <script> promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var iframe = document.createElement("iframe"); iframe.src = "resources/portal-inside-iframe.html" var waitForLoad = new Promise((resolve, reject) => { diff --git a/tests/wpt/web-platform-tests/portals/portals-activate-inside-portal.html b/tests/wpt/web-platform-tests/portals/portals-activate-inside-portal.html index bd0d9e27bb6..19b57b3e42e 100644 --- a/tests/wpt/web-platform-tests/portals/portals-activate-inside-portal.html +++ b/tests/wpt/web-platform-tests/portals/portals-activate-inside-portal.html @@ -4,7 +4,7 @@ <body> <script> promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = "resources/portal-activate-inside-portal.html"; let waitForMessage = new Promise((resolve, reject) => { diff --git a/tests/wpt/web-platform-tests/portals/portals-activate-network-error.html b/tests/wpt/web-platform-tests/portals/portals-activate-network-error.html index c2094fd4ded..60ee5c902da 100644 --- a/tests/wpt/web-platform-tests/portals/portals-activate-network-error.html +++ b/tests/wpt/web-platform-tests/portals/portals-activate-network-error.html @@ -4,7 +4,7 @@ <body> <script> async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let portal = document.createElement('portal'); portal.src = "resources/invalid.asis"; document.body.appendChild(portal); diff --git a/tests/wpt/web-platform-tests/portals/portals-activate-no-browsing-context.html b/tests/wpt/web-platform-tests/portals/portals-activate-no-browsing-context.html index bfc45f68c18..ccf1e9504be 100644 --- a/tests/wpt/web-platform-tests/portals/portals-activate-no-browsing-context.html +++ b/tests/wpt/web-platform-tests/portals/portals-activate-no-browsing-context.html @@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script> promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let activatePromise = document.createElement('portal').activate(); await promise_rejects_dom(t, 'InvalidStateError', activatePromise); }, "A portal with nothing in it cannot be activated"); diff --git a/tests/wpt/web-platform-tests/portals/portals-activate-resolution.html b/tests/wpt/web-platform-tests/portals/portals-activate-resolution.html index ada8d4619a0..7094768a4f8 100644 --- a/tests/wpt/web-platform-tests/portals/portals-activate-resolution.html +++ b/tests/wpt/web-platform-tests/portals/portals-activate-resolution.html @@ -4,7 +4,7 @@ <script src="resources/open-blank-host.js"></script> <script> promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var win = await openBlankPortalHost(); var portal = win.document.createElement("portal"); portal.src = new URL("resources/simple-portal.html", location.href) diff --git a/tests/wpt/web-platform-tests/portals/portals-activate-twice.html b/tests/wpt/web-platform-tests/portals/portals-activate-twice.html index eaef8b7cc94..0eea5465a2b 100644 --- a/tests/wpt/web-platform-tests/portals/portals-activate-twice.html +++ b/tests/wpt/web-platform-tests/portals/portals-activate-twice.html @@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script> promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let waitForMessage = new Promise((resolve, reject) => { window.onmessage = e => resolve(e.data); }); @@ -13,7 +13,7 @@ promise_test(async t => { }, "Calling activate when a portal is already activating should fail"); promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let waitForMessage = new Promise((resolve, reject) => { window.onmessage = e => resolve(e.data); }); diff --git a/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html b/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html index 21893987e63..04c61960627 100644 --- a/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html +++ b/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html @@ -13,7 +13,7 @@ } promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var test = "adopt-once"; window.open(`resources/portals-adopt-predecessor.html?test=${test}`); var message = await waitForCompletion(test); @@ -21,7 +21,7 @@ }, "Tests that a portal can adopt its predecessor."); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var test = "adopt-twice"; window.open(`resources/portals-adopt-predecessor.html?test=${test}`); var message = await waitForCompletion(test); @@ -29,7 +29,7 @@ }, "Tests that trying to adopt the predecessor twice will throw an exception."); async_test(function(t) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var test = "adopt-after-event"; var bc = new BroadcastChannel(`test-${test}`); bc.onmessage = t.step_func_done(function(e) { @@ -40,7 +40,7 @@ }, "Tests that trying to adopt the predecessor after the PortalActivateEvent will throw an exception."); promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var test = "adopt-and-activate"; window.open(`resources/portals-adopt-predecessor.html?test=${test}`); var message = await waitForCompletion(test); @@ -48,7 +48,7 @@ }, "Tests that activating an adopted predecessor without inserting it works"); async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var test = "adopt-attach-remove"; var bc = new BroadcastChannel(`test-${test}`); bc.onmessage = t.step_func_done(function(e) { @@ -59,7 +59,7 @@ }, "Tests that an adopting, inserting and then removing a predecessor works correctly"); async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var test = "adopt-and-discard"; var bc = new BroadcastChannel(`test-${test}`); bc.onmessage = t.step_func_done(function(e) { @@ -70,7 +70,7 @@ }, "Tests that the adopted predecessor is destroyed if it isn't inserted"); async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var test = "adopt-to-disconnected-node"; var bc = new BroadcastChannel(`test-${test}`); bc.onmessage = t.step_func_done(function(e) { diff --git a/tests/wpt/web-platform-tests/portals/portals-cross-origin-load.sub.html b/tests/wpt/web-platform-tests/portals/portals-cross-origin-load.sub.html index be817b8a0aa..04db38a8e9a 100644 --- a/tests/wpt/web-platform-tests/portals/portals-cross-origin-load.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-cross-origin-load.sub.html @@ -4,7 +4,7 @@ <body> <script> promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = "http://{{hosts[alt][www]}}:{{ports[http][0]}}/portals/resources/simple-portal.html"; return new Promise((resolve, reject) => { diff --git a/tests/wpt/web-platform-tests/portals/portals-focus.sub.html b/tests/wpt/web-platform-tests/portals/portals-focus.sub.html index 54fcf3a3d47..ccbac7db906 100644 --- a/tests/wpt/web-platform-tests/portals/portals-focus.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-focus.sub.html @@ -8,7 +8,7 @@ <body> <script> async function createPortal(doc, url) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let portal = doc.createElement("portal"); portal.src = url; doc.body.appendChild(portal); diff --git a/tests/wpt/web-platform-tests/portals/portals-host-exposure.sub.html b/tests/wpt/web-platform-tests/portals/portals-host-exposure.sub.html index 3ff88413691..93ee8ecdc09 100644 --- a/tests/wpt/web-platform-tests/portals/portals-host-exposure.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-host-exposure.sub.html @@ -4,7 +4,7 @@ <body> <script> function openPortalAndReceiveMessage(portalSrc) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let portal = document.createElement('portal'); portal.src = portalSrc; let received = new Promise((resolve, reject) => { diff --git a/tests/wpt/web-platform-tests/portals/portals-host-hidden-after-activation.html b/tests/wpt/web-platform-tests/portals/portals-host-hidden-after-activation.html index 571ec55810a..9638a6c7c6a 100644 --- a/tests/wpt/web-platform-tests/portals/portals-host-hidden-after-activation.html +++ b/tests/wpt/web-platform-tests/portals/portals-host-hidden-after-activation.html @@ -19,7 +19,7 @@ } promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); const portalUrl = encodeURIComponent("portal-host-hidden-after-activation-portal.html"); window.open(`resources/portal-embed-and-activate.html?url=${portalUrl}`); var results = await waitForMessages(); diff --git a/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html b/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html index 8750dd43d01..e547642c9f2 100644 --- a/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html @@ -17,7 +17,7 @@ } async function createPortalAndLoopMessage(portalSrc, params) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = await createPortal(portalSrc); var waitForResponse = new Promise((resolve, reject) => { portal.addEventListener("message", e => { resolve(e); }); @@ -73,7 +73,7 @@ }, "postMessage with object message"); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); function checkPort(port) { return new Promise((resolve, reject) => { var channel = new MessageChannel(); @@ -138,7 +138,7 @@ }, "postMessage with invalid transferable should throw error"); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var receiveMessage = new Promise((resolve, reject) => { var bc = new BroadcastChannel("portal-host-post-message-after-activate"); bc.onmessage = e => { resolve(e); }; @@ -151,7 +151,7 @@ }, "Calling postMessage after receiving onactivate event should fail"); promise_test(() => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = "resources/portal-host-post-message-navigate-1.html"; var count = 0; diff --git a/tests/wpt/web-platform-tests/portals/portals-navigate-after-adoption.html b/tests/wpt/web-platform-tests/portals/portals-navigate-after-adoption.html index f4039020313..1ca1cfb79f3 100644 --- a/tests/wpt/web-platform-tests/portals/portals-navigate-after-adoption.html +++ b/tests/wpt/web-platform-tests/portals/portals-navigate-after-adoption.html @@ -27,7 +27,7 @@ async function openPortalAndActivate(logic) { } promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let messageFromNewSrc = await openPortalAndActivate( 'let predecessor = event.adoptPredecessor();' + 'let readyPromise = new Promise((resolve, reject) => {' + diff --git a/tests/wpt/web-platform-tests/portals/portals-nested.html b/tests/wpt/web-platform-tests/portals/portals-nested.html index 41d053bd48d..b4b396ff8dd 100644 --- a/tests/wpt/web-platform-tests/portals/portals-nested.html +++ b/tests/wpt/web-platform-tests/portals/portals-nested.html @@ -4,7 +4,7 @@ <body> <script> promise_test(() => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = "resources/portals-nested-portal.html"; document.body.appendChild(portal); diff --git a/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html b/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html index f3927a0c05a..2f6b25d97da 100644 --- a/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html @@ -12,7 +12,7 @@ const crossOriginUrl = "http://{{hosts[alt][www]}}:{{ports[http][0]}}/portals/resources/portal-post-message-portal.html" async function createAndInsertPortal(portalSrc) { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement("portal"); portal.src = portalSrc; document.body.append(portal); @@ -185,7 +185,7 @@ } promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); window.open("resources/portal-post-message-before-activate-window.html"); let {postMessageTS, activateTS} = await waitForMessage( "portals-post-message-before-activate"); @@ -193,14 +193,14 @@ }, "postMessage before activate should work and preserve order"); promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); window.open("resources/portal-post-message-during-activate-window.html"); let error = await waitForMessage("portals-post-message-during-activate"); assert_equals(error, "InvalidStateError"); }, "postMessage during activate throws error"); promise_test(async t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); window.open("resources/portal-post-message-after-activate-window.html"); let error = await waitForMessage("portals-post-message-after-activate"); assert_equals(error, "InvalidStateError"); diff --git a/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-header.html b/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-header.html index da908cb2c21..1fbd88893e4 100644 --- a/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-header.html +++ b/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-header.html @@ -4,7 +4,7 @@ <body> <script> promise_test(async () => { - assert_precondition('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); + assert_implements('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); let portal = document.createElement('portal'); let referrerPromise = new Promise((resolve, reject) => { portal.addEventListener('message', e => resolve(e.data), {once: true}); diff --git a/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-meta.html b/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-meta.html index eecb247973e..e77894cfa4d 100644 --- a/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-meta.html +++ b/tests/wpt/web-platform-tests/portals/portals-referrer-inherit-meta.html @@ -5,7 +5,7 @@ <body> <script> promise_test(async () => { - assert_precondition('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); + assert_implements('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); let portal = document.createElement('portal'); let referrerPromise = new Promise((resolve, reject) => { portal.addEventListener('message', e => resolve(e.data), {once: true}); diff --git a/tests/wpt/web-platform-tests/portals/portals-referrer.html b/tests/wpt/web-platform-tests/portals/portals-referrer.html index b9abcdb80de..4cd3b908958 100644 --- a/tests/wpt/web-platform-tests/portals/portals-referrer.html +++ b/tests/wpt/web-platform-tests/portals/portals-referrer.html @@ -4,7 +4,7 @@ <body> <script> promise_test(async () => { - assert_precondition('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); + assert_implements('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); let portal = document.createElement('portal'); let referrerPromise = new Promise((resolve, reject) => { portal.addEventListener('message', e => resolve(e.data), {once: true}); @@ -21,7 +21,7 @@ promise_test(async () => { }, "portal contents should be loaded with referrer"); promise_test(async () => { - assert_precondition('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); + assert_implements('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); let portal = document.createElement('portal'); portal.referrerPolicy = 'no-referrer'; let referrerPromise = new Promise((resolve, reject) => { @@ -39,7 +39,7 @@ promise_test(async () => { }, "portal contents should be loaded with no referrer if referrerpolicy=no-referrer"); promise_test(async () => { - assert_precondition('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); + assert_implements('HTMLPortalElement' in self, 'HTMLPortalElement is required for this test'); let portal = document.createElement('portal'); portal.referrerPolicy = 'origin'; let referrerPromise = new Promise((resolve, reject) => { diff --git a/tests/wpt/web-platform-tests/portals/portals-repeated-activate.html b/tests/wpt/web-platform-tests/portals/portals-repeated-activate.html index bf8d8ad4264..f2f36cb7682 100644 --- a/tests/wpt/web-platform-tests/portals/portals-repeated-activate.html +++ b/tests/wpt/web-platform-tests/portals/portals-repeated-activate.html @@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script> async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); let win = window.open("resources/portal-repeated-activate-window.html"); win.onload = () => win.activate(); window.onmessage = t.step_func_done(() => {}); diff --git a/tests/wpt/web-platform-tests/portals/portals-set-src-after-activate.html b/tests/wpt/web-platform-tests/portals/portals-set-src-after-activate.html index f9728170858..e485ef4d51c 100644 --- a/tests/wpt/web-platform-tests/portals/portals-set-src-after-activate.html +++ b/tests/wpt/web-platform-tests/portals/portals-set-src-after-activate.html @@ -10,7 +10,7 @@ function nextMessage(target) { } promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); const w = await openBlankPortalHost(); try { const portal = w.document.createElement('portal'); diff --git a/tests/wpt/web-platform-tests/portals/predecessor-fires-unload.html b/tests/wpt/web-platform-tests/portals/predecessor-fires-unload.html index dce2afb8e6f..cb6d98c01d0 100644 --- a/tests/wpt/web-platform-tests/portals/predecessor-fires-unload.html +++ b/tests/wpt/web-platform-tests/portals/predecessor-fires-unload.html @@ -12,7 +12,7 @@ function timePasses(delay) { } promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); const w = await openBlankPortalHost(); try { const portal = w.document.createElement('portal'); @@ -30,7 +30,7 @@ promise_test(async () => { }, "pagehide and unload should fire if the predecessor is not adopted"); promise_test(async () => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); localStorage.setItem('predecessor-fires-unload-events', ''); window.open('resources/predecessor-fires-unload-watch-unload.html', '_blank', 'noopener'); while (localStorage.getItem('predecessor-fires-unload-events') != 'pagehide unload') { diff --git a/tests/wpt/web-platform-tests/portals/xfo/portals-xfo-deny.sub.html b/tests/wpt/web-platform-tests/portals/xfo/portals-xfo-deny.sub.html index 2110d4906f9..efc925276c9 100644 --- a/tests/wpt/web-platform-tests/portals/xfo/portals-xfo-deny.sub.html +++ b/tests/wpt/web-platform-tests/portals/xfo/portals-xfo-deny.sub.html @@ -8,7 +8,7 @@ // completion event. async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement('portal'); portal.src = "/portals/xfo/resources/xfo-deny.asis"; portal.onmessage = t.unreached_func("should not have received a message"); @@ -18,7 +18,7 @@ async_test(t => { }, "`XFO: DENY` blocks same-origin portals."); async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement('portal'); portal.src = "http://{{domains[www]}}:{{ports[http][0]}}/portals/xfo/resources/xfo-deny.asis"; portal.onmessage = t.unreached_func("should not have received a message"); @@ -28,7 +28,7 @@ async_test(t => { }, "`XFO: DENY` blocks cross-origin portals."); async_test(t => { - assert_precondition("HTMLPortalElement" in self); + assert_implements("HTMLPortalElement" in self); var portal = document.createElement('portal'); portal.src = "/portals/xfo/resources/xfo-deny.asis"; portal.onmessage = t.unreached_func("should not have received a message"); diff --git a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js index a04aa37229c..a9dd9b1d7c7 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js +++ b/tests/wpt/web-platform-tests/resources/chromium/webxr-test.js @@ -214,6 +214,7 @@ class MockRuntime { 'unbounded': device.mojom.XRSessionFeature.REF_SPACE_UNBOUNDED, 'hit-test': device.mojom.XRSessionFeature.HIT_TEST, 'dom-overlay': device.mojom.XRSessionFeature.DOM_OVERLAY, + 'light-estimation': device.mojom.XRSessionFeature.LIGHT_ESTIMATION, }; static sessionModeToMojoMap = { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements.html new file mode 100644 index 00000000000..6e35f385027 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements.html @@ -0,0 +1,43 @@ +<!DOCTYPE HTML> +<html lang="en"> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/test/tests/unit/helpers.js"></script> +<title>assert_implements unittests</title> +<script> +'use strict'; + +test(() => { + // All values in JS that are not falsy are truthy, so we just check some + // common cases here. + assert_implements(true, 'true is a truthy value'); + assert_implements(5, 'positive integeter is a truthy value'); + assert_implements(-5, 'negative integeter is a truthy value'); + assert_implements('foo', 'non-empty string is a truthy value'); +}, 'truthy values'); + +test_failure(() => { + assert_implements(false); +}, 'false is a falsy value'); + +test_failure(() => { + assert_implements(0); +}, '0 is a falsy value'); + +test_failure(() => { + assert_implements(''); +}, 'empty string is a falsy value'); + +test_failure(() => { + assert_implements(null); +}, 'null is a falsy value'); + +test_failure(() => { + assert_implements(undefined); +}, 'undefined is a falsy value'); + +test_failure(() => { + assert_implements(NaN); +}, 'NaN is a falsy value'); +</script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements_optional.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements_optional.html new file mode 100644 index 00000000000..4f23e203c57 --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_implements_optional.html @@ -0,0 +1,43 @@ +<!DOCTYPE HTML> +<html lang="en"> +<meta charset="utf-8"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/test/tests/unit/helpers.js"></script> +<title>assert_implements_optional unittests</title> +<script> +'use strict'; + +test(() => { + // All values in JS that are not falsy are truthy, so we just check some + // common cases here. + assert_implements_optional(true, 'true is a truthy value'); + assert_implements_optional(5, 'positive integeter is a truthy value'); + assert_implements_optional(-5, 'negative integeter is a truthy value'); + assert_implements_optional('foo', 'non-empty string is a truthy value'); +}, 'truthy values'); + +test_failure(() => { + assert_implements_optional(false); +}, 'false is a falsy value'); + +test_failure(() => { + assert_implements_optional(0); +}, '0 is a falsy value'); + +test_failure(() => { + assert_implements_optional(''); +}, 'empty string is a falsy value'); + +test_failure(() => { + assert_implements_optional(null); +}, 'null is a falsy value'); + +test_failure(() => { + assert_implements_optional(undefined); +}, 'undefined is a falsy value'); + +test_failure(() => { + assert_implements_optional(NaN); +}, 'NaN is a falsy value'); +</script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html index bb3a97e471a..19296b8293f 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/assert_object_equals.html @@ -3,29 +3,11 @@ <meta charset="utf-8"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="/resources/test/tests/unit/helpers.js"></script> <title>Assertion functions</title> <script> 'use strict'; -// The `assert_throws_*` functions cannot be used for this -// purpose because they fail in response to AssertionError exceptions, even -// when this is expressed as the expected error. -function test_failure(fn, name) { - test(function() { - try { - fn(); - } catch (err) { - if (err instanceof AssertionError) { - return; - } - throw new AssertionError('Expected an AssertionError, but'); - } - throw new AssertionError( - 'Expected an AssertionError, but no error was thrown' - ); - }, name); -} - test(function() { assert_object_equals({}, {}); }, 'empty objects'); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/unit/helpers.js b/tests/wpt/web-platform-tests/resources/test/tests/unit/helpers.js new file mode 100644 index 00000000000..b273a72589f --- /dev/null +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/helpers.js @@ -0,0 +1,21 @@ +// Helper for testing assertion failure cases for a testharness.js API +// +// The `assert_throws_*` functions cannot be used for this purpose because they +// always fail in response to AssertionError exceptions, even when this is +// expressed as the expected error. +function test_failure(fn, name) { + test(function() { + try { + fn(); + } catch (err) { + if (err instanceof AssertionError) { + return; + } + throw new AssertionError('Expected an AssertionError, but'); + } + throw new AssertionError( + 'Expected an AssertionError, but no error was thrown' + ); + }, name); +} + diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js index 63883e15504..15df5b6a342 100644 --- a/tests/wpt/web-platform-tests/resources/testharness.js +++ b/tests/wpt/web-platform-tests/resources/testharness.js @@ -1848,6 +1848,49 @@ policies and contribution forms [3]. } expose(assert_any, "assert_any"); + /** + * Assert that a feature is implemented, based on a 'truthy' condition. + * + * This function should be used to early-exit from tests in which there is + * no point continuing without support for a non-optional spec or spec + * feature. For example: + * + * assert_implements(window.Foo, 'Foo is not supported'); + * + * @param {object} condition The truthy value to test + * @param {string} description Error description for the case that the condition is not truthy. + */ + function assert_implements(condition, description) { + assert(!!condition, "assert_implements", description); + } + expose(assert_implements, "assert_implements") + + /** + * Assert that an optional feature is implemented, based on a 'truthy' condition. + * + * This function should be used to early-exit from tests in which there is + * no point continuing without support for an explicitly optional spec or + * spec feature. For example: + * + * assert_implements_optional(video.canPlayType("video/webm"), + * "webm video playback not supported"); + * + * @param {object} condition The truthy value to test + * @param {string} description Error description for the case that the condition is not truthy. + */ + function assert_implements_optional(condition, description) { + if (!condition) { + // Due to the difficulty of changing logging statuses, we re-use + // the PRECONDITION_FAILED status for assert_implements_optional. + // See the RFC: https://github.com/web-platform-tests/rfcs/pull/48 + // + // TODO(smcgruer): Once assert_precondition is removed, rename the + // exception and move this comment to where PRECONDITION_FAILED is used. + throw new PreconditionFailedError(description); + } + } + expose(assert_implements_optional, "assert_implements_optional") + function assert_precondition(precondition, description) { if (!precondition) { throw new PreconditionFailedError(description); diff --git a/tests/wpt/web-platform-tests/speech-api/historical.html b/tests/wpt/web-platform-tests/speech-api/historical.html index 9da70c44de9..99d2fab5f52 100644 --- a/tests/wpt/web-platform-tests/speech-api/historical.html +++ b/tests/wpt/web-platform-tests/speech-api/historical.html @@ -18,7 +18,7 @@ }); test(() => { - assert_precondition('SpeechRecognition' in window, 'SpeechRecognition exposed'); + assert_implements('SpeechRecognition' in window, 'SpeechRecognition exposed'); assert_false("serviceURI" in SpeechRecognition.prototype); }, "SpeechRecognition's serviceURI attribute should not exist"); @@ -27,7 +27,7 @@ test(() => { "emma", ].forEach(name => { test(() => { - assert_precondition('SpeechRecognitionEvent' in window, 'SpeechRecognitionEvent exposed'); + assert_implements('SpeechRecognitionEvent' in window, 'SpeechRecognitionEvent exposed'); assert_false(name in SpeechRecognitionEvent.prototype); }, `SpeechRecognitionEvent's ${name} attribute should not exist`); }); diff --git a/tests/wpt/web-platform-tests/svg/shapes/scripted/stroke-dashes-hit-at-high-scale.svg b/tests/wpt/web-platform-tests/svg/shapes/scripted/stroke-dashes-hit-at-high-scale.svg new file mode 100644 index 00000000000..b57a9e0aa77 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/shapes/scripted/stroke-dashes-hit-at-high-scale.svg @@ -0,0 +1,27 @@ +<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" viewBox="0 0 36 36" width="600" height="600"> + <title>Strokes w/dashes are properly hit-tested, even at large scale factors</title> + <h:script src="/resources/testharness.js"/> + <h:script src="/resources/testharnessreport.js"/> + <metadata> + <h:link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#CircleElement"/> + <h:link rel="help" href="https://svgwg.org/svg2-draft/painting.html#StrokeProperties"/> + </metadata> + <circle id="circle" cx="6" cy="10" r="5" stroke="blue" stroke-width="1" stroke-dasharray="10 21.4159" fill="none"/> + <script> + <![CDATA[ + test(function() { + let svg = document.getElementById("svg"); + let circle = document.getElementById("circle"); + let hitTest = function(x, y) { + return document.elementFromPoint( + x * svg.width.baseVal.value / svg.viewBox.baseVal.width, + y * svg.height.baseVal.value / svg.viewBox.baseVal.height); + } + assert_equals(hitTest(11, 10), circle, "hit-test the beginning of the dash (t=0)"); + assert_equals(hitTest(8.70, 14.21), circle, "hit-test the middle of the dash (t=5)"); + assert_equals(hitTest(4.10, 14.63), circle, "hit-test the end of the dash (t=9.8)"); + assert_equals(hitTest(3.74, 14.46), svg, "hit-test past the end of the dash (t=10.2)"); + }); + ]]> + </script> +</svg> diff --git a/tests/wpt/web-platform-tests/svg/types/scripted/SVGGeometryElement.isPointInStroke-02.svg b/tests/wpt/web-platform-tests/svg/types/scripted/SVGGeometryElement.isPointInStroke-02.svg new file mode 100644 index 00000000000..909b035ef47 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/types/scripted/SVGGeometryElement.isPointInStroke-02.svg @@ -0,0 +1,35 @@ +<svg id="svg" xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" viewBox="0 0 36 36" width="600" height="600"> + <title>isPointInStroke w/dashes works properly at large scale factors</title> + <h:script src="/resources/testharness.js"/> + <h:script src="/resources/testharnessreport.js"/> + <metadata> + <h:link rel="help" href="https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement"/> + <h:link rel="help" href="https://svgwg.org/svg2-draft/types.html#__svg__SVGGeometryElement__isPointInStroke"/> + </metadata> + <circle id="circle" cx="6" cy="10" r="5" stroke="blue" stroke-width="1" stroke-dasharray="10 21.4159" fill="none"/> + <script> + <![CDATA[ + test(function() { + let svg = document.getElementById("svg"); + let circle = document.getElementById("circle"); + let pt = svg.createSVGPoint(); + + pt.x = 11; + pt.y = 10; + assert_true(circle.isPointInStroke(pt), "hit-test the beginning of the dash (t=0)"); + + pt.x = 8.70; + pt.y = 14.21; + assert_true(circle.isPointInStroke(pt), "hit-test the middle of the dash (t=5)"); + + pt.x = 4.10; + pt.y = 14.63; + assert_true(circle.isPointInStroke(pt), "hit-test the end of the dash (t=9.8)"); + + pt.x = 3.74; + pt.y = 14.46; + assert_false(circle.isPointInStroke(pt), "hit-test past the end of the dash (t=10.2)"); + }); + ]]> + </script> +</svg> diff --git a/tests/wpt/web-platform-tests/tools/ci/run_tc.py b/tests/wpt/web-platform-tests/tools/ci/run_tc.py index 69625710ad9..e8dfa6163e5 100755 --- a/tests/wpt/web-platform-tests/tools/ci/run_tc.py +++ b/tests/wpt/web-platform-tests/tools/ci/run_tc.py @@ -43,6 +43,7 @@ import subprocess import sys import tarfile import tempfile +import time import zipfile from socket import error as SocketError # NOQA: N812 import errno @@ -152,13 +153,12 @@ def install_chrome(channel): dest = os.path.join("/tmp", deb_archive) deb_url = "https://dl.google.com/linux/direct/%s" % deb_archive with open(dest, "w") as f: - if not download_url_to_descriptor(f, deb_url): - raise RuntimeError("Can't download %s. Aborting" % deb_url) - + download_url_to_descriptor(f, deb_url) run(["sudo", "apt-get", "-qqy", "update"]) run(["sudo", "gdebi", "-qn", "/tmp/%s" % deb_archive]) + def install_webkitgtk_from_apt_repository(channel): # Configure webkitgtk.org/debian repository for $channel and pin it with maximum priority run(["sudo", "apt-key", "adv", "--fetch-keys", "https://webkitgtk.org/debian/apt.key"]) @@ -178,12 +178,12 @@ def download_url_to_descriptor(fd, url, max_retries=3): """Download an URL in chunks and saves it to a file descriptor (truncating it) It doesn't close the descriptor, but flushes it on success. It retries the download in case of ECONNRESET up to max_retries.""" - download_succeed = False - if max_retries < 0: - max_retries = 0 - for current_retry in range(max_retries+1): + if max_retries < 1: + max_retries = 1 + wait = 1 + for current_retry in range(1, max_retries+1): try: - print("INFO: Downloading %s Try %d/%d" % (url, current_retry + 1, max_retries)) + print("INFO: Downloading %s Try %d/%d" % (url, current_retry, max_retries)) resp = urlopen(url) # We may come here in a retry, ensure to truncate fd before start writing. fd.seek(0) @@ -194,22 +194,23 @@ def download_url_to_descriptor(fd, url, max_retries=3): break # Download finished fd.write(chunk) fd.flush() - download_succeed = True - break # Sucess + # Success + return except SocketError as e: - if e.errno != errno.ECONNRESET: - raise # Unknown error - if current_retry < max_retries: - print("ERROR: Connection reset by peer. Retrying ...") - continue # Retry - return download_succeed + if current_retry < max_retries and e.errno == errno.ECONNRESET: + # Retry + print("ERROR: Connection reset by peer. Retrying after %ds..." % wait) + time.sleep(wait) + wait *= 2 + else: + # Maximum retries or unknown error + raise def install_webkitgtk_from_tarball_bundle(channel): with tempfile.NamedTemporaryFile(suffix=".tar.xz") as temp_tarball: download_url = "https://webkitgtk.org/built-products/nightly/webkitgtk-nightly-build-last.tar.xz" - if not download_url_to_descriptor(temp_tarball, download_url): - raise RuntimeError("Can't download %s. Aborting" % download_url) + download_url_to_descriptor(temp_tarball, download_url) run(["sudo", "tar", "xfa", temp_tarball.name, "-C", "/"]) # Install dependencies run(["sudo", "apt-get", "-qqy", "update"]) @@ -224,6 +225,7 @@ def install_webkitgtk(channel): else: raise ValueError("Unrecognized release channel: %s" % channel) + def start_xvfb(): start(["sudo", "Xvfb", os.environ["DISPLAY"], "-screen", "0", "%sx%sx%s" % (os.environ["SCREEN_WIDTH"], @@ -267,8 +269,10 @@ def download_artifacts(artifacts): for artifact in artifacts: base_url = task_url(artifact["task"]) if artifact["task"] not in artifact_list_by_task: - resp = urlopen(base_url + "/artifacts") - artifacts_data = json.load(resp) + with tempfile.TemporaryFile() as f: + download_url_to_descriptor(f, base_url + "/artifacts") + f.seek(0) + artifacts_data = json.load(f) artifact_list_by_task[artifact["task"]] = artifacts_data artifacts_data = artifact_list_by_task[artifact["task"]] @@ -428,9 +432,10 @@ def fetch_event_data(): # For example under local testing return None - url = task_url(task_id) - resp = urlopen(url) - task_data = json.load(resp) + with tempfile.TemporaryFile() as f: + download_url_to_descriptor(f, task_url(task_id)) + f.seek(0) + task_data = json.load(f) event_data = task_data.get("extra", {}).get("github_event") if event_data is not None: return json.loads(event_data) diff --git a/tests/wpt/web-platform-tests/tools/docker/README.md b/tests/wpt/web-platform-tests/tools/docker/README.md index 450981f686b..8b0737359ea 100644 --- a/tests/wpt/web-platform-tests/tools/docker/README.md +++ b/tests/wpt/web-platform-tests/tools/docker/README.md @@ -4,7 +4,8 @@ images must be updated as well. To do this, assuming you have docker installed: In this directory, run ```sh -docker build -t <tag> . +# --pull forces Docker to get the newest base image. +docker build --pull -t <tag> . docker push <tag> ``` diff --git a/tests/wpt/web-platform-tests/tools/docker/frontend.py b/tests/wpt/web-platform-tests/tools/docker/frontend.py index 976156cf65a..59a1cff2ebd 100644 --- a/tests/wpt/web-platform-tests/tools/docker/frontend.py +++ b/tests/wpt/web-platform-tests/tools/docker/frontend.py @@ -8,6 +8,7 @@ wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) def build(*args, **kwargs): subprocess.check_call(["docker", "build", + "--pull", "--tag", "wpt:local", here]) diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py index 6d329ad38f9..b618d75ec1e 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py +++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py @@ -1,5 +1,4 @@ import os -import sys import mock @@ -109,7 +108,7 @@ def manifest_tree(draw): @h.given(manifest_tree()) # FIXME: Workaround for https://github.com/web-platform-tests/wpt/issues/22758 -@h.settings(suppress_health_check=(h.HealthCheck.too_slow,) if sys.version_info.major == 3 else ()) +@h.settings(suppress_health_check=(h.HealthCheck.too_slow,)) @h.example([SourceFileWithTest("a", "0"*40, item.ConformanceCheckerTest)]) def test_manifest_to_json(s): m = manifest.Manifest() @@ -126,7 +125,7 @@ def test_manifest_to_json(s): @h.given(manifest_tree()) # FIXME: Workaround for https://github.com/web-platform-tests/wpt/issues/22758 -@h.settings(suppress_health_check=(h.HealthCheck.too_slow,) if sys.version_info.major == 3 else ()) +@h.settings(suppress_health_check=(h.HealthCheck.too_slow,)) @h.example([SourceFileWithTest("a", "0"*40, item.TestharnessTest)]) @h.example([SourceFileWithTest("a", "0"*40, item.RefTest, references=[("/aa", "==")])]) def test_manifest_idempotent(s): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt index c7ddcd75456..9b84e7334bb 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt @@ -4,6 +4,6 @@ mozlog==6.0 mozdebug==0.2 # Pillow 7 requires Python 3 pillow==6.2.2 # pyup: <7.0 -urllib3[secure]==1.25.8 +urllib3[secure]==1.25.9 requests==2.23.0 six==1.14.0 diff --git a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html index 0f9aa55717c..bfdedb4bec0 100644 --- a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html +++ b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-repeating.html @@ -36,26 +36,42 @@ async_test(function(t) { async_test(function(t) { let video = document.createElement('video'); - let numberOfCallsLeft = 10; - let lastPresentedFrames = -1; + let maxNumberOfCalls = 10; + let currentCallNumber = 0; + let lastMetadata; - function frameNumberVerifier(time, metadata) { - assert_greater_than(metadata.presentedFrames, lastPresentedFrames, "presentedFrames should be monotonically increasing"); + function verifyMetadata(last, current) { + assert_greater_than(current.presentedFrames, last.presentedFrames, "presentedFrames should be monotonically increasing"); + assert_greater_than(current.presentationTime, last.presentationTime, "presentationTime should be monotonically increasing"); + assert_greater_than(current.expectedDisplayTime, last.expectedDisplayTime, "expectedDisplayTime should be monotonically increasing"); - lastPresentedFrames = metadata.presentedFrames; + // We aren't seeking through the file, so this should be increasing from frame to frame. + assert_greater_than(current.mediaTime, last.mediaTime, "mediaTime should be increasing"); - if (--numberOfCallsLeft) { + // The test video's size doesn't change. + assert_equals(current.width, last.width, "width should remain constant"); + assert_equals(current.height, last.height, "height should remain constant"); + } + + function repeatingCallback(time, metadata) { + // Skip the first call to verifyMetadata. + if (currentCallNumber) + verifyMetadata(lastMetadata, metadata) + + lastMetadata = metadata; + + if (++currentCallNumber > maxNumberOfCalls) { t.done() } else { - video.requestVideoFrameCallback(t.step_func(frameNumberVerifier)); + video.requestVideoFrameCallback(t.step_func(repeatingCallback)); } } - video.requestVideoFrameCallback(t.step_func(frameNumberVerifier)); + video.requestVideoFrameCallback(t.step_func(repeatingCallback)); video.src = getVideoURI('/media/movie_5'); video.play(); -}, 'Test chaining calls to video.rVFC.'); +}, 'Test chaining calls to video.rVFC, and verify the required parameters.'); </script> </html> diff --git a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html new file mode 100644 index 00000000000..b6131d6a808 --- /dev/null +++ b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback-webrtc.https.html @@ -0,0 +1,149 @@ +<!doctype html> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title>WebRTC video.requestVideoFrameCallback() test</title> + <script src="/webrtc/RTCPeerConnection-helper.js"></script> +</head> +<body> + <div id="log"></div> + <div> + <video id="local-view" muted autoplay="autoplay"></video> + <video id="remote-view" muted autoplay="autoplay"/> + </video> + </div> + + <!-- These files are in place when executing on W3C. --> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script type="text/javascript"> + var test = async_test('Test video.requestVideoFrameCallback() parameters for WebRTC applications.'); + + // + // This test is based on /webrtc/simplecall.https.html, but it calls to + // video.requestVideoFrameCallback() before ending, to verify WebRTC required + // and optional parameters. + // + + var gFirstConnection = null; + var gSecondConnection = null; + var gCallbackCounter = 0; + var verify_params = (now, metadata) => { + gCallbackCounter = gCallbackCounter + 1; + assert_greater_than(now, 0); + + // Verify all required fields + assert_greater_than(metadata.presentationTime, 0); + assert_greater_than(metadata.expectedDisplayTime, 0); + assert_greater_than(metadata.presentedFrames, 0); + assert_greater_than(metadata.width, 0); + assert_greater_than(metadata.height, 0); + assert_true("mediaTime" in metadata, "mediaTime should be present"); + + // Verify WebRTC only fields. + assert_true("rtpTimestamp" in metadata, "rtpTimestamp should be present"); + assert_true("receiveTime" in metadata, "receiveTime should be present"); + // captureTime is not available until roundtrip time estimation is done. + if (gCallbackCounter > 60 || "captureTime" in metadata) { + assert_true("captureTime" in metadata, "captureTime should be present"); + test.done(); + } + else { + // Keep requesting callbacks. + document.getElementById('remote-view').requestVideoFrameCallback(test.step_func(verify_params)); + } + } + + // If the remote video gets video data that implies the negotiation + // as well as the ICE and DTLS connection are up. + document.getElementById('remote-view') + .addEventListener('loadedmetadata', function() { + document.getElementById('remote-view').requestVideoFrameCallback(test.step_func(verify_params)); + }); + + + function getNoiseStreamOkCallback(localStream) { + gFirstConnection = new RTCPeerConnection(null); + gFirstConnection.onicecandidate = onIceCandidateToFirst; + + gSecondConnection = new RTCPeerConnection(null); + gSecondConnection.onicecandidate = onIceCandidateToSecond; + gSecondConnection.ontrack = onRemoteTrack; + + localStream.getTracks().forEach(function(track) { + // Bidirectional streams are needed in order for captureTime to be + // populated. Use the same source in both directions. + gFirstConnection.addTrack(track, localStream); + gSecondConnection.addTrack(track, localStream); + }); + + gFirstConnection.createOffer().then(onOfferCreated, failed('createOffer')); + + var videoTag = document.getElementById('local-view'); + videoTag.srcObject = localStream; + }; + + var onOfferCreated = test.step_func(function(offer) { + gFirstConnection.setLocalDescription(offer); + + // This would normally go across the application's signaling solution. + // In our case, the "signaling" is to call this function. + receiveCall(offer.sdp); + }); + + function receiveCall(offerSdp) { + var parsedOffer = new RTCSessionDescription({ type: 'offer', + sdp: offerSdp }); + gSecondConnection.setRemoteDescription(parsedOffer); + + gSecondConnection.createAnswer().then(onAnswerCreated, + failed('createAnswer')); + }; + + var onAnswerCreated = test.step_func(function(answer) { + gSecondConnection.setLocalDescription(answer); + + // Similarly, this would go over the application's signaling solution. + handleAnswer(answer.sdp); + }); + + function handleAnswer(answerSdp) { + var parsedAnswer = new RTCSessionDescription({ type: 'answer', + sdp: answerSdp }); + gFirstConnection.setRemoteDescription(parsedAnswer); + }; + + var onIceCandidateToFirst = test.step_func(function(event) { + // If event.candidate is null = no more candidates. + if (event.candidate) { + gSecondConnection.addIceCandidate(event.candidate); + } + }); + + var onIceCandidateToSecond = test.step_func(function(event) { + if (event.candidate) { + gFirstConnection.addIceCandidate(event.candidate); + } + }); + + var onRemoteTrack = test.step_func(function(event) { + var videoTag = document.getElementById('remote-view'); + if (!videoTag.srcObject) { + videoTag.srcObject = event.streams[0]; + } + }); + + // Returns a suitable error callback. + function failed(function_name) { + return test.unreached_func('WebRTC called error callback for ' + function_name); + } + + // This function starts the test. + test.step(function() { + getNoiseStream({ video: true, audio: true }) + .then(test.step_func(getNoiseStreamOkCallback), failed('getNoiseStream')); + }); +</script> + +</body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html index 743cbc60b54..6660fadeaf4 100644 --- a/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html +++ b/tests/wpt/web-platform-tests/video-rvfc/request-video-frame-callback.html @@ -29,6 +29,24 @@ async_test(function(t) { }, 'Test we can register a video.rVFC callback.'); +async_test(function(t) { + let video = document.createElement('video'); + + video.requestVideoFrameCallback( + t.step_func(video_now => { + // Queue a call to window.rAF, and make sure it is executed within the + // same turn of the event loop (with the same 'time' parameter). + window.requestAnimationFrame( t.step_func_done( window_now => { + assert_equals(video_now, window_now); + })); + }) + ); + + video.src = testVideo.url; + video.play(); + +}, 'Test video.rVFC callbacks run before window.rAF callbacks.'); + async_test(function(t) { let video = document.createElement('video'); diff --git a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js index d92da3d8f34..959859cba21 100644 --- a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js +++ b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js @@ -128,6 +128,7 @@ const ALL_FEATURES = [ 'unbounded', 'hit-test', 'dom-overlay', + 'light-estimation', ]; const TRACKED_IMMERSIVE_DEVICE = { diff --git a/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html b/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html index 0d8e390382f..8f63d5f37aa 100644 --- a/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html +++ b/tests/wpt/web-platform-tests/workers/modules/shared-worker-parse-error-failure.html @@ -22,7 +22,7 @@ promise_setup(async () => { }; worker.onerror = () => resolve(false); }); - assert_precondition( + assert_implements( supportsModuleWorkers, "Static import must be supported on module shared worker to run this test." ); |