From 92d17be4fe755195d2019bb22ad5387e88a35bef Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Thu, 6 Aug 2020 08:21:26 +0000 Subject: [PATCH] Update web-platform-tests to revision 5fe9625d7445a6b88640f830d90dd5489c4bda05 --- .../CSS2/floats/hit-test-floats-002.html.ini | 4 + .../CSS2/floats/hit-test-floats-004.html.ini | 4 + .../CSS2/floats/hit-test-floats-005.html.ini | 4 - .../css/cssom-view/CaretPosition-001.html.ini | 4 - .../fetch/content-type/response.window.js.ini | 10 +- .../fetch/content-type/script.window.js.ini | 5 +- .../image-loads.html.ini | 2 + .../traverse_the_history_5.html.ini | 4 - ...nother-top-level-browsing-context.html.ini | 5 - .../supported-elements.html.ini | 10 +- .../fieldset-flexbox.html.ini | 2 + .../hash-name-reference.html.ini | 3 - .../iframe_sandbox_popups_escaping-3.html.ini | 3 +- ...rame_sandbox_popups_nonescaping-1.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-2.html.ini | 1 + ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../form-double-submit-3.html.ini | 4 + .../form-double-submit.html.ini | 4 - .../document-write/iframe_005.html.ini | 4 + .../promise-job-entry.html.ini | 5 +- .../streams/readable-streams/tee.any.js.ini | 59 ++++ .../webmessaging/with-ports/018.html.ini | 5 - .../webmessaging/without-ports/017.html.ini | 5 + .../Worker/Worker-constructor.html.ini | 2 - .../onerror/exception-in-onerror.html.ini | 49 +++ ...d-worker-in-data-url-context.window.js.ini | 3 +- tests/wpt/metadata/MANIFEST.json | 295 ++++++++++++++++-- .../CSS2/floats/hit-test-floats-002.html.ini | 4 + .../CSS2/floats/hit-test-floats-004.html.ini | 4 + .../CSS2/floats/hit-test-floats-005.html.ini | 4 - .../css/cssom-view/CaretPosition-001.html.ini | 4 - .../fetch/content-type/response.window.js.ini | 10 +- .../fetch/content-type/script.window.js.ini | 5 +- .../image-loads.html.ini | 2 + .../traverse_the_history_5.html.ini | 4 - ...nother-top-level-browsing-context.html.ini | 5 - .../supported-elements.html.ini | 10 +- .../fieldset-flexbox.html.ini | 2 + .../hash-name-reference.html.ini | 3 - .../iframe_sandbox_popups_escaping-3.html.ini | 3 +- ...rame_sandbox_popups_nonescaping-1.html.ini | 2 +- ...rame_sandbox_popups_nonescaping-2.html.ini | 1 + ...rame_sandbox_popups_nonescaping-3.html.ini | 3 +- .../form-double-submit-3.html.ini | 4 + .../form-double-submit.html.ini | 4 - .../document-write/iframe_005.html.ini | 4 + .../promise-job-entry.html.ini | 5 +- .../streams/readable-streams/tee.any.js.ini | 44 ++- .../webmessaging/with-ports/018.html.ini | 5 - .../webmessaging/without-ports/017.html.ini | 5 + .../Worker/Worker-constructor.html.ini | 2 - .../onerror/exception-in-onerror.html.ini | 49 +++ ...d-worker-in-data-url-context.window.js.ini | 3 +- .../mozilla/getBoundingClientRect.html.ini | 4 + ...me-ancestors-with-x-frame-options.sub.html | 12 + .../reporting/report-frame-ancestors.sub.html | 2 +- .../support/not-embeddable-frame.html | 0 .../not-embeddable-frame.html.sub.headers | 5 - .../reporting/support/not-embeddable-frame.py | 10 + ...id-item-no-aspect-ratio-stretch-1-ref.html | 39 +++ .../grid-item-no-aspect-ratio-stretch-1.html | 45 +++ .../grid-item-no-aspect-ratio-stretch-10.html | 50 +++ ...id-item-no-aspect-ratio-stretch-2-ref.html | 53 ++++ .../grid-item-no-aspect-ratio-stretch-2.html | 50 +++ ...id-item-no-aspect-ratio-stretch-3-ref.html | 53 ++++ .../grid-item-no-aspect-ratio-stretch-3.html | 50 +++ ...id-item-no-aspect-ratio-stretch-4-ref.html | 53 ++++ .../grid-item-no-aspect-ratio-stretch-4.html | 50 +++ ...id-item-no-aspect-ratio-stretch-5-ref.html | 53 ++++ .../grid-item-no-aspect-ratio-stretch-5.html | 50 +++ ...id-item-no-aspect-ratio-stretch-6-ref.html | 54 ++++ .../grid-item-no-aspect-ratio-stretch-6.html | 51 +++ ...id-item-no-aspect-ratio-stretch-7-ref.html | 54 ++++ .../grid-item-no-aspect-ratio-stretch-7.html | 51 +++ ...id-item-no-aspect-ratio-stretch-8-ref.html | 27 ++ .../grid-item-no-aspect-ratio-stretch-8.html | 50 +++ .../grid-item-no-aspect-ratio-stretch-9.html | 50 +++ .../paint-function-this-value.https.html | 43 +++ .../docs/writing-tests/index.md | 90 +++--- .../docs/writing-tests/testharness.md | 2 +- .../events/AddEventListenerOptions-once.html | 17 + .../MutationObserver-callback-arguments.html | 31 ++ .../access-reporting/reporting-observer.html | 137 +++++++- .../reporting/resources/dispatcher.py | 21 +- .../fieldset-flexbox.html | 11 + .../allow-scripts-flag-changing-1.html | 8 +- .../observer-callback-arguments.html | 28 ++ ...ild-shift-with-parent-overflow-hidden.html | 32 ++ .../child-shift-with-parent.html | 34 ++ .../inline-flow-shift-vertical-rl.html | 44 +++ .../layout-instability/inline-flow-shift.html | 42 +++ .../layout-instability/outline.html | 21 ++ ...terevent_mouse-pointer-preventdefault.html | 199 ++++++++++++ .../streams/readable-streams/tee.any.js | 51 +++ .../tools/ci/tc/github_checks_output.py | 2 +- .../tools/serve/commands.json | 1 - .../tools/serve/test_functional.py | 3 + .../tools/wpt/commands.json | 5 +- .../tools/wpt/tests/test_wpt.py | 4 + tests/wpt/web-platform-tests/tools/wpt/wpt.py | 2 + .../wptserve/tests/functional/test_stash.py | 3 + .../webxr/render_state_update.https.html | 96 ++++++ .../onerror/exception-in-onerror.html | 102 +++++- .../onerror/exception-in-onerror.js | 28 +- 104 files changed, 2429 insertions(+), 236 deletions(-) create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini create mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini create mode 100644 tests/wpt/metadata-layout-2020/fetch/cross-origin-resource-policy/image-loads.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/skip-another-top-level-browsing-context.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/html/semantics/forms/form-submission-0/form-double-submit.html.ini create mode 100644 tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini create mode 100644 tests/wpt/metadata-layout-2020/streams/readable-streams/tee.any.js.ini delete mode 100644 tests/wpt/metadata-layout-2020/webmessaging/with-ports/018.html.ini create mode 100644 tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini delete mode 100644 tests/wpt/metadata-layout-2020/workers/constructors/Worker/Worker-constructor.html.ini create mode 100644 tests/wpt/metadata-layout-2020/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html.ini create mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini create mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini delete mode 100644 tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini delete mode 100644 tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini create mode 100644 tests/wpt/metadata/fetch/cross-origin-resource-policy/image-loads.html.ini delete mode 100644 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini delete mode 100644 tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/skip-another-top-level-browsing-context.html.ini create mode 100644 tests/wpt/metadata/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html.ini create mode 100644 tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-3.html.ini delete mode 100644 tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit.html.ini create mode 100644 tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini delete mode 100644 tests/wpt/metadata/webmessaging/with-ports/018.html.ini create mode 100644 tests/wpt/metadata/webmessaging/without-ports/017.html.ini delete mode 100644 tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini create mode 100644 tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html.ini create mode 100644 tests/wpt/mozilla/meta/mozilla/getBoundingClientRect.html.ini create mode 100644 tests/wpt/web-platform-tests/content-security-policy/reporting/report-frame-ancestors-with-x-frame-options.sub.html delete mode 100644 tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.html delete mode 100644 tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.html.sub.headers create mode 100644 tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.py create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8-ref.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html create mode 100644 tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html create mode 100644 tests/wpt/web-platform-tests/css/css-paint-api/paint-function-this-value.https.html create mode 100644 tests/wpt/web-platform-tests/dom/nodes/MutationObserver-callback-arguments.html create mode 100644 tests/wpt/web-platform-tests/intersection-observer/observer-callback-arguments.html create mode 100644 tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent-overflow-hidden.html create mode 100644 tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent.html create mode 100644 tests/wpt/web-platform-tests/layout-instability/inline-flow-shift-vertical-rl.html create mode 100644 tests/wpt/web-platform-tests/layout-instability/inline-flow-shift.html create mode 100644 tests/wpt/web-platform-tests/layout-instability/outline.html create mode 100644 tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-pointer-preventdefault.html create mode 100644 tests/wpt/web-platform-tests/webxr/render_state_update.https.html 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-004.html.ini new file mode 100644 index 00000000000..4bfb0c2053a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-004.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 deleted file mode 100644 index baa9f1a7541..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-005.html] - [Miss clipped float] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index 4c79907309b..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - 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 7679f3378c0..1cdc62e8ec0 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 @@ -315,18 +315,18 @@ [ + + + diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-frame-ancestors.sub.html b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-frame-ancestors.sub.html index a5aa1661c10..cd7bbcb9731 100644 --- a/tests/wpt/web-platform-tests/content-security-policy/reporting/report-frame-ancestors.sub.html +++ b/tests/wpt/web-platform-tests/content-security-policy/reporting/report-frame-ancestors.sub.html @@ -6,7 +6,7 @@ Reporting works with frame-ancestors - + diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.html b/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.html.sub.headers b/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.html.sub.headers deleted file mode 100644 index beecdb765cd..00000000000 --- a/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.html.sub.headers +++ /dev/null @@ -1,5 +0,0 @@ -Expires: Mon, 26 Jul 1997 05:00:00 GMT -Cache-Control: no-store, no-cache, must-revalidate -Cache-Control: post-check=0, pre-check=0, false -Pragma: no-cache -Content-Security-Policy: frame-ancestors 'none'; report-uri ../../support/report.py?op=put&reportID={{GET[reportID]}} \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.py b/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.py new file mode 100644 index 00000000000..50f9c83cf5c --- /dev/null +++ b/tests/wpt/web-platform-tests/content-security-policy/reporting/support/not-embeddable-frame.py @@ -0,0 +1,10 @@ +def main(request, response): + headers = [] + if request.GET.first(b'xFrameOptions', None): + headers.append((b'X-Frame-Options', request.GET[b'xFrameOptions'])) + + csp_header = b'Content-Security-Policy-Report-Only' \ + if request.GET.first(b'reportOnly', None) == 'true' else b'Content-Security-Policy' + headers.append((csp_header, b"frame-ancestors 'none'; report-uri ../../support/report.py?op=put&reportID=" + request.GET[b'reportID'])) + + return headers, b'{}' diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1-ref.html new file mode 100644 index 00000000000..6a7862c9acb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1-ref.html @@ -0,0 +1,39 @@ + + +CSS Test Reference + +
+ +
+
+ +
+
+ +
+
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1.html new file mode 100644 index 00000000000..1b5ae0a6ad8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-1.html @@ -0,0 +1,45 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html new file mode 100644 index 00000000000..6d8d7e848c2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html @@ -0,0 +1,50 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2-ref.html new file mode 100644 index 00000000000..69d59e85a3c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2-ref.html @@ -0,0 +1,53 @@ + + +Reference: stretching works for replaced items with no aspect ratio + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2.html new file mode 100644 index 00000000000..5371e560a5f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-2.html @@ -0,0 +1,50 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3-ref.html new file mode 100644 index 00000000000..7ee8a2d6bdc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3-ref.html @@ -0,0 +1,53 @@ + + +Reference: stretching works for replaced items with no aspect ratio + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3.html new file mode 100644 index 00000000000..e2b05bd2166 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-3.html @@ -0,0 +1,50 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4-ref.html new file mode 100644 index 00000000000..9edb8aa76f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4-ref.html @@ -0,0 +1,53 @@ + + +Reference: stretching works for replaced items with no aspect ratio + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4.html new file mode 100644 index 00000000000..1cf2849dad3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-4.html @@ -0,0 +1,50 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5-ref.html new file mode 100644 index 00000000000..6a3446534a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5-ref.html @@ -0,0 +1,53 @@ + + +Reference: stretching works for replaced items with no aspect ratio + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5.html new file mode 100644 index 00000000000..3000e9d97a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-5.html @@ -0,0 +1,50 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6-ref.html new file mode 100644 index 00000000000..33f472e71b8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6-ref.html @@ -0,0 +1,54 @@ + + +Reference: stretching works for replaced items with no aspect ratio + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6.html new file mode 100644 index 00000000000..655040eb446 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-6.html @@ -0,0 +1,51 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7-ref.html new file mode 100644 index 00000000000..0d60375f560 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7-ref.html @@ -0,0 +1,54 @@ + + +Reference: stretching works for replaced items with no aspect ratio + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7.html new file mode 100644 index 00000000000..29dec490b79 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-7.html @@ -0,0 +1,51 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8-ref.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8-ref.html new file mode 100644 index 00000000000..09dd27321ab --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8-ref.html @@ -0,0 +1,27 @@ + + +Reference: stretching works for replaced items with no aspect ratio + + + +
+
+
+
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html new file mode 100644 index 00000000000..933ddd0504e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html @@ -0,0 +1,50 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html new file mode 100644 index 00000000000..367adae9eb7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html @@ -0,0 +1,50 @@ + + +stretching works for replaced items with no aspect ratio + + + + + + +
+ +
+
+ +
+
+ +
+
+ +
+ + diff --git a/tests/wpt/web-platform-tests/css/css-paint-api/paint-function-this-value.https.html b/tests/wpt/web-platform-tests/css/css-paint-api/paint-function-this-value.https.html new file mode 100644 index 00000000000..216913899a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-paint-api/paint-function-this-value.https.html @@ -0,0 +1,43 @@ + + + +Paint callback is invoked with `this` value of `paintInstance` + + + + + + +
+ + + + + + diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/index.md b/tests/wpt/web-platform-tests/docs/writing-tests/index.md index 90a67c21fce..c1d2fe17a31 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/index.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/index.md @@ -8,43 +8,14 @@ testing plan](making-a-testing-plan) will help you decide what to write. There's also a load of [general guidelines](general-guidelines) that apply to all tests. -```eval_rst -.. toctree:: - :maxdepth: 1 +## Test Types - general-guidelines - ahem - assumptions - crashtest - css-metadata - css-user-styles - file-names - h2tests - lint-tool - making-a-testing-plan - manual - reftest-tutorial - reftests - print-reftests - rendering - server-features - submission-process - testdriver - testdriver-extension-tutorial - testharness - testharness-tutorial - tools - visual - wdspec - test-templates - github-intro -``` +There are various different ways of writing tests: -## Test Type - -Tests in this project use a few different approaches to verify expected -behavior. The tests can be classified based on the way they express -expectations: +* [JavaScript tests (testharness.js)](testharness) are preferred for testing APIs and may be used + for other features too. They are built with the testharness.js unit testing framework, and consist + of assertions written in JavaScript. A high-level [testharness.js tutorial](testharness-tutorial) + is available. * Rendering tests should be used to verify that the browser graphically displays pages as expected. See the [rendering test guidelines](rendering) @@ -53,7 +24,8 @@ expectations: * [Reftests](reftests) should be used to test rendering and layout. They consist of two or more pages with assertions as to whether they render - identically or not. + identically or not. A high-level [reftest tutorial](reftest-tutorial) is available. A + [print reftests](print-reftests) variant is available too. * [Visual tests](visual) should be used for checking rendering where there is a large number of conforming renderings such that reftests are impractical. @@ -61,10 +33,6 @@ expectations: screenshot can be taken and compared to an expected rendering for that user agent on that platform. -* [testharness.js](testharness) tests should be used (where possible!) for - testing everything else. They are built with the testharness.js unit testing - framework, and consist of assertions written in JavaScript. - * [Crashtests](crashtest) tests are used to check that the browser is able to load a given document without crashing or experiencing other low-level issues (asserts, leaks, etc.). They pass if the load @@ -78,14 +46,6 @@ expectations: tested using any of the above. They consist of a page that needs manual interaction or verification of the final result. -In general, there is a strong preference towards reftests and testharness.js -tests types (as they can be easily run without human interaction), so they -should be used in preference to the others even if it results in a -somewhat cumbersome test; there is a far weaker preference between the -two test types, and it is at times advisable to use testharness.js tests -for things which would typically be tested using reftests but for -which it would be overly cumbersome. - See [file names](file-names) for test types and features determined by the file names, and [server features](server-features) for advanced testing features. @@ -94,3 +54,37 @@ and [server features](server-features) for advanced testing features. Once you've written tests, please submit them using the [typical GitHub Pull Request workflow](submission-process); please make sure you run the [`lint` script](lint-tool) before opening a pull request! + +## Table of Contents + +```eval_rst +.. toctree:: + :maxdepth: 1 + + general-guidelines + making-a-testing-plan + testharness + testharness-tutorial + rendering + reftests + reftest-tutorial + print-reftests + visual + crashtest + wdspec + manual + file-names + server-features + submission-process + lint-tool + ahem + assumptions + css-metadata + css-user-styles + h2tests + testdriver + testdriver-extension-tutorial + tools + test-templates + github-intro +``` diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md b/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md index 1e9772a4017..1037eaca03c 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md @@ -1,4 +1,4 @@ -# testharness.js Tests +# JavaScript Tests (testharness.js) ```eval_rst .. toctree:: diff --git a/tests/wpt/web-platform-tests/dom/events/AddEventListenerOptions-once.html b/tests/wpt/web-platform-tests/dom/events/AddEventListenerOptions-once.html index ae750702c79..361c838b736 100644 --- a/tests/wpt/web-platform-tests/dom/events/AddEventListenerOptions-once.html +++ b/tests/wpt/web-platform-tests/dom/events/AddEventListenerOptions-once.html @@ -78,4 +78,21 @@ test(function() { assert_equals(invoked_count, 0, "The handler should have been removed"); }, "Once listener should be added / removed like normal listeners"); +test(function() { + var invoked_count = 0; + + for (let n = 4; n > 0; n--) { + document.addEventListener('test', (e) => { + invoked_count++; + e.stopImmediatePropagation(); + }, {once: true}); + } + + for (let n = 4; n > 0; n--) { + document.dispatchEvent(new Event('test')); + } + + assert_equals(invoked_count, 4, "The listeners should be invoked"); +}, "Multiple once listeners should be invoked even if the stopImmediatePropagation is set"); + diff --git a/tests/wpt/web-platform-tests/dom/nodes/MutationObserver-callback-arguments.html b/tests/wpt/web-platform-tests/dom/nodes/MutationObserver-callback-arguments.html new file mode 100644 index 00000000000..d64758cb4fa --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/nodes/MutationObserver-callback-arguments.html @@ -0,0 +1,31 @@ + + +MutationObserver: callback arguments + + + +
+
+ diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html index 4d1eda941ae..decad097b6d 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/access-reporting/reporting-observer.html @@ -1,3 +1,6 @@ + + + Check the ReportingObserver(s) are notified about the coop-access-violation events. @@ -12,8 +15,10 @@ const directory = "/html/cross-origin-opener-policy/reporting"; const executor_path = directory + "/resources/executor.html?pipe="; -const https = get_host_info().HTTPS_ORIGIN; +const same_origin = get_host_info().HTTPS_ORIGIN; +const cross_site = get_host_info().HTTPS_NOTSAMESITE_ORIGIN; const coep_header = '|header(Cross-Origin-Embedder-Policy,require-corp)'; +const corp_header = '|header(Cross-Origin-Resource-Policy,cross-origin)'; promise_test(async t => { // This test window. @@ -22,13 +27,13 @@ promise_test(async t => { // The "opener" window, using COOP-Report-Only and a reporter. const opener_token = token(); const opener_reportTo = reportToHeaders(token()); - const opener_url = https + executor_path + opener_reportTo.header + + const opener_url = same_origin + executor_path + opener_reportTo.header + opener_reportTo.coopReportOnlySameOriginHeader + coep_header + `&uuid=${opener_token}`; // The "openee" window, NOT using COOP. const openee_token = token(); - const openee_url = https + executor_path + `&uuid=${openee_token}`; + const openee_url = same_origin + executor_path + `&uuid=${openee_token}`; // 1. Create the opener window. window.open(opener_url); @@ -82,12 +87,12 @@ promise_test(async t => { // The "opener" window, NOT using COOP. const opener_token = token(); - const opener_url = https + executor_path + `&uuid=${opener_token}`; + const opener_url = same_origin + executor_path + `&uuid=${opener_token}`; // The "openee" window, using COOP-Report-Only and a reporter. const openee_token = token(); const openee_reportTo = reportToHeaders(token()); - const openee_url = https + executor_path + openee_reportTo.header + + const openee_url = same_origin + executor_path + openee_reportTo.header + openee_reportTo.coopReportOnlySameOriginHeader + coep_header + `&uuid=${openee_token}`; @@ -132,4 +137,126 @@ promise_test(async t => { let report_access_to = JSON.parse(await receive(this_window_token)); assert_equals(report_access_to.length, 0, "Unexpected report received."); }, "Openee COOP"); + +promise_test(async t => { + // This test window. + const this_window_token = token(); + + // The "opener" window, using COOP-Report-Only and a reporter. + const opener_token = token(); + const opener_reportTo = reportToHeaders(token()); + const opener_url = same_origin + executor_path + opener_reportTo.header + + opener_reportTo.coopReportOnlySameOriginHeader + coep_header + + `&uuid=${opener_token}`; + + // The "opener's iframe", same-origin with its parent. + const opener_iframe_token = token(); + const opener_iframe_url = same_origin + executor_path + coep_header + + `&uuid=${opener_iframe_token}`; + + // The "openee" window, NOT using COOP. + const openee_token = token(); + const openee_url = same_origin + executor_path + coep_header + + `&uuid=${openee_token}`; + + // 1. Create the opener window. + window.open(opener_url); + t.add_cleanup(() => send(opener_token, "window.close();")); + + // 2. The opener opens an iframe, and install a ReportingObserver to catch + // future accesses. + send(opener_token, ` + iframe = document.createElement("iframe"); + iframe.src = "${opener_iframe_url}"; + document.body.appendChild(iframe); + + let observer = new ReportingObserver(reports => { + send("${this_window_token}", JSON.stringify(reports)); + observer.disconnect(); + }); + observer.observe(); + `); + + // 3. The iframe opens the openee. + send(opener_iframe_token, `openee = window.open('${openee_url}');`); + t.add_cleanup(() => send(openee_token, `window.close();`)); + + // 4. Wait for the openee to load its document. + send(openee_token, `send("${this_window_token}", "Ready");`); + assert_equals(await receive(this_window_token), "Ready"); + + // 4. The opener's iframe tries to access the openee. This is an + // "access-from-coop-page" from a same-origin iframe, so the + // ReportingObserver(s) are notified. + send(opener_iframe_token, `tryAccess(openee);`); + + let reports = await receive(this_window_token); + assert_not_equals(reports, "timeout", "No report received."); + reports = JSON.parse(reports); + assert_equals(reports.length, 1, "No report received."); + assert_equals(reports[0].type, "coop-access-violation"); + assert_equals(reports[0].url, opener_url.replace(/"/g, '%22')); + assert_true(reports[0].body.sourceFile.includes("try-access.js")); + assert_equals(reports[0].body.lineNumber, 6); + assert_equals(reports[0].body.columnNumber, 7); + assert_equals(reports[0].body.property, "blur"); +}, "Access from same-origin iframe") + +promise_test(async t => { + // This test window. + const this_window_token = token(); + + // The "opener" window, using COOP-Report-Only and a reporter. + const opener_token = token(); + const opener_reportTo = reportToHeaders(token()); + const opener_url = same_origin + executor_path + opener_reportTo.header + + opener_reportTo.coopReportOnlySameOriginHeader + coep_header + + `&uuid=${opener_token}`; + + // The "opener's iframe", same-origin with its parent. + const opener_iframe_token = token(); + const opener_iframe_url = cross_site + executor_path + coep_header + + corp_header + + `&uuid=${opener_iframe_token}`; + + // The "openee" window, NOT using COOP. + const openee_token = token(); + const openee_url = same_origin + executor_path + coep_header + + `&uuid=${openee_token}`; + + // 1. Create the opener window. + window.open(opener_url); + t.add_cleanup(() => send(opener_token, "window.close();")); + + // 2. The opener opens an iframe, and install a ReportingObserver to catch + // future accesses. + send(opener_token, ` + iframe = document.createElement("iframe"); + iframe.src = "${opener_iframe_url}"; + document.body.appendChild(iframe); + + let observer = new ReportingObserver(reports => { + send("${this_window_token}", JSON.stringify(reports)); + observer.disconnect(); + }); + observer.observe(); + `); + + // 3. The iframe opens the openee. + send(opener_iframe_token, `openee = window.open('${openee_url}');`); + t.add_cleanup(() => send(openee_token, `window.close();`)); + + // 4. Wait for the openee to load its document. + send(openee_token, `send("${this_window_token}", "Ready");`); + assert_equals(await receive(this_window_token), "Ready"); + + // 5. The opener's iframe tries to access the openee. This is an + // "access-from-coop-page" from a cross-site iframe. The ReportingObservers + // from the main document aren't notified. + send(opener_iframe_token, `tryAccess(openee);`); + + let reports = await receive(this_window_token); + assert_equals(reports, "timeout", "Unexpected report received."); +}, "Access from cross-site iframe") + </script> diff --git a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.py b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.py index 2617361b0b3..e77583e479f 100644 --- a/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.py +++ b/tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/dispatcher.py @@ -9,12 +9,19 @@ def main(request, response): return b'' uuid = request.GET[b'uuid'] + stash = request.server.stash; + with stash.lock: + queue = stash.take(uuid) + if queue is None: + queue = [] - if request.method == u'POST': - return request.server.stash.put(uuid, request.body) - else: - body = request.server.stash.take(uuid) - if body is None: - return b'not ready' + if request.method == u'POST': + queue.append(request.body) + ret = b'done' else: - return body + if len(queue) == 0: + ret = b'not ready' + else: + ret = queue.pop(0) + stash.put(uuid, queue) + return ret; diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html index 07c73554e59..9e1c9ed152f 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/fieldset-flexbox.html @@ -81,4 +81,15 @@ legend { testElm.querySelector('div').offsetTop, 'offsetTop') }, "Inline flex"); + +test(() => { + const testElm = document.getElementById('test'); + testElm.style.flexDirection = 'row'; + const item0 = testElm.querySelectorAll('div')[0]; + const item1 = testElm.querySelectorAll('div')[1]; + assert_equals(item0.offsetTop, item1.offsetTop); + + testElm.style.flexDirection = 'column'; + assert_true(item0.offsetTop < item1.offsetTop); +}, "Dynamic change of flex-direction"); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html index 3bf8cfb6cc8..196f6d0409a 100644 --- a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html @@ -33,7 +33,10 @@ destIFrame.onload = () => { ++destLoadCount; if (destLoadCount === 2) { - assert_unreached("The iframe into which the meta was moved must not refresh"); + // destIFrame doesn't have the sandboxed automatic features browsing context + // flag sets, thus navigated. + assert_equals(destIFrame.contentDocument.body.textContent.trim(), "foo"); + done(); } maybeStartTest(); @@ -41,9 +44,6 @@ destIFrame.onload = () => { function maybeStartTest() { if (sourceLoadCount === 1 && destLoadCount === 1) { - // Test that no refreshes occur within 3 seconds - step_timeout(done, 3000); - const meta = sourceIFrame.contentDocument.querySelector("meta"); destIFrame.contentDocument.body.appendChild(meta); } diff --git a/tests/wpt/web-platform-tests/intersection-observer/observer-callback-arguments.html b/tests/wpt/web-platform-tests/intersection-observer/observer-callback-arguments.html new file mode 100644 index 00000000000..6e816969d00 --- /dev/null +++ b/tests/wpt/web-platform-tests/intersection-observer/observer-callback-arguments.html @@ -0,0 +1,28 @@ +<!DOCTYPE HTML> +<meta charset=utf-8> +<title>IntersectionObserver: callback arguments + + + +
+ diff --git a/tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent-overflow-hidden.html b/tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent-overflow-hidden.html new file mode 100644 index 00000000000..d69e55a51b8 --- /dev/null +++ b/tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent-overflow-hidden.html @@ -0,0 +1,32 @@ + +Layout Instability: parent (with overflow:hidden) and child moved together + + + + +
+
+
+ diff --git a/tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent.html b/tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent.html new file mode 100644 index 00000000000..7271af6d4a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/layout-instability/child-shift-with-parent.html @@ -0,0 +1,34 @@ + +Layout Instability: parent/child moved together + + + + +
+
+
+ diff --git a/tests/wpt/web-platform-tests/layout-instability/inline-flow-shift-vertical-rl.html b/tests/wpt/web-platform-tests/layout-instability/inline-flow-shift-vertical-rl.html new file mode 100644 index 00000000000..a89cad145b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/layout-instability/inline-flow-shift-vertical-rl.html @@ -0,0 +1,44 @@ + +Layout Instability: vertical-rl inline/text movement is detected + + + + + +
+ 1AAAAAAA
+ 2AAAAAAA
+ 3AAAAAAA
+
4AAAAAAA

+ 5AAAAAAA
+ 6AAAAAAA
+ 7AAAAAAA
+
+ + diff --git a/tests/wpt/web-platform-tests/layout-instability/inline-flow-shift.html b/tests/wpt/web-platform-tests/layout-instability/inline-flow-shift.html new file mode 100644 index 00000000000..0385f29c2f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/layout-instability/inline-flow-shift.html @@ -0,0 +1,42 @@ + +Layout Instability: inline/text movement is detected + + + + +
+ 1AAAAAAA
+ 2AAAAAAA
+ 3AAAAAAA
+
4AAAAAAA

+ 5AAAAAAA
+ 6AAAAAAA
+ 7AAAAAAA
+
+ diff --git a/tests/wpt/web-platform-tests/layout-instability/outline.html b/tests/wpt/web-platform-tests/layout-instability/outline.html new file mode 100644 index 00000000000..1fed8e92f5e --- /dev/null +++ b/tests/wpt/web-platform-tests/layout-instability/outline.html @@ -0,0 +1,21 @@ + +Layout Instability: outline doesn't contribute to layout shift + + + + +
+ diff --git a/tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-pointer-preventdefault.html b/tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-pointer-preventdefault.html new file mode 100644 index 00000000000..a727325a5b1 --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/compat/pointerevent_mouse-pointer-preventdefault.html @@ -0,0 +1,199 @@ + + + + + + + + +

Verifies the effect of pointer event prevent-default on following pointer & mouse events.

+
+
+ + diff --git a/tests/wpt/web-platform-tests/streams/readable-streams/tee.any.js b/tests/wpt/web-platform-tests/streams/readable-streams/tee.any.js index b6a95368aa5..55d4532ff83 100644 --- a/tests/wpt/web-platform-tests/streams/readable-streams/tee.any.js +++ b/tests/wpt/web-platform-tests/streams/readable-streams/tee.any.js @@ -317,6 +317,57 @@ promise_test(t => { }, 'ReadableStream teeing: erroring the original should immediately error the branches'); +promise_test(async t => { + + let controller; + const rs = new ReadableStream({ + start(c) { + controller = c; + } + }); + + const [reader1, reader2] = rs.tee().map(branch => branch.getReader()); + const cancelPromise = reader2.cancel(); + + controller.enqueue('a'); + + const read1 = await reader1.read(); + assert_object_equals(read1, { value: 'a', done: false }, 'first read() from branch1 should fulfill with the chunk'); + + controller.close(); + + const read2 = await reader1.read(); + assert_object_equals(read2, { value: undefined, done: true }, 'second read() from branch1 should be done'); + + await Promise.all([ + reader1.closed, + cancelPromise + ]); + +}, 'ReadableStream teeing: canceling branch1 should finish when branch2 reads until end of stream'); + +promise_test(async t => { + + let controller; + const theError = { name: 'boo!' }; + const rs = new ReadableStream({ + start(c) { + controller = c; + } + }); + + const [reader1, reader2] = rs.tee().map(branch => branch.getReader()); + const cancelPromise = reader2.cancel(); + + controller.error(theError); + + await Promise.all([ + promise_rejects_exactly(t, theError, reader1.read()), + cancelPromise + ]); + +}, 'ReadableStream teeing: canceling branch1 should finish when original stream errors'); + test(t => { // Copy original global. diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py b/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py index d799be91166..16d39900298 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py +++ b/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py @@ -21,7 +21,7 @@ def get_gh_checks_outputter(kwargs): """Return the outputter for GitHub Checks output, if enabled. :param kwargs: The arguments passed to the program (to look for the - --github_checks_text_file flag) + github_checks_text_file field) """ global __outputter if kwargs['github_checks_text_file'] and __outputter is None: diff --git a/tests/wpt/web-platform-tests/tools/serve/commands.json b/tests/wpt/web-platform-tests/tools/serve/commands.json index a5457b55a33..ed1d72e60ec 100644 --- a/tests/wpt/web-platform-tests/tools/serve/commands.json +++ b/tests/wpt/web-platform-tests/tools/serve/commands.json @@ -12,7 +12,6 @@ "parser": "get_parser", "help": "Run wptserve server for WAVE", "virtualenv": true, - "install": ["ua-parser"], "requirements": ["../wave/requirements.txt"] } } diff --git a/tests/wpt/web-platform-tests/tools/serve/test_functional.py b/tests/wpt/web-platform-tests/tools/serve/test_functional.py index 894479d111c..5a918c2ee47 100644 --- a/tests/wpt/web-platform-tests/tools/serve/test_functional.py +++ b/tests/wpt/web-platform-tests/tools/serve/test_functional.py @@ -9,6 +9,7 @@ try: import Queue as queue # noqa: N813 except ImportError: import queue +import sys import tempfile import threading @@ -45,6 +46,8 @@ def tempfile_name(): os.remove(name) +@pytest.mark.skipif(sys.version_info >= (3, 8) and sys.platform == 'darwin', + reason="multiprocessing test hangs in Python 3.8 on macOS (#24880)") def test_subprocess_exit(server_subprocesses, tempfile_name): timeout = 30 diff --git a/tests/wpt/web-platform-tests/tools/wpt/commands.json b/tests/wpt/web-platform-tests/tools/wpt/commands.json index a47ab40d728..51f66d0decb 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/commands.json +++ b/tests/wpt/web-platform-tests/tools/wpt/commands.json @@ -6,7 +6,6 @@ "help": "Run tests in a browser", "virtualenv": true, "install": [ - "requests", "zstandard" ], "requirements": [ @@ -25,9 +24,6 @@ "parser": "create_parser_update", "help": "Update expectations files from raw logs.", "virtualenv": true, - "install": [ - "requests" - ], "requirements": [ "../wptrunner/requirements.txt" ] @@ -51,6 +47,7 @@ "script": "run", "parser": "get_parser", "help": "Install browser components", + "virtualenv": true, "install": [ "mozinstall" ] diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py index b5ae79d1311..0b6aff42d57 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py +++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py @@ -188,6 +188,8 @@ def test_run_zero_tests(): @pytest.mark.slow @pytest.mark.remote_network +@pytest.mark.skipif(sys.version_info >= (3, 8) and sys.platform == 'darwin', + reason="multiprocessing test hangs in Python 3.8 on macOS (#24880)") def test_run_failing_test(): """Failing tests should be reported with a non-zero exit status unless the `--no-fail-on-unexpected` option has been specified.""" @@ -211,6 +213,8 @@ def test_run_failing_test(): @pytest.mark.slow @pytest.mark.remote_network +@pytest.mark.skipif(sys.version_info >= (3, 8) and sys.platform == 'darwin', + reason="multiprocessing test hangs in Python 3.8 on macOS (#24880)") def test_run_verify_unstable(temp_test): """Unstable tests should be reported with a non-zero exit status. Stable tests should be reported with a zero exit status.""" diff --git a/tests/wpt/web-platform-tests/tools/wpt/wpt.py b/tests/wpt/web-platform-tests/tools/wpt/wpt.py index 395db0394da..efa985c7cc1 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/wpt.py +++ b/tests/wpt/web-platform-tests/tools/wpt/wpt.py @@ -38,6 +38,8 @@ def load_commands(): "requirements": [os.path.join(base_dir, item) for item in props.get("requirements", [])] } + if rv[command]["install"] or rv[command]["requirements"]: + assert rv[command]["virtualenv"] return rv diff --git a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_stash.py b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_stash.py index 1c4c9ad933a..0b960c1e9f8 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_stash.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_stash.py @@ -1,3 +1,4 @@ +import sys import unittest import uuid @@ -9,6 +10,8 @@ from wptserve.stash import StashServer from .base import TestUsingServer +@pytest.mark.skipif(sys.version_info >= (3, 8) and sys.platform == 'darwin', + reason="multiprocessing test hangs in Python 3.8 on macOS (#24880)") class TestResponseSetCookie(TestUsingServer): def run(self, result=None): with StashServer(None, authkey=str(uuid.uuid4())): diff --git a/tests/wpt/web-platform-tests/webxr/render_state_update.https.html b/tests/wpt/web-platform-tests/webxr/render_state_update.https.html new file mode 100644 index 00000000000..2f28d442ec9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webxr/render_state_update.https.html @@ -0,0 +1,96 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html b/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html index 840433d3d89..d8aa02a01b8 100644 --- a/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html +++ b/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html @@ -1,19 +1,91 @@ -onerror, "not handled" with an error in the onerror function -
\ No newline at end of file +// 1. Exception is thrown somewhere in a Worker. +// Various contexts are tested: from worker initialization, +// from setTimeout, from event handlers, etc. +// 2. WorkerGlobalScope.onerror event handler is called. +// (i.e. `onerror` in the worker script) +// 3. From the event handler, another exception is thrown. +// 4. Each of Worker.onerror handler (on the parent Document) and +// Worker error event listener should be called twice: +// once for each of the exceptions thrown in Step 1 and 2, respectively. +// (We don't check the ordering of two Worker.onerror calls, because +// browsers fires them in different orders) + +function prepareHandler(t, messages) { + const fired = {}; + let fired_count = 0; + t.step_timeout(() => { + if (fired_count < messages.length) { + let error_description = 'Worker.onerror not fired for:'; + for (const message of messages) { + if (!fired[message]) { + error_description += ' '; + error_description += message; + } + } + assert_unreached(error_description); + } + }, 2000); + return t.step_func(e => { + e.preventDefault(); + for (const message of messages) { + if (!fired[message] && e.message.indexOf(message) >= 0) { + fired[message] = true; + ++fired_count; + if (fired_count === messages.length) { + // Worker.onerror is fired for all messages. + t.done(); + } + return; + } + } + assert_unreached("Unexpected worker.onerror message: " + e.message); + }); +} + +function expectErrors(worker, title, messages) { + async_test(t => { + worker.addEventListener('error', prepareHandler(t, messages)); + }, title+ ': listener'); + async_test(t => { + worker.onerror = prepareHandler(t, messages); + }, title + ': handler'); +} + +for (const type of ['classic', 'module']) { + const workerOptions = type === 'module' ? {type: 'module'}: {}; + + const worker1 = new Worker( + 'exception-in-onerror.js?throw-in-worker-initialization', + workerOptions); + expectErrors( + worker1, + 'Throw in worker initialization: ' + type, + ['Throw in worker initialization', 'Throw in error handler']); + + const worker2 = new Worker( + 'exception-in-onerror.js?throw-in-setTimeout-function', workerOptions); + expectErrors( + worker2, + 'Throw in setTimeout(function): ' + type, + ['Throw in setTimeout function', 'Throw in error handler']); + + const worker3 = new Worker( + 'exception-in-onerror.js?throw-in-setTimeout-string', workerOptions); + expectErrors( + worker3, + 'Throw in setTimeout(string): ' + type, + ['Throw in setTimeout string', 'Throw in error handler']); + + const worker4 = new Worker('exception-in-onerror.js', workerOptions); + worker4.postMessage('foo'); + expectErrors( + worker4, + 'Throw in message handler: ' + type, + ['Throw in message handler', 'Throw in error handler']); + +} + diff --git a/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.js b/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.js index 2bf4124cb74..61a95dda51f 100644 --- a/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.js +++ b/tests/wpt/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.js @@ -1,7 +1,25 @@ -onerror = function(a, b, c, d) { - y(); // the error is "not handled" +onerror = function() { + throw new Error('Throw in error handler'); + return false; +}; +onmessage = function() { + throw new Error('Throw in message handler'); + return false; +}; + +if (self.location.href.indexOf( + 'throw-in-worker-initialization') >= 0) { + throw new Error('Throw in worker initialization'); } -function x() { - y(); + +if (self.location.href.indexOf( + 'throw-in-setTimeout-function') >= 0) { + // To test the behavior of setTimeout(), raw setTimeout() is used. + setTimeout(() => { throw new Error('Throw in setTimeout function') }, 0); +} + +if (self.location.href.indexOf( + 'throw-in-setTimeout-string') >= 0) { + // To test the behavior of setTimeout(), raw setTimeout() is used. + setTimeout("throw new Error('Throw in setTimeout string')", 0); } -x(); \ No newline at end of file