diff options
107 files changed, 3288 insertions, 520 deletions
diff --git a/tests/wpt/metadata/FileAPI/reading-data-section/filereader_events.any.js.ini b/tests/wpt/metadata/FileAPI/reading-data-section/filereader_events.any.js.ini new file mode 100644 index 00000000000..7f3c6796ed5 --- /dev/null +++ b/tests/wpt/metadata/FileAPI/reading-data-section/filereader_events.any.js.ini @@ -0,0 +1,9 @@ +[filereader_events.any.html] + [events are dispatched in the correct order for an empty blob] + expected: FAIL + + +[filereader_events.any.worker.html] + [events are dispatched in the correct order for an empty blob] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/reading-data-section/filereader_result.html.ini b/tests/wpt/metadata/FileAPI/reading-data-section/filereader_result.html.ini new file mode 100644 index 00000000000..49bcce20688 --- /dev/null +++ b/tests/wpt/metadata/FileAPI/reading-data-section/filereader_result.html.ini @@ -0,0 +1,28 @@ +[filereader_result.html] + [result is null during "loadstart" event for readAsBinaryString] + expected: FAIL + + [result is null during "loadstart" event for readAsDataURL] + expected: FAIL + + [result is null during "progress" event for readAsArrayBuffer] + expected: FAIL + + [result is null during "progress" event for readAsBinaryString] + expected: FAIL + + [result is null during "loadstart" event for readAsArrayBuffer] + expected: FAIL + + [readAsBinaryString] + expected: FAIL + + [result is null during "progress" event for readAsDataURL] + expected: FAIL + + [result is null during "loadstart" event for readAsText] + expected: FAIL + + [result is null during "progress" event for readAsText] + expected: FAIL + diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 4631dd191aa..e7fdaf64363 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -109563,6 +109563,18 @@ {} ] ], + "css/css-break/form-control.html": [ + [ + "css/css-break/form-control.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "css/css-break/line-after-unbreakable-float-after-padding.html": [ [ "css/css-break/line-after-unbreakable-float-after-padding.html", @@ -113643,6 +113655,30 @@ {} ] ], + "css/css-display/display-change-iframe.html": [ + [ + "css/css-display/display-change-iframe.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], + "css/css-display/display-change-object-iframe.html": [ + [ + "css/css-display/display-change-object-iframe.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "css/css-display/display-contents-alignment-001.html": [ [ "css/css-display/display-contents-alignment-001.html", @@ -127201,6 +127237,18 @@ {} ] ], + "css/css-lists/counter-set-002.html": [ + [ + "css/css-lists/counter-set-002.html", + [ + [ + "/css/css-lists/counter-set-002-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-lists/li-list-item-counter.html": [ [ "css/css-lists/li-list-item-counter.html", @@ -133009,6 +133057,18 @@ {} ] ], + "css/css-position/fixed-z-index-blend.html": [ + [ + "css/css-position/fixed-z-index-blend.html", + [ + [ + "/css/css-position/fixed-z-index-blend-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-position/hypothetical-box-scroll-parent.html": [ [ "css/css-position/hypothetical-box-scroll-parent.html", @@ -137081,6 +137141,150 @@ {} ] ], + "css/css-scroll-snap/scroll-target-align-001.html": [ + [ + "css/css-scroll-snap/scroll-target-align-001.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-align-002.html": [ + [ + "css/css-scroll-snap/scroll-target-align-002.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-align-003.html": [ + [ + "css/css-scroll-snap/scroll-target-align-003.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-margin-001.html": [ + [ + "css/css-scroll-snap/scroll-target-margin-001.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-margin-002.html": [ + [ + "css/css-scroll-snap/scroll-target-margin-002.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-margin-003.html": [ + [ + "css/css-scroll-snap/scroll-target-margin-003.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-padding-001.html": [ + [ + "css/css-scroll-snap/scroll-target-padding-001.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-padding-002.html": [ + [ + "css/css-scroll-snap/scroll-target-padding-002.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-padding-003.html": [ + [ + "css/css-scroll-snap/scroll-target-padding-003.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-snap-001.html": [ + [ + "css/css-scroll-snap/scroll-target-snap-001.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-snap-002.html": [ + [ + "css/css-scroll-snap/scroll-target-snap-002.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-scroll-snap/scroll-target-snap-003.html": [ + [ + "css/css-scroll-snap/scroll-target-snap-003.html", + [ + [ + "/css/css-scroll-snap/scroll-target-001-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-scrollbars/textarea-scrollbar-width-none.html": [ [ "css/css-scrollbars/textarea-scrollbar-width-none.html", @@ -196455,6 +196659,18 @@ {} ] ], + "html/semantics/grouping-content/the-li-element/grouping-li-reftest-003.html": [ + [ + "html/semantics/grouping-content/the-li-element/grouping-li-reftest-003.html", + [ + [ + "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-003-ref.html", + "==" + ] + ], + {} + ] + ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item.html": [ [ "html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item.html", @@ -197287,6 +197503,70 @@ } ] ], + "infrastructure/reftest/reftest_fuzzy_no_differences.html": [ + [ + "infrastructure/reftest/reftest_fuzzy_no_differences.html", + [ + [ + "/infrastructure/reftest/fuzzy-ref-1.html", + "==" + ] + ], + { + "fuzzy": [ + [ + [ + "/infrastructure/reftest/reftest_fuzzy_no_differences.html", + "/infrastructure/reftest/fuzzy-ref-1.html", + "==" + ], + [ + [ + 128, + 128 + ], + [ + 0, + 100 + ] + ] + ] + ] + } + ] + ], + "infrastructure/reftest/reftest_fuzzy_no_differences_1.html": [ + [ + "infrastructure/reftest/reftest_fuzzy_no_differences_1.html", + [ + [ + "/infrastructure/reftest/fuzzy-ref-1.html", + "==" + ] + ], + { + "fuzzy": [ + [ + [ + "/infrastructure/reftest/reftest_fuzzy_no_differences_1.html", + "/infrastructure/reftest/fuzzy-ref-1.html", + "==" + ], + [ + [ + 0, + 128 + ], + [ + 100, + 100 + ] + ] + ] + ] + } + ] + ], "infrastructure/reftest/reftest_match.html": [ [ "infrastructure/reftest/reftest_match.html", @@ -209366,6 +209646,11 @@ {} ] ], + "common/security-features/resources/common.js.headers": [ + [ + {} + ] + ], "common/security-features/scope/document.py": [ [ {} @@ -209376,11 +209661,21 @@ {} ] ], + "common/security-features/scope/template/worker.js.template": [ + [ + {} + ] + ], "common/security-features/scope/util.py": [ [ {} ] ], + "common/security-features/scope/worker.py": [ + [ + {} + ] + ], "common/security-features/subresource/__init__.py": [ [ {} @@ -259851,6 +260146,11 @@ {} ] ], + "css/css-display/support/red-square.html": [ + [ + {} + ] + ], "css/css-display/support/swatch-orange.png": [ [ {} @@ -270686,6 +270986,11 @@ {} ] ], + "css/css-lists/counter-set-002-ref.html": [ + [ + {} + ] + ], "css/css-lists/li-list-item-counter-ref.html": [ [ {} @@ -272426,6 +272731,11 @@ {} ] ], + "css/css-position/fixed-z-index-blend-ref.html": [ + [ + {} + ] + ], "css/css-position/hypothetical-box-scroll-parent-ref.html": [ [ {} @@ -273881,6 +274191,31 @@ {} ] ], + "css/css-scroll-snap/scroll-target-001-ref.html": [ + [ + {} + ] + ], + "css/css-scroll-snap/support/scroll-target-align-001-iframe.html": [ + [ + {} + ] + ], + "css/css-scroll-snap/support/scroll-target-margin-001-iframe.html": [ + [ + {} + ] + ], + "css/css-scroll-snap/support/scroll-target-padding-001-iframe.html": [ + [ + {} + ] + ], + "css/css-scroll-snap/support/scroll-target-snap-001-iframe.html": [ + [ + {} + ] + ], "css/css-scrollbars/META.yml": [ [ {} @@ -303956,6 +304291,11 @@ {} ] ], + "html/semantics/grouping-content/the-li-element/grouping-li-reftest-003-ref.html": [ + [ + {} + ] + ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-ref.html": [ [ {} @@ -309781,6 +310121,11 @@ {} ] ], + "payment-handler/app-change-payment-method.js": [ + [ + {} + ] + ], "payment-handler/basic-card.js": [ [ {} @@ -337970,6 +338315,16 @@ {} ] ], + "FileAPI/reading-data-section/filereader_events.any.js": [ + [ + "FileAPI/reading-data-section/filereader_events.any.html", + {} + ], + [ + "FileAPI/reading-data-section/filereader_events.any.worker.html", + {} + ] + ], "FileAPI/reading-data-section/filereader_readAsArrayBuffer.html": [ [ "FileAPI/reading-data-section/filereader_readAsArrayBuffer.html", @@ -365361,6 +365716,12 @@ {} ] ], + "css/css-values/calc-rgb-percent-001.html": [ + [ + "css/css-values/calc-rgb-percent-001.html", + {} + ] + ], "css/css-values/calc-rounding-001.html": [ [ "css/css-values/calc-rounding-001.html", @@ -365397,12 +365758,24 @@ {} ] ], + "css/css-values/getComputedStyle-border-radius-001.html": [ + [ + "css/css-values/getComputedStyle-border-radius-001.html", + {} + ] + ], "css/css-values/getComputedStyle-border-radius-002.html": [ [ "css/css-values/getComputedStyle-border-radius-002.html", {} ] ], + "css/css-values/getComputedStyle-border-radius-003.html": [ + [ + "css/css-values/getComputedStyle-border-radius-003.html", + {} + ] + ], "css/css-values/lh-rlh-on-root-001.html": [ [ "css/css-values/lh-rlh-on-root-001.html", @@ -371736,6 +372109,12 @@ {} ] ], + "element-timing/image-not-added.html": [ + [ + "element-timing/image-not-added.html", + {} + ] + ], "element-timing/image-not-fully-visible.html": [ [ "element-timing/image-not-fully-visible.html", @@ -401548,6 +401927,18 @@ {} ] ], + "mathml/presentation-markup/mrow/inferred-mrow-baseline.html": [ + [ + "mathml/presentation-markup/mrow/inferred-mrow-baseline.html", + {} + ] + ], + "mathml/presentation-markup/mrow/inferred-mrow-stretchy.html": [ + [ + "mathml/presentation-markup/mrow/inferred-mrow-stretchy.html", + {} + ] + ], "mathml/presentation-markup/operators/mo-axis-height-1.html": [ [ "mathml/presentation-markup/operators/mo-axis-height-1.html", @@ -402497,9 +402888,9 @@ {} ] ], - "mediacapture-streams/MediaDevices-getSupportedConstraints.html": [ + "mediacapture-streams/MediaDevices-getSupportedConstraints.https.html": [ [ - "mediacapture-streams/MediaDevices-getSupportedConstraints.html", + "mediacapture-streams/MediaDevices-getSupportedConstraints.https.html", {} ] ], @@ -415919,6 +416310,14 @@ {} ] ], + "payment-handler/change-payment-method.https.html": [ + [ + "payment-handler/change-payment-method.https.html", + { + "testdriver": true + } + ] + ], "payment-handler/idlharness.https.any.js": [ [ "payment-handler/idlharness.https.any.html", @@ -439276,6 +439675,12 @@ {} ] ], + "user-timing/mark-entry-constructor.html": [ + [ + "user-timing/mark-entry-constructor.html", + {} + ] + ], "user-timing/mark-errors.html": [ [ "user-timing/mark-errors.html", @@ -441774,6 +442179,12 @@ {} ] ], + "web-animations/animation-model/keyframe-effects/computed-keyframes-shorthands.html": [ + [ + "web-animations/animation-model/keyframe-effects/computed-keyframes-shorthands.html", + {} + ] + ], "web-animations/animation-model/keyframe-effects/effect-value-context-filling.html": [ [ "web-animations/animation-model/keyframe-effects/effect-value-context-filling.html", @@ -453267,10 +453678,28 @@ {} ] ], - "xhr/event-abort.htm": [ + "xhr/event-abort.any.js": [ [ - "xhr/event-abort.htm", - {} + "xhr/event-abort.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: abort event" + ] + ] + } + ], + [ + "xhr/event-abort.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: abort event" + ] + ] + } ] ], "xhr/event-error-order.sub.html": [ @@ -453279,80 +453708,326 @@ {} ] ], - "xhr/event-error.sub.html": [ + "xhr/event-error.sub.any.js": [ [ - "xhr/event-error.sub.html", - {} + "xhr/event-error.sub.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest Test: event - error" + ] + ] + } + ], + [ + "xhr/event-error.sub.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest Test: event - error" + ] + ] + } ] ], - "xhr/event-load.htm": [ + "xhr/event-load.any.js": [ [ - "xhr/event-load.htm", - {} + "xhr/event-load.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: The send() method: Fire an event named load (synchronous flag is unset)" + ] + ] + } + ], + [ + "xhr/event-load.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: The send() method: Fire an event named load (synchronous flag is unset)" + ] + ] + } ] ], - "xhr/event-loadend.htm": [ + "xhr/event-loadend.any.js": [ [ - "xhr/event-loadend.htm", - {} + "xhr/event-loadend.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: loadend event" + ] + ] + } + ], + [ + "xhr/event-loadend.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: loadend event" + ] + ] + } ] ], - "xhr/event-loadstart-upload.htm": [ + "xhr/event-loadstart-upload.any.js": [ [ - "xhr/event-loadstart-upload.htm", - {} + "xhr/event-loadstart-upload.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: The send() method: Fire a progress event named loadstart on upload object (synchronous flag is unset)" + ] + ] + } + ], + [ + "xhr/event-loadstart-upload.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: The send() method: Fire a progress event named loadstart on upload object (synchronous flag is unset)" + ] + ] + } ] ], - "xhr/event-loadstart.htm": [ + "xhr/event-loadstart.any.js": [ [ - "xhr/event-loadstart.htm", - {} + "xhr/event-loadstart.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: loadstart event" + ] + ] + } + ], + [ + "xhr/event-loadstart.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: loadstart event" + ] + ] + } ] ], - "xhr/event-progress.htm": [ + "xhr/event-progress.any.js": [ [ - "xhr/event-progress.htm", + "xhr/event-progress.any.html", { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: The send() method: Fire a progress event named progress (synchronous flag is unset)" + ], + [ + "timeout", + "long" + ] + ], + "timeout": "long" + } + ], + [ + "xhr/event-progress.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: The send() method: Fire a progress event named progress (synchronous flag is unset)" + ], + [ + "timeout", + "long" + ] + ], "timeout": "long" } ] ], - "xhr/event-readystate-sync-open.htm": [ + "xhr/event-readystate-sync-open.any.js": [ [ - "xhr/event-readystate-sync-open.htm", - {} + "xhr/event-readystate-sync-open.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: open() call fires sync readystate event" + ] + ] + } + ], + [ + "xhr/event-readystate-sync-open.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: open() call fires sync readystate event" + ] + ] + } ] ], - "xhr/event-readystatechange-loaded.htm": [ + "xhr/event-readystatechange-loaded.any.js": [ [ - "xhr/event-readystatechange-loaded.htm", + "xhr/event-readystatechange-loaded.any.html", { - "timeout": "long" + "script_metadata": [ + [ + "title", + "XMLHttpRequest: the LOADING state change may be emitted multiple times" + ] + ] + } + ], + [ + "xhr/event-readystatechange-loaded.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: the LOADING state change may be emitted multiple times" + ] + ] } ] ], - "xhr/event-timeout-order.htm": [ + "xhr/event-timeout-order.any.js": [ [ - "xhr/event-timeout-order.htm", - {} + "xhr/event-timeout-order.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: event - timeout (order of events)" + ], + [ + "script", + "resources/xmlhttprequest-event-order.js" + ] + ] + } + ], + [ + "xhr/event-timeout-order.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: event - timeout (order of events)" + ], + [ + "script", + "resources/xmlhttprequest-event-order.js" + ] + ] + } ] ], - "xhr/event-timeout.htm": [ + "xhr/event-timeout.any.js": [ [ - "xhr/event-timeout.htm", - {} + "xhr/event-timeout.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: timeout event" + ] + ] + } + ], + [ + "xhr/event-timeout.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: timeout event" + ] + ] + } ] ], - "xhr/event-upload-progress-crossorigin.htm": [ + "xhr/event-upload-progress-crossorigin.any.js": [ [ - "xhr/event-upload-progress-crossorigin.htm", - {} + "xhr/event-upload-progress-crossorigin.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: upload progress event for cross-origin requests" + ], + [ + "script", + "/common/get-host-info.sub.js" + ] + ] + } + ], + [ + "xhr/event-upload-progress-crossorigin.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: upload progress event for cross-origin requests" + ], + [ + "script", + "/common/get-host-info.sub.js" + ] + ] + } ] ], - "xhr/event-upload-progress.htm": [ + "xhr/event-upload-progress.any.js": [ [ - "xhr/event-upload-progress.htm", - {} + "xhr/event-upload-progress.any.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: upload progress event" + ], + [ + "script", + "/common/get-host-info.sub.js" + ] + ] + } + ], + [ + "xhr/event-upload-progress.any.worker.html", + { + "script_metadata": [ + [ + "title", + "XMLHttpRequest: upload progress event" + ], + [ + "script", + "/common/get-host-info.sub.js" + ] + ] + } ] ], "xhr/firing-events-http-content-length.html": [ @@ -480058,6 +480733,10 @@ "cf4524825b80cac569b63b71b4ace474a0e66c24", "testharness" ], + "FileAPI/reading-data-section/filereader_events.any.js": [ + "ac692907d119f7c8cc9c6e028df4819f27a5112e", + "testharness" + ], "FileAPI/reading-data-section/filereader_file-manual.html": [ "702ca9afd7b06702564d89558676c6e1b80a6611", "manual" @@ -480087,7 +480766,7 @@ "testharness" ], "FileAPI/reading-data-section/filereader_result.html": [ - "957d0337a752b8bccbde271c1d864de6ef33e765", + "b80322ed424f83edfe5470654a241844c0b12ed7", "testharness" ], "FileAPI/reading-data-section/support/blue-100x100.png": [ @@ -487083,7 +487762,11 @@ "support" ], "common/security-features/resources/common.js": [ - "2b4349d24e56c6e8ae325aae2a18b874a7006db8", + "10a3190767f264cc8ec6e332ea11f3bbead59614", + "support" + ], + "common/security-features/resources/common.js.headers": [ + "cb762eff806849df46dc758ef7b98b63f27f54c9", "support" ], "common/security-features/scope/document.py": [ @@ -487094,10 +487777,18 @@ "feccb69e9de4cd001fd7446ffd3fa4875a906fe2", "support" ], + "common/security-features/scope/template/worker.js.template": [ + "ac3fc672d1911f91daaf5141ed576053daf91d64", + "support" + ], "common/security-features/scope/util.py": [ "42f8326b36aab10751cf2052354925a7ad0ca867", "support" ], + "common/security-features/scope/worker.py": [ + "40817f6a3a91e202598a5f93098d0b8585a926a8", + "support" + ], "common/security-features/subresource/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -574578,6 +575269,10 @@ "e2e7297d1532fba60d2074aa2701600dc7441742", "visual" ], + "css/css-break/form-control.html": [ + "8ef6eedae252f36de3bfeef8c3a6db23bf6f3d89", + "reftest" + ], "css/css-break/hit-test-inline-fragmentation-with-border-radius.html": [ "4d0fc7eccc45e44480b4305632ceac2068c59919", "testharness" @@ -576275,7 +576970,7 @@ "reftest" ], "css/css-contain/contain-size-grid-002.html": [ - "1e7771e7c12b9c5c879e52071f9f566bd6e2b7d7", + "43361c298343117362f35596611a9faf854cea47", "reftest" ], "css/css-contain/contain-size-monolithic-001.html": [ @@ -577390,6 +578085,14 @@ "4e70cb46303c01463675abee7b284da616bc355b", "support" ], + "css/css-display/display-change-iframe.html": [ + "c12c413d5390aaf4ea4c71c689952bbdb62069df", + "reftest" + ], + "css/css-display/display-change-object-iframe.html": [ + "8b56aff95909d88ccc9797a8fd6aa42b35c9dd4f", + "reftest" + ], "css/css-display/display-contents-alignment-001-ref.html": [ "595aa7f7e5b9bb3d0c2da3afc6ae7d6ae733e241", "support" @@ -578766,6 +579469,10 @@ "62d1aca2e5147cb849f8a36d616cf7143e9cf055", "support" ], + "css/css-display/support/red-square.html": [ + "e4e48ccfdc5356431c5b3bccf8481e207ac02283", + "support" + ], "css/css-display/support/swatch-orange.png": [ "d3cd498b52bd88ea6c991f050f1ecb1cfdd136bb", "support" @@ -593586,6 +594293,14 @@ "3be4c737c2ba0cc9af542413b7df7d682486efff", "reftest" ], + "css/css-lists/counter-set-002-ref.html": [ + "5ee2e30a9dda7c1ee5f468d6df994e9e8c971355", + "support" + ], + "css/css-lists/counter-set-002.html": [ + "a4792599826cf13bb40a70c36d850e6593fbce55", + "reftest" + ], "css/css-lists/inheritance.html": [ "590319d63fd09466f4d5fffe6943b4ff0430fcee", "testharness" @@ -597466,6 +598181,14 @@ "c1ce1ff602eee4668b9cb5d0168c4372193a8d3a", "support" ], + "css/css-position/fixed-z-index-blend-ref.html": [ + "2675401b4092996c2b3c3b80426f2730dc7bbf5f", + "support" + ], + "css/css-position/fixed-z-index-blend.html": [ + "5558228614060aad3ecfd48f474cdc1a878ea897", + "reftest" + ], "css/css-position/hypothetical-box-scroll-parent-ref.html": [ "86956adf1def0ce5ac4ef7e198033c46484da7e9", "support" @@ -601094,6 +601817,58 @@ "cfe990c4fcab85898899039f71fa353484558789", "testharness" ], + "css/css-scroll-snap/scroll-target-001-ref.html": [ + "28b00184c2ef5f33f6a2e8927233f6f7f42b1973", + "support" + ], + "css/css-scroll-snap/scroll-target-align-001.html": [ + "eeda674e07c591cb1d17cce1c8f8bb460c45fbdf", + "reftest" + ], + "css/css-scroll-snap/scroll-target-align-002.html": [ + "7e82f030e4c3a47e84475ad440a80b907ffbe99f", + "reftest" + ], + "css/css-scroll-snap/scroll-target-align-003.html": [ + "1d6fbebbcd7f652746ece943a240ba2540a10710", + "reftest" + ], + "css/css-scroll-snap/scroll-target-margin-001.html": [ + "8ddbbcec5f0b7992ba366c5f638b548327eb9fb2", + "reftest" + ], + "css/css-scroll-snap/scroll-target-margin-002.html": [ + "a02cf7db17517cb9bcfd56173c4b6f94cb5f1283", + "reftest" + ], + "css/css-scroll-snap/scroll-target-margin-003.html": [ + "d0434db515a68bb7b280edaebe8428dd705d4fc3", + "reftest" + ], + "css/css-scroll-snap/scroll-target-padding-001.html": [ + "5cd4fddcc53637b6f7e005574398d88c48bed8b1", + "reftest" + ], + "css/css-scroll-snap/scroll-target-padding-002.html": [ + "3a0ca3b8519e8dc73ed9a3b19c7af0312c5d69a6", + "reftest" + ], + "css/css-scroll-snap/scroll-target-padding-003.html": [ + "1e92e9be72fa17d718a6e121c5e18edf8bbcae3d", + "reftest" + ], + "css/css-scroll-snap/scroll-target-snap-001.html": [ + "76d3222a0bf34750c90b236348694580c42ea94e", + "reftest" + ], + "css/css-scroll-snap/scroll-target-snap-002.html": [ + "89df44cba28443c015032301df4c0088ed9fe228", + "reftest" + ], + "css/css-scroll-snap/scroll-target-snap-003.html": [ + "3e90347a4dc9ee07e04350a6436309c673a13569", + "reftest" + ], "css/css-scroll-snap/scrollTo-scrollBy-snaps.html": [ "48bfb51c2d9e838d6ed78fbda636b3657607abc0", "testharness" @@ -601103,7 +601878,7 @@ "manual" ], "css/css-scroll-snap/snap-inline-block.html": [ - "9f9da8f648bfc0f873b339639bd18aba1e25b4c3", + "377039c3843fcc26f09e32343a09cdc6f7eb6ec6", "testharness" ], "css/css-scroll-snap/snap-to-transformed-target.html": [ @@ -601114,6 +601889,22 @@ "3e822db02e675a3a8799f69f86d2bc93507c7547", "testharness" ], + "css/css-scroll-snap/support/scroll-target-align-001-iframe.html": [ + "20922ea18ea104bd613a27fcce58a1f0e9ba70ad", + "support" + ], + "css/css-scroll-snap/support/scroll-target-margin-001-iframe.html": [ + "8eb5b9c863853a29eeaefa33caa89ae237278071", + "support" + ], + "css/css-scroll-snap/support/scroll-target-padding-001-iframe.html": [ + "b9467e4347fe3dd005123f7c76e6cda1596e79d8", + "support" + ], + "css/css-scroll-snap/support/scroll-target-snap-001-iframe.html": [ + "1a598fa72384b40ee0331c6a3aaeaaa0fac3ae02", + "support" + ], "css/css-scroll-snap/unreachable-snap-positions.html": [ "ca4f6033cece748bb1b4b39c755569174a75ecb5", "testharness" @@ -620326,6 +621117,10 @@ "3994efc003b5a17bc1346aa77719d928a5d3ef79", "reftest" ], + "css/css-values/calc-rgb-percent-001.html": [ + "1446c28d389a2087c8d61c7894b4a2dd19994c93", + "testharness" + ], "css/css-values/calc-rounding-001.html": [ "dfd03a695305e0721154bf26f68a5912216d9862", "testharness" @@ -620394,10 +621189,18 @@ "4eab829697f87606a64d60f360a04639e61ccabb", "reftest" ], + "css/css-values/getComputedStyle-border-radius-001.html": [ + "6f3ba3ac4776045c94603b647d0a1ba134f5caf6", + "testharness" + ], "css/css-values/getComputedStyle-border-radius-002.html": [ "8dec53f3f0ef4b3c1844fe019e76b25f5f374e38", "testharness" ], + "css/css-values/getComputedStyle-border-radius-003.html": [ + "98d320bca287b869a752c97de1a1be0f706642a9", + "testharness" + ], "css/css-values/ic-unit-001.html": [ "b969278da90130eecf2c73c5accc945dda39d912", "reftest" @@ -644842,6 +645645,10 @@ "22ff91189b1370b703f89f55d83cde014b6d367d", "testharness" ], + "element-timing/image-not-added.html": [ + "59a254e9f179b19bdfe878b49f1300fc0bda56d1", + "testharness" + ], "element-timing/image-not-fully-visible.html": [ "279fa03cc2b42029ed01a68f670829c13b282a5c", "testharness" @@ -664155,7 +664962,7 @@ "testharness" ], "html/semantics/forms/constraints/form-validation-validate.html": [ - "47b41ffeb23afb895f7956103f901ae0beaf1a8f", + "e32fd90330cd05d03373a07d1d8b5b2a4081fb66", "testharness" ], "html/semantics/forms/constraints/form-validation-validity-badInput.html": [ @@ -664167,7 +664974,7 @@ "testharness" ], "html/semantics/forms/constraints/form-validation-validity-patternMismatch.html": [ - "5a0012b0eb37d9bc584d53fb0ad18e9f33257860", + "d8677898ff135a7db42bc050d2d1dad582477af4", "testharness" ], "html/semantics/forms/constraints/form-validation-validity-rangeOverflow.html": [ @@ -664687,7 +665494,7 @@ "testharness" ], "html/semantics/forms/the-form-element/form-autocomplete.html": [ - "618aa0a6c4793701fb1c16fe5924482c94a99e46", + "ec79bac73d1a27f53fc3c79627dae1f7ca9fcf5a", "testharness" ], "html/semantics/forms/the-form-element/form-checkvalidity.html": [ @@ -665298,6 +666105,14 @@ "3c0a464255d1df735459b261ca284640699aaa0f", "reftest" ], + "html/semantics/grouping-content/the-li-element/grouping-li-reftest-003-ref.html": [ + "dbe4c05bad65080aae5edbf055bff2b5f4a72bc7", + "support" + ], + "html/semantics/grouping-content/the-li-element/grouping-li-reftest-003.html": [ + "bad3819604f70183a5ba434260ff6212caa6aa8a", + "reftest" + ], "html/semantics/grouping-content/the-li-element/grouping-li-reftest-display-list-item-ref.html": [ "fb142f84b8308914946775874d4b8cbaef641a09", "support" @@ -670942,6 +671757,14 @@ "1930fe0ae8fb1aee30e91e691fe6a73ccfc87d0e", "reftest" ], + "infrastructure/reftest/reftest_fuzzy_no_differences.html": [ + "324873a8ccf70bed77a328a75ae8e2de08d1ba32", + "reftest" + ], + "infrastructure/reftest/reftest_fuzzy_no_differences_1.html": [ + "6bf85ceebedc63c0cefc7dce044739c46a08f350", + "reftest" + ], "infrastructure/reftest/reftest_match.html": [ "333cc6c1ecdf2000e4b118565661761b876a7299", "reftest" @@ -672446,6 +673269,14 @@ "8fbf5ac806e61e400214b2157180e8aac4fd2d31", "reftest" ], + "mathml/presentation-markup/mrow/inferred-mrow-baseline.html": [ + "0904d9f17ed2ed1e5af5134ea1ccfcb17674581b", + "testharness" + ], + "mathml/presentation-markup/mrow/inferred-mrow-stretchy.html": [ + "f75726c11d09d488e81041f4da79e30edc752895", + "testharness" + ], "mathml/presentation-markup/operators/mo-axis-height-1.html": [ "c88484b9d59a7811f6cfde7065de4facbdf1f74a", "testharness" @@ -673754,7 +674585,7 @@ "76ca435cf588881ba90a73663fd0708fb9e27dd2", "testharness" ], - "mediacapture-streams/MediaDevices-getSupportedConstraints.html": [ + "mediacapture-streams/MediaDevices-getSupportedConstraints.https.html": [ "fff4f349e1ccc01481be36c0ab0ff7c174fea681", "testharness" ], @@ -674355,7 +675186,7 @@ "testharness" ], "mixed-content/generic/mixed-content-test-case.js": [ - "221210814c52af5afa3bb65e174d6e527dff31a7", + "eb9fc13f7c0fc5af0ade3df58a942fde5ae6d823", "support" ], "mixed-content/generic/sanity-checker.js": [ @@ -683818,6 +684649,10 @@ "0bb949047359c004359b7f030f6d5d12a6015f9b", "support" ], + "payment-handler/app-change-payment-method.js": [ + "7a9f7a7fa7538fd234c5930cb96b2e6fdf970a77", + "support" + ], "payment-handler/basic-card.js": [ "2db5d4b719fac4dbcfa65f4166c16a5b8d253097", "support" @@ -683846,6 +684681,10 @@ "7c09f5d407e890c0ed02df1217d85f2f36d722bc", "testharness" ], + "payment-handler/change-payment-method.https.html": [ + "b85dad642d8490406347bbf39aef83641bfefa5f", + "testharness" + ], "payment-handler/idlharness.https.any.js": [ "878114ec7ed878d3e754341cbffa138092fee129", "testharness" @@ -684343,7 +685182,7 @@ "testharness" ], "performance-timeline/po-observe.html": [ - "6cc3f1ecf56202917bc8b6a340befb6b0a61d949", + "a48f0f3764bda4ceb88b2a8be4d65f168362627a", "testharness" ], "performance-timeline/po-resource.html": [ @@ -684815,7 +685654,7 @@ "testharness" ], "pointerevents/pointerlock/pointerevent_coordinates_when_locked.html": [ - "9dfd5e1764d33dfd1af7ee62af20b1e0424ac64b", + "a79327252277d3b27e416e885b27ff6cb0b0bf5d", "testharness" ], "pointerevents/pointerlock/pointerevent_movementxy-manual.html": [ @@ -694783,7 +695622,7 @@ "testharness" ], "resource-timing/redirects.sub.html": [ - "0e3f405e14b7af9f0b2a4fe5ce916ed1e47534de", + "d3d4f75c817dea1f61e27660949ec327d3a7a61a", "testharness" ], "resource-timing/resource-reload-TAO.sub.html": [ @@ -695015,11 +695854,11 @@ "support" ], "resource-timing/resources/fake_responses_https.sub.html": [ - "cf49fb914bebe0c18d8af19a1a1362ae64217eb5", + "21f1f02a6747f12becfe14dfcbdff7263b32bacd", "support" ], "resource-timing/resources/fake_responses_https_redirect.sub.html": [ - "c55e037d1dc15c1247c1a0ad2396c1416b577800", + "2ee92b2a5511c0d43359e0db7ee3b64ae5f9115c", "support" ], "resource-timing/resources/green_frame.htm": [ @@ -706363,7 +707202,7 @@ "support" ], "tools/manifest/item.py": [ - "1556bfafdafb47d9a44629b33a3e376e85c4af6c", + "f18e5ba6c9de2c82dab3be03f07fb470204785a3", "support" ], "tools/manifest/log.py": [ @@ -706371,7 +707210,7 @@ "support" ], "tools/manifest/manifest.py": [ - "dd2e3627f478bbabdad532185b17cf6769381086", + "5dde9374642381c42527289addf8d7687b08a245", "support" ], "tools/manifest/sourcefile.py": [ @@ -706387,7 +707226,7 @@ "support" ], "tools/manifest/tests/test_item.py": [ - "385180b25ce1eb2c5ebc5ead56c9e3a941bdd7bd", + "99899c5909b709735a1e240032709b587762f60c", "support" ], "tools/manifest/tests/test_manifest.py": [ @@ -706819,7 +707658,7 @@ "support" ], "tools/requirements_mypy.txt": [ - "0654986be4f9ba06b1d8089ab18af5d72afc5370", + "8caf51e9a168044b496f8343049567f10cddfcd9", "support" ], "tools/runner/css/bootstrap-theme.min.css": [ @@ -711243,7 +712082,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/base.py": [ - "cfbc42f61a0ea50b413a6ec14424bb1fa67bf87d", + "d1c123a3ef39c016fb32475e5255c119f306a828", "support" ], "tools/wptrunner/wptrunner/executors/executorchrome.py": [ @@ -712718,6 +713557,10 @@ "e47a3ba7a981e978cdf015f8fc6bfbae6762dba9", "testharness" ], + "user-timing/mark-entry-constructor.html": [ + "47c9a644118a5f52dd46fc5dfd1d275ce2e6f52d", + "testharness" + ], "user-timing/mark-errors.html": [ "c182a39c65e12a4a697e4c42fb2bd7e3aa3c874d", "testharness" @@ -714378,6 +715221,10 @@ "78f46c9e4684b4d7a7144ca071451069101c8a55", "testharness" ], + "web-animations/animation-model/keyframe-effects/computed-keyframes-shorthands.html": [ + "ff62a23bce00900ddaac1a5249524bc2cc827968", + "testharness" + ], "web-animations/animation-model/keyframe-effects/effect-value-context-filling.html": [ "fcb7f131266c47bb225aa78458ba96b043a47e41", "testharness" @@ -722531,7 +723378,7 @@ "testharness" ], "webxr/xrRigidTransform_inverse.https.html": [ - "da34fec60f00c15fe814e64b918e4a30d9716f70", + "706f72102ad3e7e6d9daaf30e6a98c888fbdbcba", "testharness" ], "webxr/xrRigidTransform_matrix.https.html": [ @@ -724678,60 +725525,60 @@ "88a7d78fc5953bc89b45503f1792f3a1d1dfe789", "testharness" ], - "xhr/event-abort.htm": [ - "2f80d1b60780a4c274a4ade882555e6e7a1b8845", + "xhr/event-abort.any.js": [ + "9b38ccf9c9e19765111b96df595abf780f6bfeb8", "testharness" ], "xhr/event-error-order.sub.html": [ "f03707eb98d7f5737c6aec44d0de4c043deb3731", "testharness" ], - "xhr/event-error.sub.html": [ - "5f275600006360c3d61377507be9ecda3f3ee002", + "xhr/event-error.sub.any.js": [ + "df63dc05bfa41cc4da9679d020b4cbdbb4e906a4", "testharness" ], - "xhr/event-load.htm": [ - "cdd0c5bb8ad1876a3a96797f5f64a7437eecae5d", + "xhr/event-load.any.js": [ + "72e46a5cea81ec06a981d973c564db4c7d9f3cb7", "testharness" ], - "xhr/event-loadend.htm": [ - "b17d9b9134ea8669fd440433c0d0d9ffc1a729db", + "xhr/event-loadend.any.js": [ + "7bd1844b378c0f63da44a896e398e8b1edcd9cf5", "testharness" ], - "xhr/event-loadstart-upload.htm": [ - "275d418a7e090e11e20a60acac31e87978fe64c5", + "xhr/event-loadstart-upload.any.js": [ + "0f41cd1286b74a7c0f0def2fc9b16f4a81dc3c97", "testharness" ], - "xhr/event-loadstart.htm": [ - "442be938dc7f95760da4e7df345cac1b1d1497b3", + "xhr/event-loadstart.any.js": [ + "4778404a00ef5fa2302d0b93776e1c5039a1a5a1", "testharness" ], - "xhr/event-progress.htm": [ - "5e9090e3dfc1327405bad25710ce386d95c57637", + "xhr/event-progress.any.js": [ + "0e7c3a42c7df6872d9e23a39f2164a185bf251fc", "testharness" ], - "xhr/event-readystate-sync-open.htm": [ - "ae9697ea13a94fb230a31b61e11cf76593f7bf61", + "xhr/event-readystate-sync-open.any.js": [ + "321635e7dea40c28d43490c7846ebfdf97993af2", "testharness" ], - "xhr/event-readystatechange-loaded.htm": [ - "6cbcc22a3308a1d1f7921a47f27cf57722dfabc2", + "xhr/event-readystatechange-loaded.any.js": [ + "1e4467aaebdaf9bf192b16d679ee9f92488dba25", "testharness" ], - "xhr/event-timeout-order.htm": [ - "d4dc78010a74df528fae081beb270a51b25e94d3", + "xhr/event-timeout-order.any.js": [ + "b35e908a9d8c102aa9019649fad6c591779d60c6", "testharness" ], - "xhr/event-timeout.htm": [ - "c40213562b57ad56f8bf06a7a89f0453d53a1fd1", + "xhr/event-timeout.any.js": [ + "d114b08b3e124eef560a3fd7bce1247cf43a347e", "testharness" ], - "xhr/event-upload-progress-crossorigin.htm": [ - "5e558a27b78b1879e0ad3e352037db3434b9fb6a", + "xhr/event-upload-progress-crossorigin.any.js": [ + "1036f2b14f0a39744d5b92ea95c6f2c5bf0c67b7", "testharness" ], - "xhr/event-upload-progress.htm": [ - "697d4cbd3f61cd223ea7b295306474c77b1de2dd", + "xhr/event-upload-progress.any.js": [ + "5d1546757ba424c6bce0c14412deb81494198e8a", "testharness" ], "xhr/firing-events-http-content-length.html": [ diff --git a/tests/wpt/metadata/css/css-values/getComputedStyle-border-radius-001.html.ini b/tests/wpt/metadata/css/css-values/getComputedStyle-border-radius-001.html.ini new file mode 100644 index 00000000000..e224bac8db0 --- /dev/null +++ b/tests/wpt/metadata/css/css-values/getComputedStyle-border-radius-001.html.ini @@ -0,0 +1,4 @@ +[getComputedStyle-border-radius-001.html] + [testing border-radius shorthand] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-values/getComputedStyle-border-radius-003.html.ini b/tests/wpt/metadata/css/css-values/getComputedStyle-border-radius-003.html.ini new file mode 100644 index 00000000000..bd84259f902 --- /dev/null +++ b/tests/wpt/metadata/css/css-values/getComputedStyle-border-radius-003.html.ini @@ -0,0 +1,4 @@ +[getComputedStyle-border-radius-003.html] + [testing border-radius shorthand] + expected: FAIL + diff --git a/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini b/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini new file mode 100644 index 00000000000..e6e1f29e274 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini @@ -0,0 +1,2 @@ +[matchMedia-display-none-iframe.html] + expected: ERROR diff --git a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini index 939a36eb9d9..3d135f3bd66 100644 --- a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini +++ b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini @@ -2,6 +2,7 @@ type: testharness [single-byte-decoder.html?document] + expected: TIMEOUT [ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)] 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 18f786d4963..841f2ab46db 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -312,3 +312,24 @@ [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] expected: FAIL + [<iframe>: combined response Content-Type: */* text/html] + expected: FAIL + + [<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html] + expected: FAIL + + [<iframe>: separate response Content-Type: text/html;" text/plain] + expected: FAIL + + [<iframe>: separate response Content-Type: text/html;charset=gbk text/plain text/html] + expected: FAIL + + [<iframe>: separate response Content-Type: */* text/html] + expected: FAIL + + [<iframe>: separate response Content-Type: text/html;x=" text/plain] + expected: FAIL + + [<iframe>: separate response Content-Type: text/html;" \\" text/plain] + 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 87c807a49ff..536384f36e1 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,3 +11,6 @@ [X-Content-Type-Options%3A%20nosniff%0C] expected: FAIL + [X-Content-Type-Options%3A%20%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 deleted file mode 100644 index 87b07c3e670..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[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_5.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini new file mode 100644 index 00000000000..dc2e45516de --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_5.html] + [Multiple history traversals, last would be aborted] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini index a9ecf082f2b..966eeacba48 100644 --- a/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html.ini @@ -90,3 +90,21 @@ [[INPUT in PASSWORD status\] The value attribute mismatches the pattern attribute] expected: FAIL + [[INPUT in EMAIL status\] The value attribute mismatches the pattern attribute even when a subset matches] + expected: FAIL + + [[INPUT in TEL status\] The value attribute mismatches the pattern attribute even when a subset matches] + expected: FAIL + + [[INPUT in PASSWORD status\] The value attribute mismatches the pattern attribute even when a subset matches] + expected: FAIL + + [[INPUT in TEXT status\] The value attribute mismatches the pattern attribute even when a subset matches] + expected: FAIL + + [[INPUT in SEARCH status\] The value attribute mismatches the pattern attribute even when a subset matches] + expected: FAIL + + [[INPUT in URL status\] The value attribute mismatches the pattern attribute even when a subset matches] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini index 40874364077..024ebd06b2e 100644 --- a/tests/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/the-form-element/form-autocomplete.html.ini @@ -198,3 +198,6 @@ [Test whitespace-only attribute value] expected: FAIL + [one-time-code is an allowed autocomplete field name] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini new file mode 100644 index 00000000000..6cf9d13975c --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini @@ -0,0 +1,4 @@ +[iframe_005.html] + [document.write external script into iframe write back into parent] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini index 910c88d3e81..69bd952d756 100644 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini +++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini @@ -1,5 +1,5 @@ [ignore-opens-during-unload.window.html] - expected: CRASH + expected: TIMEOUT [ignore-opens-during-unload] expected: FAIL diff --git a/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini b/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini deleted file mode 100644 index 80f9a4f15b8..00000000000 --- a/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[Worker-constructor.html] - expected: ERROR diff --git a/tests/wpt/metadata/xhr/event-timeout-order.any.js.ini b/tests/wpt/metadata/xhr/event-timeout-order.any.js.ini new file mode 100644 index 00000000000..3dc3d95f74b --- /dev/null +++ b/tests/wpt/metadata/xhr/event-timeout-order.any.js.ini @@ -0,0 +1,9 @@ +[event-timeout-order.any.html] + [XMLHttpRequest: event - timeout (order of events)] + expected: FAIL + + +[event-timeout-order.any.worker.html] + [XMLHttpRequest: event - timeout (order of events)] + expected: FAIL + diff --git a/tests/wpt/metadata/xhr/event-upload-progress-crossorigin.any.js.ini b/tests/wpt/metadata/xhr/event-upload-progress-crossorigin.any.js.ini new file mode 100644 index 00000000000..150a59931e6 --- /dev/null +++ b/tests/wpt/metadata/xhr/event-upload-progress-crossorigin.any.js.ini @@ -0,0 +1,15 @@ +[event-upload-progress-crossorigin.any.html] + [Upload events registered too late (resources/redirect.py?code=307&location=http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + + [Upload events registered too late (http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + + +[event-upload-progress-crossorigin.any.worker.html] + [Upload events registered too late (resources/redirect.py?code=307&location=http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + + [Upload events registered too late (http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + diff --git a/tests/wpt/metadata/xhr/event-upload-progress.any.js.ini b/tests/wpt/metadata/xhr/event-upload-progress.any.js.ini new file mode 100644 index 00000000000..4f1b3a12301 --- /dev/null +++ b/tests/wpt/metadata/xhr/event-upload-progress.any.js.ini @@ -0,0 +1,15 @@ +[event-upload-progress.any.worker.html] + [Upload events registered too late (resources/redirect.py?code=307&location=http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + + [Upload events registered too late (http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + + +[event-upload-progress.any.html] + [Upload events registered too late (resources/redirect.py?code=307&location=http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + + [Upload events registered too late (http://www1.web-platform.test:8000/xhr/resources/corsenabled.py)] + expected: FAIL + diff --git a/tests/wpt/mozilla/meta/css/transition_calc_implicit.html.ini b/tests/wpt/mozilla/meta/css/transition_calc_implicit.html.ini new file mode 100644 index 00000000000..dbea4f293ad --- /dev/null +++ b/tests/wpt/mozilla/meta/css/transition_calc_implicit.html.ini @@ -0,0 +1,2 @@ +[transition_calc_implicit.html] + expected: TIMEOUT diff --git a/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_events.any.js b/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_events.any.js new file mode 100644 index 00000000000..ac692907d11 --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_events.any.js @@ -0,0 +1,19 @@ +promise_test(async t => { + var reader = new FileReader(); + var eventWatcher = new EventWatcher(t, reader, ['loadstart', 'progress', 'abort', 'error', 'load', 'loadend']); + reader.readAsText(new Blob([])); + await eventWatcher.wait_for('loadstart'); + // No progress event for an empty blob, as no data is loaded. + await eventWatcher.wait_for('load'); + await eventWatcher.wait_for('loadend'); +}, 'events are dispatched in the correct order for an empty blob'); + +promise_test(async t => { + var reader = new FileReader(); + var eventWatcher = new EventWatcher(t, reader, ['loadstart', 'progress', 'abort', 'error', 'load', 'loadend']); + reader.readAsText(new Blob(['a'])); + await eventWatcher.wait_for('loadstart'); + await eventWatcher.wait_for('progress'); + await eventWatcher.wait_for('load'); + await eventWatcher.wait_for('loadend'); +}, 'events are dispatched in the correct order for a non-empty blob'); diff --git a/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_result.html b/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_result.html index 957d0337a75..b80322ed424 100644 --- a/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_result.html +++ b/tests/wpt/web-platform-tests/FileAPI/reading-data-section/filereader_result.html @@ -12,9 +12,10 @@ <div id="log"></div> <script> - var blob; + var blob, blob2; setup(function() { blob = new Blob(["This test the result attribute"]); + blob2 = new Blob(["This is a second blob"]); }); async_test(function() { @@ -54,6 +55,43 @@ readArrayBuffer.readAsArrayBuffer(blob); }, "readAsArrayBuffer"); + + async_test(function() { + var readBinaryString = new FileReader(); + assert_equals(readBinaryString.result, null); + + readBinaryString.onloadend = this.step_func(function(evt) { + assert_equals(typeof readBinaryString.result, "string", "The result type is string"); + assert_equals(readBinaryString.result, "This test the result attribute", "The result is correct"); + this.done(); + }); + + readBinaryString.readAsBinaryString(blob); + }, "readAsBinaryString"); + + + for (let event of ['loadstart', 'progress']) { + for (let method of ['readAsText', 'readAsDataURL', 'readAsArrayBuffer', 'readAsBinaryString']) { + promise_test(async function(t) { + var reader = new FileReader(); + assert_equals(reader.result, null, 'result is null before read'); + + var eventWatcher = new EventWatcher(t, reader, + [event, 'loadend']); + + reader[method](blob); + assert_equals(reader.result, null, 'result is null after first read call'); + await eventWatcher.wait_for(event); + assert_equals(reader.result, null, 'result is null during event'); + await eventWatcher.wait_for('loadend'); + assert_not_equals(reader.result, null); + reader[method](blob); + assert_equals(reader.result, null, 'result is null after second read call'); + await eventWatcher.wait_for(event); + assert_equals(reader.result, null, 'result is null during second read event'); + }, 'result is null during "' + event + '" event for ' + method); + } + } </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/common/security-features/resources/common.js b/tests/wpt/web-platform-tests/common/security-features/resources/common.js index 2b4349d24e5..10a3190767f 100644 --- a/tests/wpt/web-platform-tests/common/security-features/resources/common.js +++ b/tests/wpt/web-platform-tests/common/security-features/resources/common.js @@ -924,11 +924,6 @@ const subresourceMap = { invoker: url => requestViaDedicatedWorker(workerUrlThatImports(url), {type: "module"}), }, - "classic-data-worker-fetch": { - path: "/common/security-features/subresource/empty.py", - invoker: url => - requestViaDedicatedWorker(dedicatedWorkerUrlThatFetches(url), {}), - }, "shared-worker": { path: "/common/security-features/subresource/shared-worker.py", invoker: requestViaSharedWorker, @@ -1064,12 +1059,32 @@ function invokeRequest(subresource, sourceContextList) { "iframe": { // <iframe src="same-origin-URL"></iframe> invoker: invokeFromIframe, }, + "classic-worker": { + // Classic dedicated worker loaded from same-origin. + invoker: invokeFromWorker.bind(undefined, false, {}), + }, + "classic-data-worker": { + // Classic dedicated worker loaded from data: URL. + invoker: invokeFromWorker.bind(undefined, true, {}), + }, + "module-worker": { + // Module dedicated worker loaded from same-origin. + invoker: invokeFromWorker.bind(undefined, false, {type: 'module'}), + }, + "module-data-worker": { + // Module dedicated worker loaded from data: URL. + invoker: invokeFromWorker.bind(undefined, true, {type: 'module'}), + }, }; return sourceContextMap[sourceContextList[0].sourceContextType].invoker( subresource, sourceContextList); } +// Quick hack to expose invokeRequest when common.js is loaded either +// as a classic or module script. +self.invokeRequest = invokeRequest; + /** invokeFrom*() functions are helper functions with the same parameters and return values as invokeRequest(), that are tied to specific types @@ -1078,6 +1093,51 @@ function invokeRequest(subresource, sourceContextList) { sourceContextList[0] is an iframe. */ +/** + @param {boolean} isDataUrl + true if the worker script is loaded from data: URL. + Otherwise, the script is loaded from same-origin. + @param {object} workerOptions + The `options` argument for Worker constructor. + + Other parameters and return values are the same as those of invokeRequest(). +*/ +function invokeFromWorker(isDataUrl, workerOptions, + subresource, sourceContextList) { + const currentSourceContext = sourceContextList.shift(); + let workerUrl = + "/common/security-features/scope/worker.py?policyDeliveries=" + + encodeURIComponent(JSON.stringify( + currentSourceContext.policyDeliveries || [])); + if (workerOptions.type === 'module') { + workerUrl += "&type=module"; + } + + let promise; + if (isDataUrl) { + promise = fetch(workerUrl) + .then(r => r.text()) + .then(source => { + return 'data:text/javascript;base64,' + btoa(source); + }); + } else { + promise = Promise.resolve(workerUrl); + } + + return promise + .then(url => { + const worker = new Worker(url, workerOptions); + worker.postMessage({subresource: subresource, + sourceContextList: sourceContextList}); + return bindEvents2(worker, "message", worker, "error", window, "error"); + }) + .then(event => { + if (event.data.error) + return Promise.reject(event.data.error); + return event.data; + }); +} + function invokeFromIframe(subresource, sourceContextList) { const currentSourceContext = sourceContextList.shift(); const frameUrl = diff --git a/tests/wpt/web-platform-tests/common/security-features/resources/common.js.headers b/tests/wpt/web-platform-tests/common/security-features/resources/common.js.headers new file mode 100644 index 00000000000..cb762eff806 --- /dev/null +++ b/tests/wpt/web-platform-tests/common/security-features/resources/common.js.headers @@ -0,0 +1 @@ +Access-Control-Allow-Origin: * diff --git a/tests/wpt/web-platform-tests/common/security-features/scope/template/worker.js.template b/tests/wpt/web-platform-tests/common/security-features/scope/template/worker.js.template new file mode 100644 index 00000000000..ac3fc672d19 --- /dev/null +++ b/tests/wpt/web-platform-tests/common/security-features/scope/template/worker.js.template @@ -0,0 +1,24 @@ +%(import)s + +// Receive a message from the parent and start the test. +function onMessageFromParent(event) { + // Because this window might receive messages from child context during + // tests, we first remove the listener here before staring the test. + self.removeEventListener('message', onMessageFromParent); + + const configurationError = "%(error)s"; + if (configurationError.length > 0) { + postMessage({error: configurationError}); + return; + } + + invokeRequest(event.data.subresource, + event.data.sourceContextList) + .then(result => postMessage(result)) + .catch(e => { + const message = (e.error && e.error.stack) || e.message || "Error"; + postMessage({error: message}); + }); +} + +self.addEventListener('message', onMessageFromParent); diff --git a/tests/wpt/web-platform-tests/common/security-features/scope/worker.py b/tests/wpt/web-platform-tests/common/security-features/scope/worker.py new file mode 100644 index 00000000000..40817f6a3a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/common/security-features/scope/worker.py @@ -0,0 +1,40 @@ +import os, sys, json + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) +import util + + +def main(request, response): + policyDeliveries = json.loads(request.GET.first('policyDeliveries', '[]')) + worker_type = request.GET.first('type', 'classic') + commonjs_url = '%s://%s:%s/common/security-features/resources/common.js' % ( + request.url_parts.scheme, request.url_parts.hostname, + request.url_parts.port) + if worker_type == 'classic': + import_line = 'importScripts("%s");' % commonjs_url + else: + import_line = 'import "%s";' % commonjs_url + + maybe_additional_headers = {} + error = '' + for delivery in policyDeliveries: + if delivery['deliveryType'] == 'meta': + error = '<meta> cannot be used in WorkerGlobalScope' + elif delivery['deliveryType'] == 'http-rp': + if delivery['key'] == 'referrerPolicy': + maybe_additional_headers['Referrer-Policy'] = delivery['value'] + else: + error = 'invalid delivery key for http-rp: %s' % delivery['key'] + else: + error = 'invalid deliveryType: %s' % delivery['deliveryType'] + + handler = lambda: util.get_template('worker.js.template') % ({ + 'import': import_line, + 'error': error + }) + util.respond( + request, + response, + payload_generator=handler, + content_type='text/javascript', + maybe_additional_headers=maybe_additional_headers) diff --git a/tests/wpt/web-platform-tests/css/css-break/form-control.html b/tests/wpt/web-platform-tests/css/css-break/form-control.html new file mode 100644 index 00000000000..8ef6eedae25 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/form-control.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#possible-breaks"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<meta name="assert" content="Replaced content should be considered to be monolithic"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="width:100px; height:100px; background:red;"> + <div style="columns:3; column-gap:0;"> + <input style="display:block; margin:0; border:none; padding:0; width:100px; height:100px; background:green;"> + </div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html index 1e7771e7c12..43361c29834 100644 --- a/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html +++ b/tests/wpt/web-platform-tests/css/css-contain/contain-size-grid-002.html @@ -7,6 +7,9 @@ <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> <style> +body { + overflow: hidden; +} div { position: absolute; } diff --git a/tests/wpt/web-platform-tests/css/css-display/display-change-iframe.html b/tests/wpt/web-platform-tests/css/css-display/display-change-iframe.html new file mode 100644 index 00000000000..c12c413d539 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/display-change-iframe.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> + <link rel="help" href="https://www.w3.org/TR/css-display-3/"> + <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#replaced-elements"> + <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + <iframe id="victim" src="support/red-square.html" style="width:100px; height:100px; border:none;"></iframe> + <script> + var loaded_once = false; + victim.onload = function() { + // The child document should only load once. It should not be reloaded + // by changing the display type of the IFRAME. + if (loaded_once) + return; + loaded_once = true; + var childDoc = victim.contentWindow.document; + // Change the red background to green. This will revert back to red if + // the document gets reloaded (which shouldn't happen) when re-attaching + // #victim. + childDoc.getElementById("square").style.background = "green"; + document.offsetTop; + victim.style.display = "block"; + document.documentElement.className = ""; + } + </script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-display/display-change-object-iframe.html b/tests/wpt/web-platform-tests/css/css-display/display-change-object-iframe.html new file mode 100644 index 00000000000..8b56aff9590 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/display-change-object-iframe.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> + <link rel="help" href="https://www.w3.org/TR/css-display-3/"> + <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#replaced-elements"> + <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + <object id="victim" data="support/red-square.html" style="width:100px; height:100px;"></object> + <script> + var loaded_once = false; + victim.onload = function() { + // The child document should only load once. It should not be reloaded + // by changing the display type of the OBJECT. + if (loaded_once) + return; + loaded_once = true; + var childDoc = victim.contentWindow.document; + // Change the red background to green. This will revert back to red if + // the document gets reloaded (which shouldn't happen) when re-attaching + // #victim. + childDoc.getElementById("square").style.background = "green"; + document.offsetTop; + victim.style.display = "block"; + document.documentElement.className = ""; + } + </script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-display/support/red-square.html b/tests/wpt/web-platform-tests/css/css-display/support/red-square.html new file mode 100644 index 00000000000..e4e48ccfdc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/support/red-square.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<style> + body { margin:0; } +</style> +<div id="square" style="width:100px; height:100px; background:red;"></div> diff --git a/tests/wpt/web-platform-tests/css/css-lists/counter-set-002-ref.html b/tests/wpt/web-platform-tests/css/css-lists/counter-set-002-ref.html new file mode 100644 index 00000000000..5ee2e30a9dd --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/counter-set-002-ref.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>CSS Lists: dynamic update test for 'counter-set'</title> + <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.org"> +</head> +<body> +<ol><li></li></ol> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-lists/counter-set-002.html b/tests/wpt/web-platform-tests/css/css-lists/counter-set-002.html new file mode 100644 index 00000000000..a4792599826 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/counter-set-002.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>CSS Lists: dynamic update test for 'counter-set'</title> + <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.org"> + <link rel="help" href="https://drafts.csswg.org/css-lists/#propdef-counter-set"> + <link rel="match" href="counter-set-002-ref.html"> +</head> +<body onload="document.getElementById('item').style=''"> +<noscript>Test not run - javascript required.</noscript> +<ol><li id="item" style="counter-increment: list-item 3"></li></ol> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-position/fixed-z-index-blend-ref.html b/tests/wpt/web-platform-tests/css/css-position/fixed-z-index-blend-ref.html new file mode 100644 index 00000000000..2675401b409 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/fixed-z-index-blend-ref.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<title>fixed position, z-index, and mix-blend-mode</title> +<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org"> + +<div style="width: 100px; height:4000px;"></div> +<div style="background: green; width: 100px; height:100px;"></div> + +<script> +requestAnimationFrame(()=>{ + requestAnimationFrame(()=>{ + window.scrollBy(0, 3000); + }); +}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-position/fixed-z-index-blend.html b/tests/wpt/web-platform-tests/css/css-position/fixed-z-index-blend.html new file mode 100644 index 00000000000..55582286140 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-position/fixed-z-index-blend.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html class="reftest-wait" style="overflow-x:hidden;"> +<title>fixed position, z-index, and mix-blend-mode</title> +<link rel="help" href="https://www.w3.org/TR/CSS2/visuren.html#fixed-positioning"> +<link rel="help" href="https://www.w3.org/TR/CSS2/visuren.html#propdef-z-index"> +<link rel="help" href="https://www.w3.org/TR/compositing-1/#mix-blend-mode"> +<meta name="assert" content="Tests fixed, z-index, and mix-blend-mode. +Passes if there is a green box when the page is scrolled to the bottom."> +<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org"> +<link rel="match" href="fixed-z-index-blend-ref.html"> + +<div class="blend"></div> +<div class="background"></div> +<div class="text"> + <div style="width: 100px; height:4000px;"></div> + <div style="background: green; width: 100px; height:100px;"></div> +</div> + +<style> +.blend { + display: block; + position: fixed; + z-index: 2; + top: 0; + left: 0; + bottom: 0; + right: 0; + mix-blend-mode: overlay; +} + +.background { + pointer-events: none; + position: fixed; + z-index: 1; + top: 0; + left: 0; + bottom: 0; + right: 0; + opacity: 1; +} + +.text { + position: relative; + z-index: 3; + overflow: hidden; + width: 100vw; + min-height: 100vh; + font-size: 50px; + line-height: 2; +} +</style> + +<script src="/common/reftest-wait.js"></script> +<script> +requestAnimationFrame(()=>{ + requestAnimationFrame(()=>{ + window.scrollBy(0, 3000); + takeScreenshot(); + }); +}); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-001-ref.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-001-ref.html new file mode 100644 index 00000000000..28b00184c2e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-001-ref.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<title>Reference</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + font: 20px/1 sans-serif; + } + .container > div { + height: 1em; + margin: 1em 0; + background: green; + } +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-001.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-001.html new file mode 100644 index 00000000000..eeda674e07c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-001.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<title>#target and snap position with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#choosing'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name="flags" content="may"> +<meta name='assert' + content="Test passes if scroll snapping is honored + on a scroll container with 'scroll-snap-type: none' + when navigating to an element with the target fragment ID."> + +<style type='text/css'> + iframe { + border: solid blue 4px; + height: 80px; + width: calc(100% - 8px); + } +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<iframe class="container" src="support/scroll-target-align-001-iframe.html#target">This UA doesn't support iframes; please request a custom version of this test!</iframe> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-002.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-002.html new file mode 100644 index 00000000000..7e82f030e4c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-002.html @@ -0,0 +1,57 @@ +<!DOCTYPE html> +<html> +<title>scrollIntoView() and snap position with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#choosing'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name="flags" content="may"> +<meta name='assert' + content="Test passes if scroll snapping is honored + on a scroll container with 'scroll-snap-type: none' + when scrolling an element into view + explicitly by script."> + +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div { + height: 1em; + } + .container { scroll-padding: .5em 0 0; } /* set up a snap position */ + #target { scroll-margin: .5em 0 0; + scroll-snap-align: center; } + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <div id="target"></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').scrollIntoView(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-003.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-003.html new file mode 100644 index 00000000000..1d6fbebbcd7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-align-003.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<html> +<title>focus() and snap position with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#choosing'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name="flags" content="may"> +<meta name='assert' + content="Test passes if scroll snapping is honored + on a scroll container with 'scroll-snap-type: none' + when scrolling an element into view + even if that operation is implied (in this case, by .focus())."> +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div, a { + height: 1em; + display: block; + outline: none; + } + .container { scroll-padding: .5em 0 0; } /* set up a snap position */ + #target { scroll-margin: .5em 0 0; + scroll-snap-align: center; } + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <a href="" id="target"></a> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').focus(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-001.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-001.html new file mode 100644 index 00000000000..8ddbbcec5f0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-001.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<title>#target and scroll-margin with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#scroll-margin'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name="flags" content="should"> +<meta name='assert' + content="Test passes if scroll-margin is honored + on a scroll container with 'scroll-snap-type: none' + when navigating to an element with the target fragment ID."> + +<style type='text/css'> + iframe { + border: solid blue 4px; + height: 80px; + width: calc(100% - 8px); + } +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<iframe class="container" src="support/scroll-target-margin-001-iframe.html#target">This UA doesn't support iframes; please request a custom version of this test!</iframe> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-002.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-002.html new file mode 100644 index 00000000000..a02cf7db175 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-002.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<html> +<title>scrollIntoView() and scroll-margin with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#scroll-margin'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name="flags" content="should"> +<meta name='assert' + content="Test passes if scroll-margin is honored + on a scroll container with 'scroll-snap-type: none' + when scrolling an element into view + explicitly by script."> +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div { + height: 1em; + } + #target { scroll-margin: 2em 0 1em; } /* snap area is exact fit for snapport */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <div id="target"></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').scrollIntoView(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-003.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-003.html new file mode 100644 index 00000000000..d0434db515a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-margin-003.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html> +<title>focus() and scroll-margin with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#scroll-margin'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name="flags" content="should"> +<meta name='assert' + content="Test passes if scroll-margin is honored + on a scroll container with 'scroll-snap-type: none' + when scrolling an element into view + even if that operation is implied (in this case, by .focus())."> +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div, a { + height: 1em; + display: block; + outline: none; + } + #target { scroll-margin: 2em 0 1em; } /* snap area is exact fit for snapport */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <a href="" id="target"></a> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').focus(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-001.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-001.html new file mode 100644 index 00000000000..5cd4fddcc53 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-001.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<title>#target and scroll-padding with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#scroll-padding'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name='assert' + content="Test passes if scroll-padding is honored + on a scroll container with 'scroll-snap-type: none' + when navigating to an element with the target fragment ID."> +<style type='text/css'> + iframe { + border: solid blue 4px; + height: 80px; + width: calc(100% - 8px); + } +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<iframe class="container" src="support/scroll-target-padding-001-iframe.html#target">This UA doesn't support iframes; please request a custom version of this test!</iframe> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-002.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-002.html new file mode 100644 index 00000000000..3a0ca3b8519 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-002.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<html> +<title>scrollIntoView() and scroll-padding with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#scroll-padding'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name='assert' + content="Test passes if scroll-padding is honored + on a scroll container with 'scroll-snap-type: none' + when scrolling an element into view + explicitly by script."> +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div { + height: 1em; + } + .container { scroll-padding: 2em 0 1em; } /* snap area is exact fit for snapport */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <div id="target"></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').scrollIntoView(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-003.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-003.html new file mode 100644 index 00000000000..1e92e9be72f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-padding-003.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<html> +<title>focus() and scroll-padding with snapping off (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#scroll-margin'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name='assert' + content="Test passes if scroll-padding is honored + on a scroll container with 'scroll-snap-type: none' + when scrolling an element into view + even if that operation is implied (in this case, by .focus())."> +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div, a { + height: 1em; + display: block; + outline: none; + } + .container { scroll-padding: 2em 0 1em; } /* snap area is exact fit for snapport */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <a href="" id="target"></a> + <div></div> + <div class="fail">FAIL</div> + <div></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').focus(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-001.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-001.html new file mode 100644 index 00000000000..76d3222a0bf --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-001.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<title>#target and snap position with snapping on (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#choosing'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name='assert' + content="Test passes if scroll snapping is honored + when navigating to an element with the target fragment ID."> + +<style type='text/css'> + iframe { + border: solid blue 4px; + height: 80px; + width: calc(100% - 8px); + } +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<iframe class="container" src="support/scroll-target-snap-001-iframe.html#target">This UA doesn't support iframes; please request a custom version of this test!</iframe> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-002.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-002.html new file mode 100644 index 00000000000..89df44cba28 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-002.html @@ -0,0 +1,64 @@ +<!DOCTYPE html> +<html> +<title>scrollIntoView() and snap position with snapping on (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#choosing'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name='assert' + content="Test passes if scroll snapping is honored + when scrolling an element into view + explicitly by script."> + +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + scroll-snap-type: block; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div { + height: 1em; + } + #target { scroll-margin: 1em 0 0; + scroll-snap-align: center; } /* set up a snap position */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ + + /* Try to foil the UA */ + .foilup { margin-bottom: -1em; scroll-snap-align: start; } + .foildn { margin-top: -1em; scroll-snap-align: end; } +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="foilup"></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <div class="foilup"></div> + <div class="foildn"></div> + <div id="target"></div> + <div></div> + <div class="fail">FAIL</div> + <div class="foildn"></div> + <div></div> + <div class="foildn"></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').scrollIntoView(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.html new file mode 100644 index 00000000000..3e90347a4dc --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-target-snap-003.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html> +<title>focus() and snap position with snapping on (y-axis)</title> +<link rel='author' title='Elika J. Etemad' href='http://fantasai.inkedblade.net/contact'> +<link rel='help' href='https://www.w3.org/TR/css-scroll-snap-1/#choosing'> +<link rel='match' href='scroll-target-001-ref.html'> +<meta name='assert' + content="Test passes if scroll snapping is honored + when scrolling an element into view + even if that operation is implied (in this case, by .focus())."> + +<style type='text/css'> + .container { + border: solid blue 4px; + height: 4em; + overflow: auto; + scroll-snap-type: block; + + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + .container > div, a { + height: 1em; + display: block; + outline: none; + } + #target { scroll-margin: 1em 0 0; + scroll-snap-align: center; } /* set up a snap position */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ + + /* Try to foil the UA */ + .foilup { margin-bottom: -1em; scroll-snap-align: start; } + .foildn { margin-top: -1em; scroll-snap-align: end; } +</style> + +<div id='instructions'>Test passes if there is a green stripe across the second quarter of the box below and no red.</div> + +<div class="container"> + <div></div> + <div></div> + <div></div> + <div></div> + <div class="foilup"></div> + <div class="fail">FAIL</div> + <div></div> + <div id="stripe"></div> + <div class="foilup"></div> + <a href="" id="target"></a> + <div class="foildn"></div> + <div></div> + <div class="fail">FAIL</div> + <div class="foildn"></div> + <div></div> + <div class="foildn"></div> + <div></div> + <div></div> + <div></div> +</div> + +<script> + document.getElementById('target').focus(); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-inline-block.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-inline-block.html index 9f9da8f648b..377039c3843 100644 --- a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-inline-block.html +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-inline-block.html @@ -22,7 +22,6 @@ div { height: 200px; left: 300px; top: 300px; - scroll-snap-align: end start; } </style> @@ -32,22 +31,81 @@ div { </div> <script> -var scroller = document.getElementById("scroller"); -var width = scroller.clientWidth; -var height = scroller.clientHeight; +const scroller_width = scroller.clientWidth; +const scroller_height = scroller.clientHeight; [ - ["horizontal-tb", 300, 500 - height], - ["vertical-lr", 500 - width, 300], - ["vertical-rl", width - 700, 300] + ["horizontal-tb", 300, 500 - scroller_height], + ["vertical-lr", 500 - scroller_width, 300], + ["vertical-rl", scroller_width - 700, 300] ].forEach(([writing_mode, left, top]) => { test(() => { + const target_left = getComputedStyle(target).left; scroller.style.writingMode = writing_mode; - if (writing_mode == "vertical-rl") - document.getElementById("target").style.left = (width - 700) + "px"; + target.style.scrollSnapAlign = "end start"; + if (writing_mode == "vertical-rl") { + target.style.left = (scroller_width - 700) + "px"; + } scroller.scrollTo(0, 0); assert_equals(scroller.scrollLeft, left, "aligns correctly on x"); assert_equals(scroller.scrollTop, top, "aligns correctly on y"); + target.style.left = target_left; + scroller.style.writingMode = ""; }, "Snaps correctly for " + writing_mode + - " writing mode with 'inline' and 'block' alignments"); -}) + " writing mode with 'scroll-snap-align: end start' alignment"); +}); + +[ + ["horizontal-tb", 500 - scroller_width, 300], + ["vertical-lr", 300, 500 - scroller_height], + ["vertical-rl", target.clientWidth - 700, 500 - scroller_height] +].forEach(([writing_mode, left, top]) => { + test(() => { + const target_left = getComputedStyle(target).left; + scroller.style.writingMode = writing_mode; + target.style.scrollSnapAlign = "start end"; + if (writing_mode == "vertical-rl") { + target.style.left = (scroller_width - 700) + "px"; + } + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, left, "aligns correctly on x"); + assert_equals(scroller.scrollTop, top, "aligns correctly on y"); + target.style.left = target_left; + scroller.style.writingMode = ""; + }, "Snaps correctly for " + writing_mode + + " writing mode with 'scroll-snap-align: start end' alignment"); +}); + +test(() => { + const target_left = getComputedStyle(target).left; + scroller.style.direction = "rtl"; + target.style.scrollSnapAlign = "end start"; + target.style.left = (scroller_width - 700) + "px"; + + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, target.clientWidth - 700, + "aligns correctly on x"); + assert_equals(scroller.scrollTop, 500 - scroller_height, + "aligns correctly on y"); + + target.style.left = target_left; + scroller.style.direction = ""; +}, "Snaps correctly for 'direction: rtl' with 'scroll-snap-align: end start' " + + "alignment"); + +test(() => { + const target_left = getComputedStyle(target).left; + scroller.style.direction = "rtl"; + target.style.scrollSnapAlign = "start end"; + target.style.left = (scroller_width - 700) + "px"; + + scroller.scrollTo(0, 0); + assert_equals(scroller.scrollLeft, scroller_width - 700, + "aligns correctly on x"); + assert_equals(scroller.scrollTop, 300, "aligns correctly on y"); + + target.style.left = target_left; + scroller.style.direction = ""; +}, "Snaps correctly for 'direction: rtl' with 'scroll-snap-align: start end' " + + "alignment"); + </script> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-align-001-iframe.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-align-001-iframe.html new file mode 100644 index 00000000000..20922ea18ea --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-align-001-iframe.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<title>iframe for #target and snap position with snapping off</title> +<style type='text/css'> + html, body { + margin: 0; padding: 0; + } + html { + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x fixed; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + div { + height: 1em; + } + html { scroll-padding: .5em 0 0; } /* set up a snap position */ + #target { scroll-margin: .5em 0 0; + scroll-snap-align: center; } + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ + } +</style> + +<div></div> +<div></div> +<div></div> +<div></div> +<div class="fail">FAIL</div> +<div></div> +<div id="stripe"></div> +<div id="target"></div> +<div></div> +<div class="fail">FAIL</div> +<div></div> +<div></div> +<div></div> +<div></div> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-margin-001-iframe.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-margin-001-iframe.html new file mode 100644 index 00000000000..8eb5b9c8638 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-margin-001-iframe.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<title>iframe for #target and scroll-margin with snapping off (y</title> +<style type='text/css'> + html, body { + margin: 0; padding: 0; + } + html { + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x fixed; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + div { + height: 1em; + } + #target { scroll-margin: 2em 0 1em; } /* snap area is exact fit for snapport */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ + } +</style> + +<div></div> +<div></div> +<div></div> +<div></div> +<div class="fail">FAIL</div> +<div></div> +<div id="stripe"></div> +<div id="target"></div> +<div></div> +<div class="fail">FAIL</div> +<div></div> +<div></div> +<div></div> +<div></div> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-padding-001-iframe.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-padding-001-iframe.html new file mode 100644 index 00000000000..b9467e4347f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-padding-001-iframe.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<title>iframe for #target and scroll-snap-padding with snapping off (y</title> +<style type='text/css'> + html, body { + margin: 0; padding: 0; + } + html { + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x fixed; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + } + div { + height: 1em; + } + html { scroll-padding: 2em 0 1em; } /* snap area is exact fit for snapport */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ + } +</style> + +<div></div> +<div></div> +<div></div> +<div></div> +<div class="fail">FAIL</div> +<div></div> +<div id="stripe"></div> +<div id="target"></div> +<div></div> +<div class="fail">FAIL</div> +<div></div> +<div></div> +<div></div> +<div></div> diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-snap-001-iframe.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-snap-001-iframe.html new file mode 100644 index 00000000000..1a598fa7238 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/support/scroll-target-snap-001-iframe.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<title>iframe for #target and snap position with snapping on</title> +<style type='text/css'> + html, body { + margin: 0; padding: 0; + } + html { + /* to make failing more obvious */ + background: 0 1em / 100% 1em linear-gradient(red, red) repeat-x fixed; + /* avoid anti-aliasing issues */ + font: 20px/1 sans-serif; + scrollbar-width: none; + + /* turn on snapping */ + scroll-snap-type: block; + } + div { + height: 1em; + } + #target { scroll-margin: 1em 0 0; + scroll-snap-align: center; } /* set up a snap position */ + #stripe { background: green; } /* color part of the snap area */ + .fail { color: red; } /* make failing more obvious */ + + /* Try to foil the UA */ + .foilup { margin-bottom: -1em; scroll-snap-align: start; } + .foildn { margin-top: -1em; scroll-snap-align: end; } +</style> + +<div></div> +<div></div> +<div></div> +<div></div> +<div class="foilup"></div> +<div class="fail">FAIL</div> +<div></div> +<div id="stripe"></div> +<div class="foilup"></div> +<div id="target"></div> +<div class="foildn"></div> +<div></div> +<div class="fail">FAIL</div> +<div class="foildn"></div> +<div></div> +<div class="foildn"></div> +<div></div> +<div></div> +<div></div> diff --git a/tests/wpt/web-platform-tests/css/css-values/calc-rgb-percent-001.html b/tests/wpt/web-platform-tests/css/css-values/calc-rgb-percent-001.html new file mode 100644 index 00000000000..1446c28d389 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-values/calc-rgb-percent-001.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Values Test: computed value of rgb() with calc(percentage)</title> + + <!-- + + Original code is from Yves Lafon + + Re: [css3-values] percentage in calc() and attr() + https://lists.w3.org/Archives/Public/www-style/2016May/0028.html + + --> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-values-4/#calc-serialize"> + + <script src="/resources/testharness.js"></script> + + <script src="/resources/testharnessreport.js"></script> + + <style> + div#target + { + background-color: rgb(calc(5% + 15%), calc(40% / 2), calc(5% * 4)); + height: 100px; + } + </style> + + <div id="target"></div> + + <script> + test(function() + { + assert_equals(getComputedStyle(document.getElementById("target")).backgroundColor, "rgb(51, 51, 51)"); + }, "testing rgb(calc(5% + 15%), calc(40% / 2), calc(5% * 4))"); + </script> diff --git a/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-border-radius-001.html b/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-border-radius-001.html new file mode 100644 index 00000000000..6f3ba3ac477 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-border-radius-001.html @@ -0,0 +1,95 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Values Test: mixed units in calc() and computed border-radius longhand and shorthand values (complex)</title> + + <!-- + + Original test is: + +https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793f5b9668cc/third_party/WebKit/LayoutTests/css3/calc/getComputedStyle-border-radius.html + + + Bug 137688: getPropertyValue on computed style does not do shorthand properties + https://bugzilla.mozilla.org/show_bug.cgi?id=137688 + + --> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-values-4/#calc-serialize"> + <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#the-border-radius"> + + <script src="/resources/testharness.js"></script> + + <script src="/resources/testharnessreport.js"></script> + + <style> + div#target + { + border: solid 2px; + border-top-left-radius: calc(10px + 25%) calc(20px + 25%); + border-top-right-radius: calc(1em + 25%); + border-bottom-right-radius: calc(25%); + border-bottom-left-radius: calc(25px); + font-size: 16px; /* was 10px in original test */ + height: 100px; + width: 100px; + } + </style> + + <div id="target"></div> + + <script> + function startTesting() + { + + var targetElement = document.getElementById("target"); + + function verifyComputedStyle(property_name, expected_value, description) + { + + test(function() + { + + assert_equals(getComputedStyle(targetElement)[property_name], expected_value); + + }, description); + } + + /* verifyComputedStyle(property_name, expected_value, description) */ + + verifyComputedStyle("border-top-left-radius", "calc(25% + 10px) calc(25% + 20px)", "testing border-top-left-radius: calc(10px + 25%) calc(20px + 25%)"); + + verifyComputedStyle("border-top-right-radius", "calc(25% + 16px)", "testing border-top-right-radius: calc(1em + 25%)"); + + verifyComputedStyle("border-bottom-right-radius", "25%", "testing border-bottom-right-radius: calc(25%)"); + + verifyComputedStyle("border-bottom-left-radius", "25px", "testing border-bottom-left-radius: calc(25px);"); + + verifyComputedStyle("border-radius", "calc(25% + 10px) calc(25% + 16px) 25% 25px / calc(25% + 20px) calc(25% + 16px) 25% 25px", "testing border-radius shorthand"); + + /* + + The first value is the horizontal radius, the second the vertical radius. + + horizontal radius / vertical radius + |__________________________________________| |__________________________________________| + + + The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left: + + + top-left top-right bottom-right bottom-left / top-left top-right bottom-right bottom-left + + |__________________________________________| |__________________________________________| + + horizontal radius / vertical radius + + */ + + } + + startTesting(); + + </script> diff --git a/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-border-radius-003.html b/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-border-radius-003.html new file mode 100644 index 00000000000..98d320bca28 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-values/getComputedStyle-border-radius-003.html @@ -0,0 +1,81 @@ +<!DOCTYPE html> + + <meta charset="UTF-8"> + + <title>CSS Values Test: mixed units in calc() and computed border-radius shorthand value (complex)</title> + + <!-- + + Bug 137688: getPropertyValue on computed style does not do shorthand properties + https://bugzilla.mozilla.org/show_bug.cgi?id=137688 + + --> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> + <link rel="help" href="https://www.w3.org/TR/css-values-4/#calc-serialize"> + <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#the-border-radius"> + + <script src="/resources/testharness.js"></script> + + <script src="/resources/testharnessreport.js"></script> + + <style> + div#target + { + border: solid 2px; + border-top-left-radius: calc(1px + 1%) calc(5px + 5%); + border-top-right-radius: calc(2px + 2%) calc(6px + 6%); + border-bottom-right-radius: calc(3px + 3%) calc(7px + 7%); + border-bottom-left-radius: calc(4px + 4%) calc(8px + 8%); + height: 100px; + width: 100px; + } + </style> + + <div id="target"></div> + + <script> + function startTesting() + { + + var targetElement = document.getElementById("target"); + + function verifyComputedStyle(property_name, expected_value, description) + { + + test(function() + { + + assert_equals(getComputedStyle(targetElement)[property_name], expected_value); + + }, description); + } + + /* verifyComputedStyle(property_name, expected_value, description) */ + + verifyComputedStyle("border-radius", "calc(1% + 1px) calc(2% + 2px) calc(3% + 3px) calc(4% + 4px) / calc(5% + 5px) calc(6% + 6px) calc(7% + 7px) calc(8% + 8px)", "testing border-radius shorthand"); + + /* + + The first value is the horizontal radius, the second the vertical radius. + + horizontal radius / vertical radius + |__________________________________________| |__________________________________________| + + + The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left: + + + top-left top-right bottom-right bottom-left / top-left top-right bottom-right bottom-left + + |__________________________________________| |__________________________________________| + + horizontal radius / vertical radius + + */ + + } + + startTesting(); + + </script> 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 new file mode 100644 index 00000000000..59a254e9f17 --- /dev/null +++ b/tests/wpt/web-platform-tests/element-timing/image-not-added.html @@ -0,0 +1,30 @@ +<!DOCTYPE HTML> +<meta charset=utf-8> +<title>Element Timing: do not observe a disconnected image</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + async_test(function (t) { + const observer = new PerformanceObserver( + t.step_func_done(() => { + // The image should not have caused an entry, so fail test. + assert_unreached('Should not have received an entry!'); + }) + ); + observer.observe({entryTypes: ['element']}); + // We add the image during onload to be sure that the observer is registered + // in time for it to observe the element timing. + window.onload = () => { + // Add image of width equal to 100 and height equal to 100. + const img = document.createElement('img'); + img.src = 'resources/square100.png'; + img.setAttribute('elementtiming', 'my_image'); + img.setAttribute('id', 'my_id'); + // Image has been created but not added. + // Wait for 500ms and end test, ensuring no entry was created. + t.step_timeout(() => { + t.done(); + }, 500); + }; + }, 'Image which is not added to DOM tree is not observable.'); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validate.html b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validate.html index 47b41ffeb23..e32fd90330c 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validate.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validate.html @@ -61,7 +61,7 @@ }, false); } - for (var index = 0; index < fm1.elements.length; index++) { + for (var index = 0; index < fm2.elements.length; index++) { var ele = fm2.elements.item(index); ele.addEventListener("invalid", function (e) { times2++; diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html index 5a0012b0eb3..d8677898ff1 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-patternMismatch.html @@ -18,7 +18,8 @@ {conditions: {pattern: "[A-Z]+", value: ""}, expected: false, name: "[target] The value attibute is empty string"}, {conditions: {pattern: "[A-Z]{1}", value: "A"}, expected: false, name: "[target] The value attribute matches the pattern attribute"}, {conditions: {pattern: "[A-Z]+", value: "\u0041\u0042\u0043"}, expected: false, name: "[target] The value(ABC) in unicode attribute matches the pattern attribute"}, - {conditions: {pattern: "[a-z]{3,}", value: "ABCD"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute"} + {conditions: {pattern: "[a-z]{3,}", value: "ABCD"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute"}, + {conditions: {pattern: "[A-Z]+", value: "ABC123"}, expected: true, name: "[target] The value attribute mismatches the pattern attribute even when a subset matches"} ] } ]; diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete.html index 618aa0a6c47..ec79bac73d1 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-autocomplete.html @@ -47,7 +47,7 @@ autocompletetest(document.forms.autocomplete_off, ["off", "", "on", "off", ""], "form autocomplete attribute off"); autocompletetest(document.forms.autocomplete_invalid, ["on", "", "on", "off", ""], "form autocomplete attribute invalid"); - var keywords = [ "on", "off", "name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname", "username", "new-password", "current-password", "organization-title", "organization", "street-address", "address-line1", "address-line2", "address-line3", "address-level4", "address-level3", "address-level2", "address-level1", "country", "country-name", "postal-code", "cc-name", "cc-given-name", "cc-additional-name", "cc-family-name", "cc-number", "cc-exp", "cc-exp-month", "cc-exp-year", "cc-csc", "cc-type", "transaction-currency", "transaction-amount", "language", "bday", "bday-day", "bday-month", "bday-year", "sex", "url", "photo", "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-local-prefix", "tel-local-suffix", "tel-extension", "email", "impp" ]; + var keywords = [ "on", "off", "name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname", "username", "new-password", "current-password", "one-time-code", "organization-title", "organization", "street-address", "address-line1", "address-line2", "address-line3", "address-level4", "address-level3", "address-level2", "address-level1", "country", "country-name", "postal-code", "cc-name", "cc-given-name", "cc-additional-name", "cc-family-name", "cc-number", "cc-exp", "cc-exp-month", "cc-exp-year", "cc-csc", "cc-type", "transaction-currency", "transaction-amount", "language", "bday", "bday-day", "bday-month", "bday-year", "sex", "url", "photo", "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-local-prefix", "tel-local-suffix", "tel-extension", "email", "impp" ]; keywords.forEach(function(keyword) { test(function(){ diff --git a/tests/wpt/web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-003-ref.html b/tests/wpt/web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-003-ref.html new file mode 100644 index 00000000000..dbe4c05bad6 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-003-ref.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>HTML LI element: dynamic update test for LI @value</title> + <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.org"> +</head> +<body onload="document.getElementById('item').removeAttribute('value');"> +<ol><li id="item" value="3"></li></ol> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-003.html b/tests/wpt/web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-003.html new file mode 100644 index 00000000000..bad3819604f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-003.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>HTML LI element: dynamic update test for LI @value</title> + <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.org"> + <link rel="help" href="https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element"> + <link rel="help" href="https://drafts.csswg.org/css-lists/#propdef-counter-set"> + <link rel="match" href="grouping-li-reftest-003-ref.html"> +</head> +<body onload="document.getElementById('item').removeAttribute('value');"> +<noscript>Test not run - javascript required.</noscript> +<ol><li id="item" value="3"></li></ol> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_fuzzy_no_differences.html b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_fuzzy_no_differences.html new file mode 100644 index 00000000000..324873a8ccf --- /dev/null +++ b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_fuzzy_no_differences.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel=match href=fuzzy-ref-1.html> +<!-- This exactly matches the reference, and includes the possibilty of + 0 pixels different; in this case the maxDifference is ignored ---> +<meta name=fuzzy content="fuzzy-ref-1.html:128;0-100"> +<style> +div { + width: 100px; + height: 100px; + background-color: green; +} +</style> +<div></div> diff --git a/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_fuzzy_no_differences_1.html b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_fuzzy_no_differences_1.html new file mode 100644 index 00000000000..6bf85ceebed --- /dev/null +++ b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_fuzzy_no_differences_1.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel=match href=fuzzy-ref-1.html> +<!-- This exactly matches the reference, and includes the possibilty of + 0 difference in the color channel; in this case the pixelsDifferent is ignored ---> +<meta name=fuzzy content="fuzzy-ref-1.html:0-128;100"> +<style> +div { + width: 100px; + height: 100px; + background-color: green; +} +</style> +<div></div> diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-baseline.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-baseline.html new file mode 100644 index 00000000000..0904d9f17ed --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-baseline.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Baseline of inferred mrows</title> +<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mrow"> +<meta name="assert" content="Baseline for mrow-like elements is correct."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script type="text/javascript"> + setup({ explicit_done: true }); + window.addEventListener("load", runTests); + function runTests() + { + ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded"].forEach((tag) => { + var x = document.getElementById("above" + tag).getBoundingClientRect(); + var y = document.getElementById("below" + tag).getBoundingClientRect(); + test(function() { + assert_equals(x.bottom, y.top); + }, "baseline alignment inside " + tag); + }); + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <p> + <math><mrow><mspace id="aboveMrow" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowMrow" width="10px" depth="30px" style="background: blue"></mspace></mrow></math> + <math><msqrt><mspace id="aboveSqrt" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowSqrt" width="10px" depth="30px" style="background: blue"></mspace></msqrt></math> + <math><mstyle><mspace id="aboveStyle" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowStyle" width="10px" depth="30px" style="background: blue"></mspace></mstyle></math> + <math><merror><mspace id="aboveError" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowError" width="10px" depth="30px" style="background: blue"></mspace></merror></math> + <math><mphantom><mspace style="visibility: visible;" id="abovePhantom" width="10px" height="30px" style="background: purple"></mspace><mspace style="visibility: visible;" id="belowPhantom" width="10px" depth="30px" style="background: blue"></mspace></mphantom></math> + <math><mspace id="aboveMath" width="10px" height="30px" style="background: purple"></mspace><mspace id="belowMath" width="10px" depth="30px" style="background: blue"></mspace></math> + <math><menclose notation="box"><mspace id="aboveMenclose" width="10px" height="30px" style="background: purple" +></mspace><mspace id="belowMenclose" width="10px" depth="30px" style="background: blue"></mspace></menclose></math> + <math><mpadded notation="box"><mspace id="aboveMpadded" width="10px" height="30px" style="background: purple" +></mspace><mspace id="belowMpadded" width="10px" depth="30px" style="background: blue"></mspace></mpadded></math> + </p> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html b/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html new file mode 100644 index 00000000000..f75726c11d0 --- /dev/null +++ b/tests/wpt/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-stretchy.html @@ -0,0 +1,51 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>Stretchy in inferred mrows</title> +<link rel="help" href="https://mathml-refresh.github.io/mathml-core/#mrow"> +<meta name="assert" content="Baseline for mrow-like elements is correct."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<style> + mo { + font-size: 10px; + font-family: axisheight5000-verticalarrow14000; + } + @font-face { + font-family: axisheight5000-verticalarrow14000; + src: url("/fonts/math/axisheight5000-verticalarrow14000.woff"); + } +</style> +<script type="text/javascript"> + setup({ explicit_done: true }); + window.addEventListener("load", function() { + // Delay the check to workaround WebKit's bug https://webkit.org/b/174030. + requestAnimationFrame(() => { document.fonts.ready.then(runTests); }); + }); + function runTests() + { + ["Mrow", "Sqrt", "Style", "Error", "Phantom", "Math", "Menclose", "Mpadded"].forEach((tag) => { + var mo = document.getElementById("mo" + tag); + test(function() { + assert_greater_than_equal(mo.getBoundingClientRect().height, 100); + }, "operator stretching inside " + tag); + }); + done(); + } +</script> +</head> +<body> + <div id="log"></div> + <p> + <math><mrow><mo id="moMrow">↨</mo><mspace width="1px" height="100px" style="background: blue"></mspace></mrow></math> + <math><msqrt><mo id="moSqrt">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></msqrt></math> + <math><mstyle><mo id="moStyle">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mstyle></math> + <math><merror><mo id="moError">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></merror></math> + <math><mphantom><mo style="visibilty: visible;" id="moPhantom">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mphantom></math> + <math><mo id="moMath">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></math> + <math><menclose notation="box"><mo id="moMenclose">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></menclose></math> + <math><mpadded notation="box"><mo id="moMpadded">↨</mo><mspace width="1px" height="100px" style="background: magenta"></mspace></mpadded></math> + </p> +</body> +</html> diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html index fff4f349e1c..fff4f349e1c 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html diff --git a/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js b/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js index 221210814c5..eb9fc13f7c0 100644 --- a/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js +++ b/tests/wpt/web-platform-tests/mixed-content/generic/mixed-content-test-case.js @@ -61,6 +61,21 @@ function getSubresourceOrigin(originType) { */ function MixedContentTestCase(scenario, description, sanityChecker) { sanityChecker.checkScenario(scenario, subresourceMap); + + let sourceContextList = []; + let subresourceType = scenario.subresource; + if (subresourceType === 'classic-data-worker-fetch') { + // Currently 'classic-data-worker-fetch' (fetch API from inside classic + // data: worker) is handled as a kind of subresource request + // on the genarator side, but should be processed using the combination of + // SourceContext list (classic data: worker) + Subresource (fetch API) + // on the JavaScript side. + // We bridge this inconsistency here, and will later pass these information + // directly from the generated tests and remove this conversion here. + subresourceType = 'fetch-request'; + sourceContextList = [{sourceContextType: 'classic-data-worker'}]; + } + const originTypeConversion = { "same-host-https": "same-https", "same-host-http": "same-http", @@ -71,7 +86,8 @@ function MixedContentTestCase(scenario, description, sanityChecker) { "cross-origin-wss": "cross-wss", "cross-origin-ws": "cross-ws", }; - const urls = getRequestURLs(scenario.subresource, + + const urls = getRequestURLs(subresourceType, originTypeConversion[scenario.origin], scenario.redirection); const checkResult = _ => { @@ -88,7 +104,7 @@ function MixedContentTestCase(scenario, description, sanityChecker) { function runTest() { /** @type {Subresource} */ const subresource = { - subresourceType: scenario.subresource, + subresourceType: subresourceType, url: urls.testUrl, policyDeliveries: [] }; @@ -97,7 +113,7 @@ function MixedContentTestCase(scenario, description, sanityChecker) { return xhrRequest(urls.announceUrl) // Send out the real resource request. // This should tear down the key if it's not blocked. - .then(_ => invokeRequest(subresource, [])) + .then(_ => invokeRequest(subresource, sourceContextList)) // We check the key state, regardless of whether the main request // succeeded or failed. .then(checkResult, checkResult); diff --git a/tests/wpt/web-platform-tests/payment-handler/app-change-payment-method.js b/tests/wpt/web-platform-tests/payment-handler/app-change-payment-method.js new file mode 100644 index 00000000000..7a9f7a7fa75 --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-handler/app-change-payment-method.js @@ -0,0 +1,30 @@ +self.addEventListener('canmakepayment', (event) => { + event.respondWith(true); +}); + +async function responder(event) { + const methodName = event.methodData[0].supportedMethods; + if (!event.changePaymentMethod) { + return { + methodName, + details: { + changePaymentMethodReturned: + 'The changePaymentMethod() method is not implemented.', + }, + }; + } + let changePaymentMethodReturned; + try { + const response = await event.changePaymentMethod(methodName, { + country: 'US', + }); + changePaymentMethodReturned = response; + } catch (err) { + changePaymentMethodReturned = error.message; + } + return {methodName, details: {changePaymentMethodReturned}}; +} + +self.addEventListener('paymentrequest', (event) => { + event.respondWith(responder(event)); +}); diff --git a/tests/wpt/web-platform-tests/payment-handler/change-payment-method.https.html b/tests/wpt/web-platform-tests/payment-handler/change-payment-method.https.html new file mode 100644 index 00000000000..b85dad642d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/payment-handler/change-payment-method.https.html @@ -0,0 +1,170 @@ +<!DOCTYPE html> +<meta charset="utf-8" /> +<title>Tests for PaymentRequestEvent.changePaymentMethod()</title> +<link + rel="help" + href="https://w3c.github.io/payment-handler/#changepaymentmethod-method" +/> +<link rel="manifest" href="/payment-handler/basic-card.json" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="register-and-activate-service-worker.js"></script> +<p>If the payment sheet is shown, please authorize the mock payment.</p> +<script> + async function runTests(registration) { + const methodName = window.location.origin + '/payment-handler/payment-app/'; + await registration.paymentManager.instruments.clear(); + await registration.paymentManager.instruments.set('instrument-key', { + name: 'Instrument Name', + method: methodName, + }); + + promise_test(async (t) => { + const request = new PaymentRequest([{supportedMethods: methodName}], { + total: {label: 'Total', amount: {currency: 'USD', value: '0.01'}}, + }); + // Intentionally do not respond to the 'paymentmethodchange' event. + const response = await test_driver.bless('showing a payment sheet', () => + request.show() + ); + const complete_promise = response.complete('success'); + + assert_equals(response.details.changePaymentMethodReturned, null); + + return complete_promise; + }, 'If updateWith(details) is not run, changePaymentMethod() returns null.'); + + promise_test(async (t) => { + const request = new PaymentRequest([{supportedMethods: methodName}], { + total: {label: 'Total', amount: {currency: 'USD', value: '0.01'}}, + }); + request.addEventListener('paymentmethodchange', (event) => { + assert_equals(event.methodName, methodName); + assert_equals(event.methodDetails.country, 'US'); + event.updateWith(Promise.reject('Error')); + }); + const response_promise = test_driver.bless( + 'showing a payment sheet', + () => request.show() + ); + + return promise_rejects(t, 'AbortError', response_promise); + }, 'If updateWith(details) is rejected, abort the PaymentRequest.show().'); + + promise_test(async (t) => { + const request = new PaymentRequest([{supportedMethods: methodName}], { + total: {label: 'Total', amount: {currency: 'USD', value: '0.01'}}, + }); + request.addEventListener('paymentmethodchange', (event) => { + assert_equals(event.methodName, methodName); + assert_equals(event.methodDetails.country, 'US'); + event.updateWith( + new Promise(() => { + throw 'Error for test'; + }) + ); + }); + const response_promise = test_driver.bless( + 'showing a payment sheet', + () => request.show() + ); + + return promise_rejects(t, 'AbortError', response_promise); + }, 'If updateWith(details) throws inside of the promise, abort the PaymentRequest.show().'); + + promise_test(async (t) => { + const request = new PaymentRequest([{supportedMethods: methodName}], { + total: {label: 'Total', amount: {currency: 'USD', value: '0.01'}}, + }); + request.addEventListener('paymentmethodchange', (event) => { + assert_equals(event.methodName, methodName); + assert_equals(event.methodDetails.country, 'US'); + event.updateWith({ + total: {label: 'Total', amount: {currency: 'GBP', value: '0.02'}}, + error: 'Error for test', + modifiers: [ + { + supportedMethods: methodName, + data: {soup: 'potato'}, + total: { + label: 'Modified total', + amount: {currency: 'EUR', value: '0.03'}, + }, + additionalDisplayItems: [ + { + label: 'Modified display item', + amount: {currency: 'INR', value: '0.06'}, + }, + ], + }, + { + supportedMethods: methodName + '2', + data: {soup: 'tomato'}, + total: { + label: 'Modified total #2', + amount: {currency: 'CHF', value: '0.07'}, + }, + additionalDisplayItems: [ + { + label: 'Modified display item #2', + amount: {currency: 'CAD', value: '0.08'}, + }, + ], + }, + ], + paymentMethodErrors: {country: 'Unsupported country'}, + displayItems: [ + { + label: 'Display item', + amount: {currency: 'CNY', value: '0.04'}, + }, + ], + shippingOptions: [ + { + label: 'Shipping option', + id: 'id', + amount: {currency: 'JPY', value: '0.05'}, + }, + ], + }); + }); + const response = await test_driver.bless('showing a payment sheet', () => + request.show() + ); + const complete_promise = response.complete('success'); + const changePaymentMethodReturned = + response.details.changePaymentMethodReturned; + + assert_equals(changePaymentMethodReturned.total.currency, 'GBP'); + assert_equals(changePaymentMethodReturned.total.value, '0.02'); + assert_equals(changePaymentMethodReturned.total.label, undefined); + assert_equals(changePaymentMethodReturned.error, 'Error for test'); + assert_equals(changePaymentMethodReturned.modifiers.length, 1); + assert_equals(changePaymentMethodReturned.displayItems, undefined); + assert_equals(changePaymentMethodReturned.shippingOptions, undefined); + assert_equals( + changePaymentMethodReturned.paymentMethodErrors.country, + 'Unsupported country' + ); + + const modifier = changePaymentMethodReturned.modifiers[0]; + + assert_equals(modifier.supportedMethods, methodName); + assert_equals(modifier.data.soup, 'potato'); + assert_equals(modifier.total.label, ''); + assert_equals(modifier.total.amount.currency, 'EUR'); + assert_equals(modifier.total.amount.value, '0.03'); + assert_equals(modifier.additionalDisplayItems, undefined); + + return complete_promise; + }, 'The changePaymentMethod() returns some details from the "paymentmethodchange" event\'s updateWith(details) call.'); + } + + registerAndActiveServiceWorker( + 'app-change-payment-method.js', + 'payment-app/', + runTests + ); +</script> diff --git a/tests/wpt/web-platform-tests/performance-timeline/po-observe.html b/tests/wpt/web-platform-tests/performance-timeline/po-observe.html index 6cc3f1ecf56..a48f0f3764b 100644 --- a/tests/wpt/web-platform-tests/performance-timeline/po-observe.html +++ b/tests/wpt/web-platform-tests/performance-timeline/po-observe.html @@ -51,7 +51,6 @@ PerformanceObserverInit.buffered should retrieve previously buffered entries }); po_nop.observe({ entryTypes, - buffered: false }); // this PerformanceObserver should be notified about the previously diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html b/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html index 9dfd5e1764d..a7932725227 100644 --- a/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html +++ b/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html @@ -3,7 +3,7 @@ <head> <title>Pointer Events pointer lock tests</title> <meta name="viewport" content="width=device-width"> - <link rel="stylesheet" type="text/css" href="/external/wpt/pointerevents/pointerevent_styles.css"> + <link rel="stylesheet" type="text/css" href="../pointerevent_styles.css"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/testdriver.js"></script> @@ -36,21 +36,19 @@ var test_pointerEvent = setup_pointerevent_test("Test pointerevent coordinates when pointer is locked", ['mouse']); var div1 = document.getElementById("target"); - on_event(div1, 'pointerdown', function(event) { + on_event(div1, 'click', function(event) { if (test_state == kStateInit) div1.requestPointerLock(); - }); - on_event(div1, 'pointerup', function(event) { - if (test_state == kStateLocked) + else if (test_state == kStateLocked) document.exitPointerLock(); }); on_event(div1, 'pointermove', function(event) { if (test_state == kStateLocked) { test_pointerEvent.step(function() { - assert_equals(last_pointer_client_pos['x'], event.clientX) - assert_equals(last_pointer_client_pos['y'], event.clientY) - assert_equals(last_pointer_screen_pos['x'], event.screenX) - assert_equals(last_pointer_screen_pos['y'], event.screenY) + assert_equals(event.clientX, last_pointer_client_pos['x'], 'clientX') + assert_equals(event.clientY, last_pointer_client_pos['y'], 'clientY') + assert_equals(event.screenX, last_pointer_screen_pos['x'], 'screenX') + assert_equals(event.screenY, last_pointer_screen_pos['y'], 'screenY') }); } else { last_pointer_client_pos = {'x': event.clientX, 'y': event.clientY} @@ -63,6 +61,17 @@ test_pointerEvent.step(function() { assert_equals(document.pointerLockElement, div1, "document.pointerLockElement should be div1."); }); + + var actions = new test_driver.Actions(); + pos_x = div1.offsetWidth / 2; + pos_y = div1.offsetHeight / 2; + for (var i = 0; i < 10; i++) { + // Move left and up. + pos_x += 10; + pos_y -= 10; + actions.pointerMove(pos_x, pos_y, {origin: div1}); + } + actions.pointerDown().pointerUp().send(); } else if (test_state == kStateLocked) { test_state = kStateUnlocked; test_pointerEvent.step(function() { @@ -72,18 +81,7 @@ } }); - var actions = new test_driver.Actions(); - actions.pointerMove(/* x = */ 0, /* y = */ 0, {origin: div1}).pointerDown(); - - pos_x = div1.offsetWidth / 2; - pos_y = div1.offsetHeight / 2; - for (var i = 0; i < 10; i++) { - // Alternatively move left/right and up/down. - pos_x += ((-1)**i) * i * 10; - pos_y -= ((-1)**i) * i * 10; - actions.pointerMove(pos_x, pos_y, {origin: div1}); - } - actions.pointerUp().send(); + new test_driver.Actions().pointerMove(/* x = */ 0, /* y = */ 0, {origin: div1}).pointerDown().pointerUp().send(); } </script> </head> @@ -93,16 +91,16 @@ <h4> Test Description: This test checks the pointer event coordinates stays unchanged when pointer is locked. <ol> - <li>Press left button down on the green rectangle and hold it.</li> - <li>Move the mouse inside the green rectangle.</li> - <li>Release mouse button. </li> + <li>Click left mouse button on the green rectangle.</li> + <li>Move the mouse around.</li> + <li>Click left mouse button again. </li> </ol> </ol> Test passes if the proper behavior of the events is observed. </h4> <div id="testContainer"> - <div id="target" style="width:800px;height:250px;background:green"></div> + <div id="target" style="width:200px;height:200px;background:green"></div> </div> <div class="spacer"></div> </body> diff --git a/tests/wpt/web-platform-tests/resource-timing/redirects.sub.html b/tests/wpt/web-platform-tests/resource-timing/redirects.sub.html index 0e3f405e14b..d3d4f75c817 100644 --- a/tests/wpt/web-platform-tests/resource-timing/redirects.sub.html +++ b/tests/wpt/web-platform-tests/resource-timing/redirects.sub.html @@ -13,7 +13,7 @@ let iframe; const redirect_url = 'common/redirect.py'; const url_prefix = redirect_url + '?location=/resource-timing/resources/'; -const https_url_prefix = redirect_url + '?location=https://{{hosts[][www]}}:{{ports[https][0]}}/resource-timing/resources/'; +const https_url_prefix = redirect_url + '?location=https://{{hosts[alt][]}}:{{ports[https][0]}}/resource-timing/resources/'; function setup_iframe() { const iframe_content = '<link rel="stylesheet" href="/' + url_prefix + 'resource_timing_test0.css"></link>' + diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https.sub.html b/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https.sub.html index cf49fb914be..21f1f02a674 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https.sub.html +++ b/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https.sub.html @@ -2,7 +2,7 @@ <script> function request() { var client = new XMLHttpRequest, - baseurl = "https://{{hosts[][www]}}:{{ports[https][0]}}{{location[pathname]}}", + baseurl = "https://{{hosts[alt][]}}:{{ports[https][0]}}{{location[pathname]}}", url = new URL("fake_responses.py", baseurl).href; client.open("GET", url, false) client.send(null) diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https_redirect.sub.html b/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https_redirect.sub.html index c55e037d1dc..2ee92b2a551 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https_redirect.sub.html +++ b/tests/wpt/web-platform-tests/resource-timing/resources/fake_responses_https_redirect.sub.html @@ -2,7 +2,7 @@ <script> function request() { var client = new XMLHttpRequest, - baseurl = "http://{{hosts[][www]}}:{{ports[http][0]}}{{location[pathname]}}", + baseurl = "http://{{hosts[alt][]}}:{{ports[http][0]}}{{location[pathname]}}", subresource = "fake_responses.py", redirecturl = new URL(subresource, "https://{{hosts[][www]}}:{{ports[https][0]}}{{location[pathname]}}").href, url = new URL(subresource + "?redirect=" + redirecturl, baseurl).href; diff --git a/tests/wpt/web-platform-tests/tools/manifest/item.py b/tests/wpt/web-platform-tests/tools/manifest/item.py index 1556bfafdaf..f18e5ba6c9d 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/item.py +++ b/tests/wpt/web-platform-tests/tools/manifest/item.py @@ -105,6 +105,8 @@ class URLManifestItem(ManifestItem): class TestharnessTest(URLManifestItem): + __slots__ = () + item_type = "testharness" @property @@ -162,10 +164,15 @@ class RefTestBase(URLManifestItem): @property def fuzzy(self): - rv = self._extras.get("fuzzy", []) - if isinstance(rv, list): - return {tuple(item[0]): item[1] - for item in self._extras.get("fuzzy", [])} + fuzzy = self._extras.get("fuzzy", {}) + if not isinstance(fuzzy, list): + return fuzzy + + rv = {} + for k, v in fuzzy: + if k is not None: + k = tuple(k) + rv[k] = v return rv def to_json(self): @@ -207,30 +214,44 @@ class RefTestBase(URLManifestItem): class RefTestNode(RefTestBase): + __slots__ = () + item_type = "reftest_node" class RefTest(RefTestBase): + __slots__ = () + item_type = "reftest" class ManualTest(URLManifestItem): + __slots__ = () + item_type = "manual" class ConformanceCheckerTest(URLManifestItem): + __slots__ = () + item_type = "conformancechecker" class VisualTest(URLManifestItem): + __slots__ = () + item_type = "visual" class Stub(URLManifestItem): + __slots__ = () + item_type = "stub" class WebDriverSpecTest(URLManifestItem): + __slots__ = () + item_type = "wdspec" @property @@ -245,6 +266,8 @@ class WebDriverSpecTest(URLManifestItem): class SupportFile(ManifestItem): + __slots__ = () + item_type = "support" @property diff --git a/tests/wpt/web-platform-tests/tools/manifest/manifest.py b/tests/wpt/web-platform-tests/tools/manifest/manifest.py index dd2e3627f47..5dde9374642 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/manifest.py +++ b/tests/wpt/web-platform-tests/tools/manifest/manifest.py @@ -483,9 +483,11 @@ def load_and_update(tests_root, allow_cached=allow_cached) except ManifestVersionMismatch: logger.info("Manifest version changed, rebuilding") + rebuild = True if manifest is not None and manifest.url_base != url_base: logger.info("Manifest url base did not match, rebuilding") + rebuild = True if manifest is None: manifest = Manifest(tests_root, url_base) diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_item.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_item.py index 385180b25ce..99899c5909b 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_item.py +++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_item.py @@ -1,6 +1,9 @@ +import json + import pytest -from ..item import URLManifestItem +from ..manifest import Manifest +from ..item import URLManifestItem, RefTest @pytest.mark.parametrize("path", [ @@ -39,3 +42,55 @@ def test_url_not_https(path): m = URLManifestItem("/foo", "bar/" + path, "/", "bar/" + path) assert m.https is False + + +@pytest.mark.parametrize("fuzzy", [ + {('/foo/test.html', u'/foo/ref.html', '=='): [[1, 1], [200, 200]]}, + {('/foo/test.html', u'/foo/ref.html', '=='): [[0, 1], [100, 200]]}, + {None: [[0, 1], [100, 200]]}, + {None: [[1, 1], [200, 200]]}, +]) +def test_reftest_fuzzy(fuzzy): + t = RefTest('/', + 'foo/test.html', + '/', + 'foo/test.html', + [('/foo/ref.html', '==')], + fuzzy=fuzzy) + assert fuzzy == t.fuzzy + + json_obj = t.to_json() + + m = Manifest("/", "/") + t2 = RefTest.from_json(m, t.path, json_obj) + assert fuzzy == t2.fuzzy + + # test the roundtrip case, given tuples become lists + roundtrip = json.loads(json.dumps(json_obj)) + t3 = RefTest.from_json(m, t.path, roundtrip) + assert fuzzy == t3.fuzzy + + +@pytest.mark.parametrize("fuzzy", [ + {('/foo/test.html', u'/foo/ref-2.html', '=='): [[0, 1], [100, 200]]}, + {None: [[1, 1], [200, 200]], ('/foo/test.html', u'/foo/ref-2.html', '=='): [[0, 1], [100, 200]]}, +]) +def test_reftest_fuzzy_multi(fuzzy): + t = RefTest('/', + 'foo/test.html', + '/', + 'foo/test.html', + [('/foo/ref-1.html', '=='), ('/foo/ref-2.html', '==')], + fuzzy=fuzzy) + assert fuzzy == t.fuzzy + + json_obj = t.to_json() + + m = Manifest("/", "/") + t2 = RefTest.from_json(m, t.path, json_obj) + assert fuzzy == t2.fuzzy + + # test the roundtrip case, given tuples become lists + roundtrip = json.loads(json.dumps(json_obj)) + t3 = RefTest.from_json(m, t.path, roundtrip) + assert fuzzy == t3.fuzzy diff --git a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt index 0654986be4f..8caf51e9a16 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt @@ -1,3 +1,3 @@ mypy==0.701 mypy-extensions==0.4.1 -typed-ast==1.3.4 +typed-ast==1.3.5 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py index cfbc42f61a0..d1c123a3ef3 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py @@ -309,8 +309,10 @@ class RefTestImplementation(object): self.logger.info("Allowed %s pixels different, maximum difference per channel %s" % ("-".join(str(item) for item in allowed_different), "-".join(str(item) for item in allowed_per_channel))) - equal = (allowed_per_channel[0] <= max_per_channel <= allowed_per_channel[1] and - allowed_different[0] <= pixels_different <= allowed_different[1]) + equal = ((pixels_different == 0 and allowed_different[0] == 0) or + (max_per_channel == 0 and allowed_per_channel[0] == 0) or + (allowed_per_channel[0] <= max_per_channel <= allowed_per_channel[1] and + allowed_different[0] <= pixels_different <= allowed_different[1])) return equal if relation == "==" else not equal def get_differences(self, screenshots): diff --git a/tests/wpt/web-platform-tests/user-timing/mark-entry-constructor.html b/tests/wpt/web-platform-tests/user-timing/mark-entry-constructor.html new file mode 100644 index 00000000000..47c9a644118 --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/mark-entry-constructor.html @@ -0,0 +1,50 @@ +<!DOCTYPE HTML> +<meta charset=utf-8> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/user-timing-helper.js"></script> +<title>User Timing L3: create mark entry by constructor</title> +<h1>User Timing L3: create mark entry by constructor</h1> +<p> +User Timing L3: Mark entry can be created by using constructor." +</p> +<script> + test(()=>{ + const entry = new PerformanceMark("name"); + assert_true(entry instanceof PerformanceMark); + checkEntry(entry, {name: "name", entryType: "mark"}); + }, "Mark entry can be created by 'new PerformanceMark(string)'."); + + test(()=>{ + const entry = new PerformanceMark("name", {}); + assert_true(entry instanceof PerformanceMark); + checkEntry(entry, {name: "name", entryType: "mark"}); + }, "Mark entry can be created by 'new PerformanceMark(string, {})'."); + + test(()=>{ + const entry = new PerformanceMark("name", {startTime: 1}); + assert_true(entry instanceof PerformanceMark); + checkEntry(entry, {name: "name", entryType: "mark", startTime: 1}); + }, "Mark entry can be created by 'new PerformanceMark(string, {startTime})'."); + + test(()=>{ + const entry = new PerformanceMark("name", {detail: {info: "abc"}}); + assert_true(entry instanceof PerformanceMark); + checkEntry(entry, {name: "name", entryType: "mark", detail: {info: "abc"}}); + }, "Mark entry can be created by 'new PerformanceMark(string, {detail})'."); + + test(()=>{ + const entry = + new PerformanceMark("name", {startTime: 1, detail: {info: "abc"}}); + assert_true(entry instanceof PerformanceMark); + checkEntry(entry, {name: "name", entryType: "mark", startTime: 1, detail: {info: "abc"}}); + }, "Mark entry can be created by " + + "'new PerformanceMark(string, {startTime, detail})'."); + + test(()=>{ + const entry = new PerformanceMark("name"); + assert_true(entry instanceof PerformanceMark); + checkEntry(entry, {name: "name", entryType: "mark"}); + assert_equals(performance.getEntriesByName("name").length, 0); + }, "Using new PerformanceMark() shouldn't add the entry to performance timeline."); +</script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/web-animations/animation-model/keyframe-effects/computed-keyframes-shorthands.html b/tests/wpt/web-platform-tests/web-animations/animation-model/keyframe-effects/computed-keyframes-shorthands.html new file mode 100644 index 00000000000..ff62a23bce0 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/animation-model/keyframe-effects/computed-keyframes-shorthands.html @@ -0,0 +1,30 @@ +<!doctype html> +<meta charset=utf-8> +<title>Calculating computed keyframes: Shorthand properties</title> +<link rel="help" href="https://drafts.csswg.org/web-animations-1/#calculating-computed-keyframes"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../../testcommon.js"></script> +<body> +<div id="log"></div> +<div id="target"></div> +<script> +'use strict'; + +test(t => { + const div = createDiv(t); + div.style.opacity = '0'; + + const animation = div.animate({ all: 'initial' }, 100 * MS_PER_SEC); + animation.currentTime = 50 * MS_PER_SEC; + + assert_approx_equals( + parseFloat(getComputedStyle(div).opacity), + 0.5, + 0.0001, + 'Should be half way through an opacity animation' + ); +}, 'It should be possible to animate the all shorthand'); + +</script> +</body> diff --git a/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html b/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html index da34fec60f0..706f72102ad 100644 --- a/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html +++ b/tests/wpt/web-platform-tests/webxr/xrRigidTransform_inverse.https.html @@ -98,6 +98,19 @@ let testFunction = assert_transform_approx_equals(transform, inverse_transform.inverse); }); + // Inverse should always return the same object, and calling inverse on that + // object should return the original object. + transform = new XRRigidTransform( + { x: 1.0, y: -2.0, z: 3.0 }, + { x: 0.0, y: 0.0, z: 1.0, w: 1.0 }); + inverse_transform = transform.inverse; + t.step(() => { + assert_true(transform.inverse === inverse_transform); + assert_true(inverse_transform.inverse === transform); + assert_true(transform.inverse.inverse === transform); + assert_true(transform.inverse.inverse.inverse === inverse_transform); + }); + resolve(); }); diff --git a/tests/wpt/web-platform-tests/xhr/event-abort.any.js b/tests/wpt/web-platform-tests/xhr/event-abort.any.js new file mode 100644 index 00000000000..9b38ccf9c9e --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-abort.any.js @@ -0,0 +1,15 @@ +// META: title=XMLHttpRequest: abort event + +var test = async_test(); +test.step(function () { + var client = new XMLHttpRequest(); + client.onabort = test.step_func(function () { + test.done(); + }); + client.open("GET", "resources/well-formed.xml"); + client.send(null); + client.abort(); + test.step_timeout(() => { + assert_unreached("onabort not called after 4 ms"); + }, 4); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-abort.htm b/tests/wpt/web-platform-tests/xhr/event-abort.htm deleted file mode 100644 index 2f80d1b6078..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-abort.htm +++ /dev/null @@ -1,29 +0,0 @@ -<!doctype html> -<html> - <head> - <title>XMLHttpRequest: abort event</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onabort" data-tested-assertations="../.." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-abort" data-tested-assertations="../.." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-abort" data-tested-assertations="following::ol//ol//ol/li[3]" /> - </head> - <body> - <div id="log"></div> - <script> - var test = async_test(); - test.step(function() { - var client = new XMLHttpRequest(); - client.onabort = test.step_func(function() { - test.done(); - }); - client.open("GET", "resources/well-formed.xml"); - client.send(null); - client.abort(); - test.step_timeout(() => { - assert_unreached("onabort not called after 4 ms"); - }, 4); - }); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/xhr/event-error.sub.any.js b/tests/wpt/web-platform-tests/xhr/event-error.sub.any.js new file mode 100644 index 00000000000..df63dc05bfa --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-error.sub.any.js @@ -0,0 +1,13 @@ +// META: title=XMLHttpRequest Test: event - error + +async_test(function (t) { + var client = new XMLHttpRequest(); + client.onerror = t.step_func(function (e) { + assert_true(e instanceof ProgressEvent); + assert_equals(e.type, "error"); + t.done(); + }); + + client.open("GET", "http://nonexistent.{{host}}:{{ports[http][0]}}"); + client.send("null"); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-error.sub.html b/tests/wpt/web-platform-tests/xhr/event-error.sub.html deleted file mode 100644 index 5f275600006..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-error.sub.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>XMLHttpRequest Test: event - error</title> -<link rel="author" title="Intel" href="http://www.intel.com"> -<meta name="assert" content="Check if event onerror is fired When the request has failed."> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> - -<div id="log"></div> - -<script> - -async_test(function (t) { - var client = new XMLHttpRequest(); - client.onerror = t.step_func(function(e) { - assert_true(e instanceof ProgressEvent); - assert_equals(e.type, "error"); - t.done(); - }); - - client.open("GET", "http://nonexistent.{{host}}:{{ports[http][0]}}"); - client.send("null"); -}, document.title); - -</script> diff --git a/tests/wpt/web-platform-tests/xhr/event-load.any.js b/tests/wpt/web-platform-tests/xhr/event-load.any.js new file mode 100644 index 00000000000..72e46a5cea8 --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-load.any.js @@ -0,0 +1,21 @@ +// META: title=XMLHttpRequest: The send() method: Fire an event named load (synchronous flag is unset) + +var test = async_test(); +test.step(function () { + var client = new XMLHttpRequest(); + client.onload = test.step_func(function (e) { + assert_true(e instanceof ProgressEvent); + assert_equals(e.type, "load"); + assert_equals(client.readyState, 4); + test.done(); + }); + client.onreadystatechange = test.step_func(function () { + if (client.readyState !== 4) return; + + test.step_timeout(() => { + assert_unreached("Didn't get load event within 4ms of readystatechange==4"); + }, 4); + }); + client.open("GET", "resources/well-formed.xml"); + client.send(null); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-load.htm b/tests/wpt/web-platform-tests/xhr/event-load.htm deleted file mode 100644 index cdd0c5bb8ad..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-load.htm +++ /dev/null @@ -1,30 +0,0 @@ -<!doctype html> -<meta charset=utf-8> -<title>XMLHttpRequest: The send() method: Fire an event named load (synchronous flag is unset)</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onload" data-tested-assertations="../.." /> -<link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-load" data-tested-assertations="../.." /> -<div id="log"></div> - -<script> - var test = async_test(); - test.step(function() { - var client = new XMLHttpRequest(); - client.onload = test.step_func(function(e) { - assert_true(e instanceof ProgressEvent); - assert_equals(e.type, "load"); - assert_equals(client.readyState, 4); - test.done(); - }); - client.onreadystatechange = test.step_func(function() { - if (client.readyState !== 4) return; - - test.step_timeout(() => { - assert_unreached("Didn't get load event within 4ms of readystatechange==4"); - }, 4); - }); - client.open("GET", "resources/well-formed.xml"); - client.send(null); - }); -</script> diff --git a/tests/wpt/web-platform-tests/xhr/event-loadend.any.js b/tests/wpt/web-platform-tests/xhr/event-loadend.any.js new file mode 100644 index 00000000000..7bd1844b378 --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-loadend.any.js @@ -0,0 +1,19 @@ +// META: title=XMLHttpRequest: loadend event + +var test = async_test(); +test.step(function () { + var client = new XMLHttpRequest(); + client.onloadend = test.step_func(function (e) { + assert_true(e instanceof ProgressEvent); + assert_equals(e.type, "loadend"); + test.done(); + }); + client.onreadystatechange = function () { + if (client.readyState !== 4) return; + test.step_timeout(() => { + assert_unreached("onloadend not called after 100 ms"); + }, 100); + }; + client.open("GET", "resources/well-formed.xml"); + client.send(null); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-loadend.htm b/tests/wpt/web-platform-tests/xhr/event-loadend.htm deleted file mode 100644 index b17d9b9134e..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-loadend.htm +++ /dev/null @@ -1,32 +0,0 @@ -<!doctype html> -<html> - <head> - <title>XMLHttpRequest: loadend event</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onloadend" data-tested-assertations="/../.." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-loadend" data-tested-assertations="/../.." /> - </head> - <body> - <div id="log"></div> - <script> - var test = async_test(); - test.step(function() { - var client = new XMLHttpRequest(); - client.onloadend = test.step_func(function(e) { - assert_true(e instanceof ProgressEvent); - assert_equals(e.type, "loadend"); - test.done(); - }); - client.onreadystatechange = function() { - if (client.readyState !== 4) return; - test.step_timeout(() => { - assert_unreached("onloadend not called after 100 ms"); - }, 100); - }; - client.open("GET", "resources/well-formed.xml"); - client.send(null); - }); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/xhr/event-loadstart-upload.any.js b/tests/wpt/web-platform-tests/xhr/event-loadstart-upload.any.js new file mode 100644 index 00000000000..0f41cd1286b --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-loadstart-upload.any.js @@ -0,0 +1,19 @@ +// META: title=XMLHttpRequest: The send() method: Fire a progress event named loadstart on upload object (synchronous flag is unset) + +var test = async_test(); +test.step(function () { + var client = new XMLHttpRequest(); + client.upload.onloadstart = test.step_func(function (e) { + assert_true(e instanceof ProgressEvent); + assert_equals(e.total, 7, 'upload.onloadstart: event.total'); + assert_equals(e.loaded, 0, 'upload.onloadstart: event.loaded'); + assert_equals(e.type, "loadstart"); + test.done(); + }); + client.onreadystatechange = test.step_func(function () { + if (client.readyState === 4) + assert_unreached("onloadstart not called."); + }); + client.open("POST", "resources/trickle.py?ms=5&count=8"); + client.send('foo=bar'); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-loadstart-upload.htm b/tests/wpt/web-platform-tests/xhr/event-loadstart-upload.htm deleted file mode 100644 index 275d418a7e0..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-loadstart-upload.htm +++ /dev/null @@ -1,28 +0,0 @@ -<!doctype html> -<html lang=en> -<meta charset=utf-8> -<title>XMLHttpRequest: The send() method: Fire a progress event named loadstart on upload object (synchronous flag is unset)</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onprogress" data-tested-assertations="../.." /> -<link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-progress" data-tested-assertations="../.." /> -<div id="log"></div> -<script> - var test = async_test(); - test.step(function() { - var client = new XMLHttpRequest(); - client.upload.onloadstart = test.step_func(function(e) { - assert_true(e instanceof ProgressEvent); - assert_equals(e.total, 7, 'upload.onloadstart: event.total'); - assert_equals(e.loaded, 0, 'upload.onloadstart: event.loaded'); - assert_equals(e.type, "loadstart"); - test.done(); - }); - client.onreadystatechange = test.step_func(function() { - if (client.readyState === 4) - assert_unreached("onloadstart not called."); - }); - client.open("POST", "resources/trickle.py?ms=5&count=8"); - client.send('foo=bar'); - }); -</script> diff --git a/tests/wpt/web-platform-tests/xhr/event-loadstart.any.js b/tests/wpt/web-platform-tests/xhr/event-loadstart.any.js new file mode 100644 index 00000000000..4778404a00e --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-loadstart.any.js @@ -0,0 +1,17 @@ +// META: title=XMLHttpRequest: loadstart event + +var test = async_test(); +test.step(function () { + var client = new XMLHttpRequest(); + client.onloadstart = test.step_func(function (e) { + assert_true(e instanceof ProgressEvent); + assert_equals(e.type, "loadstart"); + assert_equals(client.readyState, 1); + test.done(); + }); + test.step_timeout(function () { + assert_unreached("onloadstart not called after 500 ms"); + }, 500); + client.open("GET", "resources/well-formed.xml"); + client.send(null); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-loadstart.htm b/tests/wpt/web-platform-tests/xhr/event-loadstart.htm deleted file mode 100644 index 442be938dc7..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-loadstart.htm +++ /dev/null @@ -1,31 +0,0 @@ -<!doctype html> -<html> - <head> - <title>XMLHttpRequest: loadstart event</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onloadstart" data-tested-assertations="../.." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-loadstart" data-tested-assertations="../.." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following-sibling::ol/li[9]/ol/li[2]" /> - </head> - <body> - <div id="log"></div> - <script> - var test = async_test(); - test.step(function() { - var client = new XMLHttpRequest(); - client.onloadstart = test.step_func(function(e) { - assert_true(e instanceof ProgressEvent); - assert_equals(e.type, "loadstart"); - assert_equals(client.readyState, 1); - test.done(); - }); - test.step_timeout(function () { - assert_unreached("onloadstart not called after 500 ms"); - }, 500); - client.open("GET", "resources/well-formed.xml"); - client.send(null); - }); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/xhr/event-progress.any.js b/tests/wpt/web-platform-tests/xhr/event-progress.any.js new file mode 100644 index 00000000000..0e7c3a42c7d --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-progress.any.js @@ -0,0 +1,18 @@ +// META: title=XMLHttpRequest: The send() method: Fire a progress event named progress (synchronous flag is unset) +// META: timeout=long + +var test = async_test(); +test.step(function () { + var client = new XMLHttpRequest(); + client.onprogress = test.step_func(function (e) { + assert_true(e instanceof ProgressEvent); + assert_equals(e.type, "progress"); + test.done(); + }); + client.onreadystatechange = test.step_func(function () { + if (client.readyState === 4) + assert_unreached("onprogress not called."); + }); + client.open("GET", "resources/trickle.py?count=4&delay=150"); + client.send(null); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-progress.htm b/tests/wpt/web-platform-tests/xhr/event-progress.htm deleted file mode 100644 index 5e9090e3dfc..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-progress.htm +++ /dev/null @@ -1,27 +0,0 @@ -<!doctype html> -<html lang=en> -<meta charset=utf-8> -<title>XMLHttpRequest: The send() method: Fire a progress event named progress (synchronous flag is unset)</title> -<meta name="timeout" content="long"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-onprogress" data-tested-assertations="../.." /> -<link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-progress" data-tested-assertations="../.." /> -<div id="log"></div> -<script> - var test = async_test(); - test.step(function() { - var client = new XMLHttpRequest(); - client.onprogress = test.step_func(function(e) { - assert_true(e instanceof ProgressEvent); - assert_equals(e.type, "progress"); - test.done(); - }); - client.onreadystatechange = test.step_func(function() { - if (client.readyState === 4) - assert_unreached("onprogress not called."); - }); - client.open("GET", "resources/trickle.py?count=4&delay=150"); - client.send(null); - }); -</script> diff --git a/tests/wpt/web-platform-tests/xhr/event-readystate-sync-open.any.js b/tests/wpt/web-platform-tests/xhr/event-readystate-sync-open.any.js new file mode 100644 index 00000000000..321635e7dea --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-readystate-sync-open.any.js @@ -0,0 +1,23 @@ +// META: title=XMLHttpRequest: open() call fires sync readystate event + +const title = "XMLHttpRequest: open() call fires sync readystate event"; + +test(function () { + var client = new XMLHttpRequest() + var eventsFired = [] + client.onreadystatechange = function () { + eventsFired.push(client.readyState) + } + client.open('GET', "...", false) + assert_array_equals(eventsFired, [1]) +}, title + ' (sync)'); + +test(function () { + var client = new XMLHttpRequest() + var eventsFired = [] + client.onreadystatechange = function () { + eventsFired.push(client.readyState) + } + client.open('GET', "...", true) + assert_array_equals(eventsFired, [1]) +}, title + ' (async)');
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-readystate-sync-open.htm b/tests/wpt/web-platform-tests/xhr/event-readystate-sync-open.htm deleted file mode 100644 index ae9697ea13a..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-readystate-sync-open.htm +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title>XMLHttpRequest: open() call fires sync readystate event</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::ol[1]/li[13]/ol[1]/li[2]" /> - - </head> - <body> - <div id="log"></div> - <script> - test(function() { - var client = new XMLHttpRequest() - var eventsFired = [] - client.onreadystatechange = function(){ - eventsFired.push(client.readyState) - } - client.open('GET', "...", false) - assert_array_equals(eventsFired, [1]) - }, document.title + ' (sync)') - test(function() { - var client = new XMLHttpRequest() - var eventsFired = [] - client.onreadystatechange = function(){ - eventsFired.push(client.readyState) - } - client.open('GET', "...", true) - assert_array_equals(eventsFired, [1]) - }, document.title + ' (async)') - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/xhr/event-readystatechange-loaded.any.js b/tests/wpt/web-platform-tests/xhr/event-readystatechange-loaded.any.js new file mode 100644 index 00000000000..1e4467aaebd --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-readystatechange-loaded.any.js @@ -0,0 +1,23 @@ +// META: title=XMLHttpRequest: the LOADING state change may be emitted multiple times + +var test = async_test(); + +test.step(function () { + var client = new XMLHttpRequest(); + var countedLoading = 0; + + client.onreadystatechange = test.step_func(function () { + if (client.readyState === 3) { + countedLoading += 1; + } + + if (client.readyState === 4) { + assert_greater_than(countedLoading, 1, "LOADING state change may be emitted multiple times"); + + test.done(); + } + }); + + client.open("GET", "resources/trickle.py?count=10"); // default timeout in trickle.py is 1/2 sec, so this request will take 5 seconds to complete + client.send(null); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-readystatechange-loaded.htm b/tests/wpt/web-platform-tests/xhr/event-readystatechange-loaded.htm deleted file mode 100644 index 6cbcc22a330..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-readystatechange-loaded.htm +++ /dev/null @@ -1,37 +0,0 @@ -<!doctype html> -<html lang="en"> -<head> - <meta charset="utf-8"> - <title>XMLHttpRequest: the LOADING state change may be emitted multiple times</title> - <meta name="timeout" content="long"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::ol[1]/li[10]/dt[1]"> -</head> - -<div id="log"></div> - -<script> - -var test = async_test(); - -test.step(function() { - var client = new XMLHttpRequest(); - var countedLoading = 0; - - client.onreadystatechange = test.step_func(function() { - if (client.readyState === 3) { - countedLoading += 1; - } - - if (client.readyState === 4) { - assert_greater_than(countedLoading, 1, "LOADING state change may be emitted multiple times"); - - test.done(); - } - }); - - client.open("GET", "resources/trickle.py?count=10"); // default timeout in trickle.py is 1/2 sec, so this request will take 5 seconds to complete - client.send(null); -}); -</script> diff --git a/tests/wpt/web-platform-tests/xhr/event-timeout-order.any.js b/tests/wpt/web-platform-tests/xhr/event-timeout-order.any.js new file mode 100644 index 00000000000..b35e908a9d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-timeout-order.any.js @@ -0,0 +1,21 @@ +// META: title=XMLHttpRequest: event - timeout (order of events) +// META: script=resources/xmlhttprequest-event-order.js + +var test = async_test(); +test.step(function () { + var xhr = new XMLHttpRequest(); + prepare_xhr_for_event_order_test(xhr); + xhr.addEventListener("loadend", function () { + test.step(function () { + assert_xhr_event_order_matches([1, "loadstart(0,0,false)", "upload.loadstart(0,12,true)", 4, "upload.timeout(0,0,false)", "upload.loadend(0,0,false)", "timeout(0,0,false)", "loadend(0,0,false)"]); + test.done(); + }); + }); + + xhr.timeout = 5; + xhr.open("POST", "resources/delay.py?ms=20000"); + xhr.send("Test Message"); + test.step_timeout(() => { + assert_unreached("ontimeout not called."); + }, 10); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-timeout-order.htm b/tests/wpt/web-platform-tests/xhr/event-timeout-order.htm deleted file mode 100644 index d4dc78010a7..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-timeout-order.htm +++ /dev/null @@ -1,37 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <meta name="assert" content="Check the order of events fired when the request has failed."> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/xmlhttprequest-event-order.js"></script> - <title>XMLHttpRequest: event - timeout (order of events)</title> -</head> - -<body> - <div id="log"></div> - - <script type="text/javascript"> - var test = async_test(); - - test.step(function() - { - var xhr = new XMLHttpRequest(); - prepare_xhr_for_event_order_test(xhr); - xhr.addEventListener("loadend", function() { - test.step(function() { - assert_xhr_event_order_matches([1, "loadstart(0,0,false)", "upload.loadstart(0,12,true)", 4, "upload.timeout(0,0,false)", "upload.loadend(0,0,false)", "timeout(0,0,false)", "loadend(0,0,false)"]); - test.done(); - }); - }); - - xhr.timeout = 5; - xhr.open("POST", "resources/delay.py?ms=20000"); - xhr.send("Test Message"); - test.step_timeout(() => { - assert_unreached("ontimeout not called."); - }, 10); - }); - </script> -</body> -</html> diff --git a/tests/wpt/web-platform-tests/xhr/event-timeout.any.js b/tests/wpt/web-platform-tests/xhr/event-timeout.any.js new file mode 100644 index 00000000000..d114b08b3e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/event-timeout.any.js @@ -0,0 +1,18 @@ +// META: title=XMLHttpRequest: timeout event + +var test = async_test(); +test.step(function () { + var client = new XMLHttpRequest(); + client.ontimeout = function () { + test.step(function () { + assert_equals(client.readyState, 4); + test.done(); + }); + }; + client.timeout = 5; + client.open("GET", "resources/delay.py?ms=20000"); + client.send(null); + test.step_timeout(() => { + assert_unreached("ontimeout not called."); + }, 10); +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-timeout.htm b/tests/wpt/web-platform-tests/xhr/event-timeout.htm deleted file mode 100644 index c40213562b5..00000000000 --- a/tests/wpt/web-platform-tests/xhr/event-timeout.htm +++ /dev/null @@ -1,34 +0,0 @@ -<!doctype html> -<html> - <head> - <title>XMLHttpRequest: timeout event</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <link rel="help" href="https://xhr.spec.whatwg.org/#handler-xhr-ontimeout" data-tested-assertations="../.." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#event-xhr-timeout" data-tested-assertations="../.." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#the-timeout-attribute" data-tested-assertations="following-sibling::ol/li[2]" /> - <link rel="help" href="https://xhr.spec.whatwg.org/#timeout-error" data-tested-assertations=".." /> - <link rel="help" href="https://xhr.spec.whatwg.org/#infrastructure-for-the-send()-method" data-tested-assertations="following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/.. following-sibling::dl//code[contains(@title,'dom-XMLHttpRequest-timeout')]/../following-sibling::dd" /> - </head> - <body> - <div id="log"></div> - <script> - var test = async_test(); - test.step(function() { - var client = new XMLHttpRequest(); - client.ontimeout = function() { - test.step(function() { - assert_equals(client.readyState, 4); - test.done(); - }); - }; - client.timeout = 5; - client.open("GET", "resources/delay.py?ms=20000"); - client.send(null); - test.step_timeout(() => { - assert_unreached("ontimeout not called."); - }, 10); - }); - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/xhr/event-upload-progress-crossorigin.htm b/tests/wpt/web-platform-tests/xhr/event-upload-progress-crossorigin.any.js index 5e558a27b78..1036f2b14f0 100644 --- a/tests/wpt/web-platform-tests/xhr/event-upload-progress-crossorigin.htm +++ b/tests/wpt/web-platform-tests/xhr/event-upload-progress-crossorigin.any.js @@ -1,14 +1,8 @@ -<!doctype html> -<html lang=en> -<meta charset=utf-8> -<title>XMLHttpRequest: upload progress event for cross-origin requests</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/common/get-host-info.sub.js"></script> -<div id="log"></div> -<script> +// META: title=XMLHttpRequest: upload progress event for cross-origin requests +// META: script=/common/get-host-info.sub.js + const remote = get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/corsenabled.py", - redirect = "resources/redirect.py?code=307&location=" + remote; + redirect = "resources/redirect.py?code=307&location=" + remote; [remote, redirect].forEach(url => { async_test(test => { @@ -29,5 +23,4 @@ const remote = get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/corsenabled. client.upload.onloadstart = test.unreached_func(); // registered too late client.upload.onprogress = test.unreached_func(); // registered too late }, "Upload events registered too late (" + url + ")"); -}); -</script> +});
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/xhr/event-upload-progress.htm b/tests/wpt/web-platform-tests/xhr/event-upload-progress.any.js index 697d4cbd3f6..5d1546757ba 100644 --- a/tests/wpt/web-platform-tests/xhr/event-upload-progress.htm +++ b/tests/wpt/web-platform-tests/xhr/event-upload-progress.any.js @@ -1,14 +1,8 @@ -<!doctype html> -<html lang=en> -<meta charset=utf-8> -<title>XMLHttpRequest: upload progress event</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/common/get-host-info.sub.js"></script> -<div id="log"></div> -<script> +// META: title=XMLHttpRequest: upload progress event +// META: script=/common/get-host-info.sub.js + const remote = get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/corsenabled.py", - redirect = "resources/redirect.py?code=307&location=" + remote; + redirect = "resources/redirect.py?code=307&location=" + remote; [remote, redirect].forEach(url => { async_test(test => { @@ -29,5 +23,4 @@ const remote = get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/corsenabled. client.upload.onloadstart = test.unreached_func(); // registered too late client.upload.onprogress = test.unreached_func(); // registered too late }, "Upload events registered too late (" + url + ")"); -}); -</script> +});
\ No newline at end of file |