diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-12-13 22:22:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-13 22:22:08 -0500 |
commit | 79f2e786b2202b9be4f1b2bc6221324c7d085582 (patch) | |
tree | ab605457ce040f721f33fd83cd667f27d1c9eba1 | |
parent | 201f3dc50abe81dd66d1a94dcf08039263a04335 (diff) | |
parent | 3b6ddd885a13fb750d58188251a1221aec40a010 (diff) | |
download | servo-79f2e786b2202b9be4f1b2bc6221324c7d085582.tar.gz servo-79f2e786b2202b9be4f1b2bc6221324c7d085582.zip |
Auto merge of #22441 - servo-wpt-sync:wpt_update_12-12-2018, r=jdm
Sync WPT with upstream (12-12-2018)
Automated downstream sync of changes from upstream as of 12-12-2018.
[no-wpt-sync]
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22441)
<!-- Reviewable:end -->
116 files changed, 4259 insertions, 825 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 737e2918c2d..064dbc83dc9 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -190281,6 +190281,18 @@ {} ] ], + "html/semantics/forms/the-input-element/range-intrinsic-size.html": [ + [ + "/html/semantics/forms/the-input-element/range-intrinsic-size.html", + [ + [ + "/html/semantics/forms/the-input-element/range-intrinsic-size-ref.html", + "==" + ] + ], + {} + ] + ], "html/semantics/forms/the-textarea-element/textarea-newline-bidi.html": [ [ "/html/semantics/forms/the-textarea-element/textarea-newline-bidi.html", @@ -191881,6 +191893,30 @@ {} ] ], + "svg/geometry/reftests/percentage-attribute.svg": [ + [ + "/svg/geometry/reftests/percentage-attribute.svg", + [ + [ + "/svg/geometry/reftests/percentage-ref.svg", + "==" + ] + ], + {} + ] + ], + "svg/geometry/reftests/percentage.svg": [ + [ + "/svg/geometry/reftests/percentage.svg", + [ + [ + "/svg/geometry/reftests/percentage-ref.svg", + "==" + ] + ], + {} + ] + ], "svg/linking/reftests/href-a-element-attr-change.html": [ [ "/svg/linking/reftests/href-a-element-attr-change.html", @@ -192205,6 +192241,30 @@ {} ] ], + "svg/painting/reftests/percentage-attribute.svg": [ + [ + "/svg/painting/reftests/percentage-attribute.svg", + [ + [ + "/svg/painting/reftests/percentage-ref.svg", + "==" + ] + ], + {} + ] + ], + "svg/painting/reftests/percentage.svg": [ + [ + "/svg/painting/reftests/percentage.svg", + [ + [ + "/svg/painting/reftests/percentage-ref.svg", + "==" + ] + ], + {} + ] + ], "svg/path/bearing/absolute.svg": [ [ "/svg/path/bearing/absolute.svg", @@ -276401,6 +276461,11 @@ {} ] ], + "css/cssom/support/malformed-http-response.asis": [ + [ + {} + ] + ], "css/cssom/support/pattern-grg-rgr-grg.png": [ [ {} @@ -295386,6 +295451,11 @@ {} ] ], + "html/semantics/forms/the-input-element/range-intrinsic-size-ref.html": [ + [ + {} + ] + ], "html/semantics/forms/the-input-element/resources/image-submit-click.html": [ [ {} @@ -296446,6 +296516,16 @@ {} ] ], + "html/semantics/scripting-1/the-script-element/resources/syntax-error.js": [ + [ + {} + ] + ], + "html/semantics/scripting-1/the-script-element/resources/throw.js": [ + [ + {} + ] + ], "html/semantics/scripting-1/the-script-element/script-not-executed-after-shutdown-child.html": [ [ {} @@ -297051,6 +297131,11 @@ {} ] ], + "html/webappapis/dynamic-markup-insertion/document-write/047-1.html": [ + [ + {} + ] + ], "html/webappapis/dynamic-markup-insertion/document-write/empty.html": [ [ {} @@ -309781,6 +309866,11 @@ {} ] ], + "svg/geometry/reftests/percentage-ref.svg": [ + [ + {} + ] + ], "svg/import/woffs/Blocky.woff": [ [ {} @@ -310081,6 +310171,11 @@ {} ] ], + "svg/painting/reftests/percentage-ref.svg": [ + [ + {} + ] + ], "svg/path/bearing/absolute-ref.svg": [ [ {} @@ -310456,6 +310551,11 @@ {} ] ], + "tools/ci/azure/affected_tests.yml": [ + [ + {} + ] + ], "tools/ci/azure/checkout.yml": [ [ {} @@ -317041,11 +317141,6 @@ {} ] ], - "tools/wptrunner/wptrunner/executors/testharness_webdriver.js": [ - [ - {} - ] - ], "tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js": [ [ {} @@ -361236,6 +361331,12 @@ } ] ], + "encoding/sniffing.html": [ + [ + "/encoding/sniffing.html", + {} + ] + ], "encoding/streams/backpressure.any.js": [ [ "/encoding/streams/backpressure.any.html", @@ -377426,12 +377527,6 @@ {} ] ], - "html/webappapis/dynamic-markup-insertion/document-write/048.html": [ - [ - "/html/webappapis/dynamic-markup-insertion/document-write/048.html", - {} - ] - ], "html/webappapis/dynamic-markup-insertion/document-write/049.html": [ [ "/html/webappapis/dynamic-markup-insertion/document-write/049.html", @@ -377990,9 +378085,9 @@ {} ] ], - "html/webappapis/scripting/events/event-handler-attributes-window-body.html": [ + "html/webappapis/scripting/events/event-handler-attributes-frameset-window.html": [ [ - "/html/webappapis/scripting/events/event-handler-attributes-window-body.html", + "/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html", {} ] ], @@ -379278,6 +379373,16 @@ {} ] ], + "longtask-timing/supported-longtask-types.any.js": [ + [ + "/longtask-timing/supported-longtask-types.any.html", + {} + ], + [ + "/longtask-timing/supported-longtask-types.any.worker.html", + {} + ] + ], "magnetometer/Magnetometer-disabled-by-feature-policy.https.html": [ [ "/magnetometer/Magnetometer-disabled-by-feature-policy.https.html", @@ -383230,6 +383335,16 @@ {} ] ], + "navigation-timing/supported_navigation_type.any.js": [ + [ + "/navigation-timing/supported_navigation_type.any.html", + {} + ], + [ + "/navigation-timing/supported_navigation_type.any.worker.html", + {} + ] + ], "navigation-timing/test_document_open.html": [ [ "/navigation-timing/test_document_open.html", @@ -393176,6 +393291,16 @@ {} ] ], + "paint-timing/supported-paint-type.any.js": [ + [ + "/paint-timing/supported-paint-type.any.html", + {} + ], + [ + "/paint-timing/supported-paint-type.any.worker.html", + {} + ] + ], "payment-handler/can-make-payment-event-constructor.https.html": [ [ "/payment-handler/can-make-payment-event-constructor.https.html", @@ -393668,6 +393793,16 @@ {} ] ], + "performance-timeline/supportedEntryTypes.any.js": [ + [ + "/performance-timeline/supportedEntryTypes.any.html", + {} + ], + [ + "/performance-timeline/supportedEntryTypes.any.worker.html", + {} + ] + ], "performance-timeline/webtiming-resolution.any.js": [ [ "/performance-timeline/webtiming-resolution.any.html", @@ -404740,6 +404875,16 @@ } ] ], + "resource-timing/supported_resource_type.any.js": [ + [ + "/resource-timing/supported_resource_type.any.html", + {} + ], + [ + "/resource-timing/supported_resource_type.any.worker.html", + {} + ] + ], "resource-timing/test_resource_timing.html": [ [ "/resource-timing/test_resource_timing.html", @@ -410568,6 +410713,16 @@ {} ] ], + "user-timing/supported-usertiming-types.any.js": [ + [ + "/user-timing/supported-usertiming-types.any.html", + {} + ], + [ + "/user-timing/supported-usertiming-types.any.worker.html", + {} + ] + ], "user-timing/user-timing-tojson.html": [ [ "/user-timing/user-timing-tojson.html", @@ -414642,6 +414797,12 @@ {} ] ], + "webrtc/RTCRtpSender-transport.https.html": [ + [ + "/webrtc/RTCRtpSender-transport.https.html", + {} + ] + ], "webrtc/RTCRtpTransceiver-direction.html": [ [ "/webrtc/RTCRtpTransceiver-direction.html", @@ -442350,7 +442511,7 @@ }, "paths": { ".azure-pipelines.yml": [ - "bf4d16d1f263ea645f34f5b2e1f037fb5af540c4", + "cea8efe2719e82fc24c015ba46f86c183999cb21", "support" ], ".codecov.yml": [ @@ -453530,19 +453691,19 @@ "testharness" ], "clipboard-apis/async-write-dttext-read-dttext-manual.https.html": [ - "1fe946ae70a792cda6fd69efd330355b1f25804d", + "75cf3a3140c8f17d5419167c48ad04ca4e4013ab", "manual" ], "clipboard-apis/async-write-dttext-read-text-manual.https.html": [ - "b341d923395677d4c17f8addea7b14e16117bdcf", + "3e68f9a5c6672343b3bdb0e82f43663f1fe36536", "manual" ], "clipboard-apis/async-write-text-read-dttext-manual.https.html": [ - "ab11ab9dfb4374c3481c76e8f4841351bbf91b37", + "232e144b7e0328b39fa93910c3e9ea4573a12c57", "manual" ], "clipboard-apis/async-write-text-read-text-manual.https.html": [ - "a5572164f23e36125f4f4ec6a7afec12f4fe446a", + "783683eb04832d777b84605f0ad0fbbc3c179c2d", "manual" ], "clipboard-apis/clipboard-events-synthetic.html": [ @@ -541910,7 +542071,7 @@ "support" ], "css/css-conditional/test_group_insertRule.html": [ - "f34245ec472aa11a4ce35b4d6551e43f8d588260", + "5326501913db15e90a80e5ffc4eb93d62dc2e732", "testharness" ], "css/css-contain/META.yml": [ @@ -566118,7 +566279,7 @@ "testharness" ], "css/css-shadow-parts/invalidation-change-part-name-idl-setter.html": [ - "52af22af7695157709836e0174655d04dcfccf94", + "0ed46f53bc75916b7ee9b83c4d1c84f9451e76f5", "testharness" ], "css/css-shadow-parts/invalidation-change-part-name.html": [ @@ -578986,7 +579147,7 @@ "testharness" ], "css/css-transitions/currentcolor-animation-001.html": [ - "4fd982a8cc77aa999c947d5c47e0aec8df8b9a92", + "1ffa1a358cade02d20006bd30bcab9110580ee21", "testharness" ], "css/css-transitions/detached-container-001.html": [ @@ -591806,7 +591967,7 @@ "support" ], "css/cssom/stylesheet-same-origin.sub.html": [ - "ccfbf7cec2c26c9eb2da26604ddb0763b70f6d8d", + "ef714670f5488f76d987a464a2732d60410f22ab", "testharness" ], "css/cssom/stylesheet-title.html": [ @@ -591885,6 +592046,10 @@ "9945ef47114c2841a746c99a2fb1e93e050aac8b", "support" ], + "css/cssom/support/malformed-http-response.asis": [ + "bc3c68d46d530f318e5d6e9140a24519724cf233", + "support" + ], "css/cssom/support/pattern-grg-rgr-grg.png": [ "9b88fbd81149891234185f54f8b4a0431759f181", "support" @@ -593238,7 +593403,7 @@ "reftest" ], "css/selectors/attribute-selectors/attribute-case/cssom.html": [ - "5c01e3cc78e55736a27c06098d9a4d200e229316", + "d03d820a3e6ed93b217558de2c3b91c040b22dd7", "testharness" ], "css/selectors/attribute-selectors/attribute-case/resources/semantics-quirks.html": [ @@ -593250,19 +593415,19 @@ "support" ], "css/selectors/attribute-selectors/attribute-case/resources/syntax-quirks.html": [ - "4606419b31c47f3b052ca2ef6930e8bf64d07a5b", + "a7ec7e2e04f206ef68edc4f22d7403926d6c836e", "support" ], "css/selectors/attribute-selectors/attribute-case/resources/syntax-xml.xhtml": [ - "19491c94c46a4b537673e402f5e310c4f4f210d3", + "b90c2777464d8859f07842e723649ffa4030659f", "support" ], "css/selectors/attribute-selectors/attribute-case/semantics.html": [ - "6b04fb517accfa8feca1b910c0fb5077702828a2", + "51e5c5162841a582d3a7a17b776517c5b0731e41", "testharness" ], "css/selectors/attribute-selectors/attribute-case/syntax.html": [ - "be00f624e399dc5ce3cff144bfb1f251abe1023f", + "e5acde100b06a6cf9c5eafe1e202298e87103929", "testharness" ], "css/selectors/child-indexed-pseudo-class.html": [ @@ -608473,6 +608638,10 @@ "70d8fb73eadb81bdade8e4bdcefe46491cd05b96", "testharness" ], + "encoding/sniffing.html": [ + "480be55515e8c7aeacff11ab8423348bdbf65bad", + "testharness" + ], "encoding/streams/backpressure.any.js": [ "f17e149ed9e5b949d8b3d6a54b48093232e7da52", "testharness" @@ -609414,11 +609583,11 @@ "support" ], "event-timing/event-timing-bufferbeforeonload.html": [ - "22fc4d547b90da989a292a44535c73d761f61293", + "e021e22d8d5bfed5a137d029e4d1b4fcd4f298cd", "testharness" ], "event-timing/event-timing-crossiframe.html": [ - "0e77b3822f5c6290b0bb185d30abb6815fbe0af9", + "b5d14a4c7aec2396662e85911276c716f3812352", "testharness" ], "event-timing/event-timing-observer-manual.html": [ @@ -609426,31 +609595,31 @@ "manual" ], "event-timing/event-timing-observethenonload.html": [ - "3d72e6aa8f612768dbcb8f8689873f80a55c5e76", + "3e2801f5496a75a025927ba8c4d6016658ae37c5", "testharness" ], "event-timing/event-timing-onloadthenobserve-firstInput.html": [ - "22ac4cb45e947ca3555fe57fbde03746397bfcb2", + "6d188b6964852eaaf6d6f38baf518e192d829a98", "testharness" ], "event-timing/event-timing-onloadthenobserve.html": [ - "07cc236cb47258bce490d2b18a29863922617ba1", + "1c25a33d9794333722127e3287c862b90bebdcc1", "testharness" ], "event-timing/event-timing-only-observe-firstInput.html": [ - "2f24d519c892175a65f431394400ece359e916e7", + "2ab4894d6177f0e2edc74af3cf52ef117bc281e3", "testharness" ], "event-timing/event-timing-retrievability.html": [ - "f38761b469da693f2c14a62c96a4671098cbd4e5", + "abc962d8fd80f157021c3aa709841188baa63181", "testharness" ], "event-timing/event-timing-retrieve-firstInput.html": [ - "ded00e61c75dfb29a200082b0f9d477c09297fd4", + "b1b020ea6992bc3dd1da6b83238b124ab3126a99", "testharness" ], "event-timing/event-timing-timingconditions.html": [ - "1e5dd2fd65cde654f9223ee3a9180a5adfeb4a57", + "03994c44e8004edf0b6232d784dc0d981a78711e", "testharness" ], "event-timing/idlharness.any.js": [ @@ -609458,7 +609627,7 @@ "testharness" ], "event-timing/resources/event-timing-crossiframe-childframe.html": [ - "7491fd88cb3c8cbfa849620e3690e4a42e454b9e", + "b0fbdeb459c277506be8dd74d2de4ebdb3687dbb", "support" ], "event-timing/resources/event-timing-observer-manual-childframe.html": [ @@ -609466,7 +609635,7 @@ "support" ], "event-timing/resources/event-timing-support.js": [ - "a2a583c8989cddf93ebceaf3d1fe5ca65bf1fc87", + "1f3d9f7d4e132a1792d7e46f876fa01ee64fc6e3", "support" ], "event-timing/resources/slow-image.py": [ @@ -626346,7 +626515,7 @@ "testharness" ], "html/semantics/forms/the-button-element/button-events.html": [ - "4d924e4aa39e217ae227cc38a2fea1daaece8811", + "be7806e1ee55297a8b8841e745966413d0e20168", "testharness" ], "html/semantics/forms/the-button-element/button-labels.html": [ @@ -626677,6 +626846,14 @@ "3277dfc07fdc4f77b84bb9262910d90e836b8ca1", "testharness" ], + "html/semantics/forms/the-input-element/range-intrinsic-size-ref.html": [ + "0f8ee37b06b32a1a31f38fff935f9df2fffbf9ab", + "support" + ], + "html/semantics/forms/the-input-element/range-intrinsic-size.html": [ + "c45a180063f963e2c738a81148e67b69dfb68ad8", + "reftest" + ], "html/semantics/forms/the-input-element/range.html": [ "209ce25306e02986238ae26fb6fdf38b0a26a500", "testharness" @@ -629042,7 +629219,7 @@ "support" ], "html/semantics/scripting-1/the-script-element/muted-errors.sub.html": [ - "1b255faf7e1286f9379e825403de2b069c452747", + "61643c5f08c09efcc2ffb6ef5106809bb01658d6", "testharness" ], "html/semantics/scripting-1/the-script-element/nomodule-reflect.html": [ @@ -629109,6 +629286,14 @@ "a6095097dd7e17b1e5370b739b31d361f8fdaf7b", "support" ], + "html/semantics/scripting-1/the-script-element/resources/syntax-error.js": [ + "40dc81dcfacd8f484e0b476cdc6be8d15a551570", + "support" + ], + "html/semantics/scripting-1/the-script-element/resources/throw.js": [ + "be53dd1ef3fb31ab71cd42b5b3d7416b35961c87", + "support" + ], "html/semantics/scripting-1/the-script-element/script-charset-01.html": [ "c5ac0d0a62a048a55d091935cb6ea733e52a5b82", "testharness" @@ -630809,12 +630994,12 @@ "e87e9cc825dc46b3c07fa57044320508be5040d0", "testharness" ], - "html/webappapis/dynamic-markup-insertion/document-write/047.html": [ - "51faf6c85f18e37422b22ec8babd491f9da523c2", - "testharness" + "html/webappapis/dynamic-markup-insertion/document-write/047-1.html": [ + "6a43faec51071fec146390475adcd12bad3d23a6", + "support" ], - "html/webappapis/dynamic-markup-insertion/document-write/048.html": [ - "51faf6c85f18e37422b22ec8babd491f9da523c2", + "html/webappapis/dynamic-markup-insertion/document-write/047.html": [ + "677d3e17869f5c8fc744464c6e2c7e7bf51ebab6", "testharness" ], "html/webappapis/dynamic-markup-insertion/document-write/049.html": [ @@ -631322,11 +631507,11 @@ "testharness" ], "html/webappapis/scripting/events/event-handler-attributes-body-window.html": [ - "4a6bee61bef240cd0947d796f7b3c2c4166b2670", + "e8055d99f357da2baf1f9034d121055338e238e8", "testharness" ], - "html/webappapis/scripting/events/event-handler-attributes-window-body.html": [ - "1ceed5278de7d17c4ef655a2a79e3ecc97339dbf", + "html/webappapis/scripting/events/event-handler-attributes-frameset-window.html": [ + "ecfe90e88ea404604dfaeb649b8067c15fc03d5a", "testharness" ], "html/webappapis/scripting/events/event-handler-attributes-windowless-body.html": [ @@ -631450,7 +631635,7 @@ "support" ], "html/webappapis/scripting/events/resources/event-handler-body.js": [ - "656903cf99e6e36b491bec30d902466a83b9504f", + "0a9f36a732d901d76f21d32a4b3dfdda66bb88bd", "support" ], "html/webappapis/scripting/events/resources/open-window.html": [ @@ -631742,7 +631927,7 @@ "testharness" ], "html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html": [ - "d090aad609dcaaf93d7479134f3eda15c82d2653", + "006827f186eb4e47d387a3b0c9fae404e41e1d37", "testharness" ], "html/webappapis/the-windoworworkerglobalscope-mixin/Worker_Self_Origin.html": [ @@ -632206,15 +632391,15 @@ "support" ], "infrastructure/metadata/infrastructure/testdriver/actions/elementPosition.html.ini": [ - "750dd055dbd80030672572bc51f6dce2f5757698", + "9ae71a6e73e22a855c69d3269936d71c17d6e9e5", "support" ], "infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini": [ - "7a6cf82bbd3aad03ac3367e8a9b5e20e5aab1c25", + "a06134a6ea427d40aa7b664bde5d4b3d6df24b96", "support" ], "infrastructure/metadata/infrastructure/testdriver/actions/eventOrder.html.ini": [ - "64f3f2f8c48a778782ba114ab7b42b43d55b1d29", + "00916c7af3f1ec97692afb727b02dc4f29327a99", "support" ], "infrastructure/metadata/infrastructure/testdriver/actions/multiDevice.html.ini": [ @@ -632222,7 +632407,7 @@ "support" ], "infrastructure/metadata/infrastructure/testdriver/actions/pause.html.ini": [ - "3b0d6fa50def6ad5a79d08da6920761ebc360175", + "7ceec9f531bfe3ede763a41726590f3effdbac29", "support" ], "infrastructure/reftest-wait-ref.html": [ @@ -633421,6 +633606,10 @@ "9d0273e19263f026ff588ac59c12c765a341df8b", "support" ], + "longtask-timing/supported-longtask-types.any.js": [ + "0179fc5e60ceeb3312e060a4fc5f0927b1a1bc29", + "testharness" + ], "magnetometer/META.yml": [ "88b900c569340a167ac2a8aa967099bfdfff388b", "support" @@ -634146,7 +634335,7 @@ "testharness" ], "media-source/mediasource-errors.html": [ - "3df1dedcc2ba0826eff0b2266a90aed1ac8794d8", + "b2224aa5f6f7433a1e6a908fc8d2eeab2a6364f9", "testharness" ], "media-source/mediasource-getvideoplaybackquality.html": [ @@ -637737,6 +637926,10 @@ "3efb52783f1e5dcb0d42aad11aec2a9e47257d33", "support" ], + "navigation-timing/supported_navigation_type.any.js": [ + "5e9151cea72434b61fc317cc512ed9e61643fdb2", + "testharness" + ], "navigation-timing/test_document_open.html": [ "1986b3fb9862106cde84fde7b87238c4b20e997c", "testharness" @@ -644773,6 +644966,10 @@ "d4197e8a35c444401b0a7dc84f0fc5a279193ca0", "testharness" ], + "paint-timing/supported-paint-type.any.js": [ + "623c880c5735214866352a39bd2d214acaf30753", + "testharness" + ], "payment-handler/META.yml": [ "eff7624d054f6fbc6feac2aa106d166587f0b3eb", "support" @@ -645277,6 +645474,10 @@ "a72fe81c47feace765613a0962f2a7e63f71fa25", "support" ], + "performance-timeline/supportedEntryTypes.any.js": [ + "a0225ad2f76fdcfebb0a7c9aff9bd0030ecf86aa", + "testharness" + ], "performance-timeline/webtiming-resolution.any.js": [ "46e0489352f09767dc847615bd64464946f9088e", "testharness" @@ -645322,7 +645523,7 @@ "testharness" ], "picture-in-picture/mediastream.html": [ - "e187de3d4b6c7d5d30ae1cec690b08dbf3f3b673", + "116a0f7dd4fc1dc43f7e5e0aedba4bb20d6e041c", "testharness" ], "picture-in-picture/picture-in-picture-element.html": [ @@ -656057,6 +656258,10 @@ "39d7d5b256616d6b1d8a93c2c188412746791355", "testharness" ], + "resource-timing/supported_resource_type.any.js": [ + "6096ad714904fdd5c0085b33b4240301cdb952fb", + "testharness" + ], "resource-timing/test_resource_timing.html": [ "f4e851abb203aca49194aef51646be673507078f", "testharness" @@ -661650,7 +661855,7 @@ "support" ], "signed-exchange/resources/generate-test-certs.sh": [ - "e1d2ea9e3cb5f5ecb63e50747d53212276c1c4f2", + "01330e46d8f6aad6baab7b1bdb7c228a627eac21", "support" ], "signed-exchange/resources/generate-test-sxgs.sh": [ @@ -662485,6 +662690,18 @@ "aad0e4e2937064224de6a2313379fb43ffdf8322", "testharness" ], + "svg/geometry/reftests/percentage-attribute.svg": [ + "44c386d517179621fbf763d0c82c6750ca8d0f63", + "reftest" + ], + "svg/geometry/reftests/percentage-ref.svg": [ + "09fd10f287ba2f0b51f91048ff416d8e03ead34d", + "support" + ], + "svg/geometry/reftests/percentage.svg": [ + "c2ca49341c5ec5d4d96d1541999893053146eecd", + "reftest" + ], "svg/historical.html": [ "1b73ca8d2236c7afdb9b331c532c84b6083f2968", "testharness" @@ -665213,6 +665430,18 @@ "c8d60bd5bf68d0dc5f56fb360acdd2bac5aa1aa2", "reftest" ], + "svg/painting/reftests/percentage-attribute.svg": [ + "d245999db08ec13ea34c6c832483d3c1135ceec0", + "reftest" + ], + "svg/painting/reftests/percentage-ref.svg": [ + "610a3ddb2d21da119fb4a53f5f351dff0190880c", + "support" + ], + "svg/painting/reftests/percentage.svg": [ + "640c1eb450d783b446dc74ea4b84e1343161f0e8", + "reftest" + ], "svg/painting/scripted/paint-order-computed-value-01.svg": [ "7ea669f1508283f498e9b38030022deac3b091a0", "testharness" @@ -666117,6 +666346,10 @@ "afe5021efcad78a13d1767fb423d846557b92ee0", "support" ], + "tools/ci/azure/affected_tests.yml": [ + "17fca51d50cbd4f1986c63f3383b18dbdbe9c6fe", + "support" + ], "tools/ci/azure/checkout.yml": [ "618c571465963a478a308899328d5fa5851d491e", "support" @@ -670926,7 +671159,7 @@ "support" ], "tools/webdriver/webdriver/transport.py": [ - "619b3faee544646c2ed97dde0815cb585ab4ac28", + "881002ad117c8a73b419f14f9c9e8f678742845f", "support" ], "tools/wpt/__init__.py": [ @@ -671226,19 +671459,19 @@ "support" ], "tools/wptrunner/wptrunner/browsers/base.py": [ - "70324bec31f23da78b1c5d04168d29778e0bf5bc", + "712ff3fbc9b30dfcd4b0719391bc80ee5eb22340", "support" ], "tools/wptrunner/wptrunner/browsers/chrome.py": [ - "c46f33c116941ec01fe9f1c16902078dbe1e8711", + "aa44817276f9cd2a098a04adfc79bf4891c5cb4c", "support" ], "tools/wptrunner/wptrunner/browsers/chrome_android.py": [ - "c96cf5634f3d76a79b4cfd20429f6622e496d6a0", + "3c277a567d7f06f39dfc02cb18d5229c7570a131", "support" ], "tools/wptrunner/wptrunner/browsers/edge.py": [ - "ad2bb513a6a801b29a791a6d65b7b730b86e9a64", + "9a746819021c14807dcb3549893bcd7105a5a4cc", "support" ], "tools/wptrunner/wptrunner/browsers/edge_webdriver.py": [ @@ -671246,27 +671479,27 @@ "support" ], "tools/wptrunner/wptrunner/browsers/fennec.py": [ - "a7009dd26b302564def593fb02a2ce1a2776a240", + "771396d06b5e9a12029abf0e9f1e263e4c0dbeb7", "support" ], "tools/wptrunner/wptrunner/browsers/firefox.py": [ - "26d744749e534e79c02569ebc235b35c4baccbd6", + "618f011abaf40a9d7fe42b34106e44326388076b", "support" ], "tools/wptrunner/wptrunner/browsers/ie.py": [ - "a0730f8ba29ea8b65b56709a4f96ac5894078d94", + "0eca40925c205848d967f5771858e9cc0b271e38", "support" ], "tools/wptrunner/wptrunner/browsers/opera.py": [ - "c5aeaaaf967efdbb3e7897f7184d7430fe01fe0c", + "805fedee636cd22155ed143cf1148f3c2f5d98e7", "support" ], "tools/wptrunner/wptrunner/browsers/safari.py": [ - "1e18f95af704aa5e966702539d115f4b199e68db", + "dba8432b5a75faf402cf74042b7a59c4b66f814a", "support" ], "tools/wptrunner/wptrunner/browsers/sauce.py": [ - "c6863005a0fc7b48d415daaedae63e759f9b2f27", + "3301c75b21004a554f91d4767b8560fc40214412", "support" ], "tools/wptrunner/wptrunner/browsers/sauce_setup/edge-prerun.bat": [ @@ -671278,15 +671511,15 @@ "support" ], "tools/wptrunner/wptrunner/browsers/servo.py": [ - "1a357a3ced93edf8f65b21dde8f04b08849a4669", + "2e0b0a25c142b5f5b1f9e75949761d3d1276d7d9", "support" ], "tools/wptrunner/wptrunner/browsers/servodriver.py": [ - "44efb8950b68a593417e49be668148b5daa452f6", + "0a63a32c96699a441ce696bae6b8d32f4d69bc3d", "support" ], "tools/wptrunner/wptrunner/browsers/webkit.py": [ - "19527a132c7d8c8c158f8b960560b3f1966b59d3", + "bd444eef1dfcf61247c3322e79cc0b085ac67750", "support" ], "tools/wptrunner/wptrunner/config.py": [ @@ -671294,7 +671527,7 @@ "support" ], "tools/wptrunner/wptrunner/environment.py": [ - "ba89fb9fe763a752083f1b3eb66a81a68373b6a4", + "493d3c43fc06ff1e0bc2105a2c86fb851b3f4de9", "support" ], "tools/wptrunner/wptrunner/executors/__init__.py": [ @@ -671302,7 +671535,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/base.py": [ - "e71ce4c04d7004e3d28a9fd7c3848f7dd249fa82", + "0e54eca778b3d6df8ae41da00f6acce129be82c1", "support" ], "tools/wptrunner/wptrunner/executors/executorchrome.py": [ @@ -671318,7 +671551,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executormarionette.py": [ - "84bde160890a9c228511444f7d0f6d20b4347029", + "d471b4ed6603075d0764aece41a5a5bbf40405f1", "support" ], "tools/wptrunner/wptrunner/executors/executoropera.py": [ @@ -671330,11 +671563,11 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorselenium.py": [ - "0e788c5b28770e18ad94b84015935e6ae47578bb", + "75e7b2cc4ae939e0576bd8f68fc2e4b5e0a04b21", "support" ], "tools/wptrunner/wptrunner/executors/executorservo.py": [ - "784356bb8b0c2b4e12cf53bb0ba90a9a3ffe39c2", + "485cdc5c98d561b27a676d909c4344e8f6e0f089", "support" ], "tools/wptrunner/wptrunner/executors/executorservodriver.py": [ @@ -671342,7 +671575,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorwebdriver.py": [ - "ce103a73bea9167dcb7448101951cf894207671a", + "0e83118d9ac4e8c7df77d49533348fc7b39ed9b1", "support" ], "tools/wptrunner/wptrunner/executors/executorwebkit.py": [ @@ -671378,19 +671611,15 @@ "support" ], "tools/wptrunner/wptrunner/executors/runner.js": [ - "8b800036756d016d8c020d53e02c5709fb03043f", + "171e6febd9fa634805f31ca9d2b9e7413e6d274c", "support" ], "tools/wptrunner/wptrunner/executors/testharness_servodriver.js": [ "d731cc04d7011759ce63079fbd1242fd6426603b", "support" ], - "tools/wptrunner/wptrunner/executors/testharness_webdriver.js": [ - "37023d81408d328dbca5a3b73d53bd9ab753ec26", - "support" - ], "tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js": [ - "e78951a260473186c3ea55cc31a91dece7da3c2a", + "36d086c9747a56ca7122c899cfcb46d00dd60b15", "support" ], "tools/wptrunner/wptrunner/expected.py": [ @@ -671422,7 +671651,7 @@ "support" ], "tools/wptrunner/wptrunner/products.py": [ - "0c1f86ff06aee739ab2f6ca3f1a3d2d0868e9672", + "4575dfb5e95c016168f68dd4377b4345cac75f16", "support" ], "tools/wptrunner/wptrunner/stability.py": [ @@ -671430,7 +671659,7 @@ "support" ], "tools/wptrunner/wptrunner/testdriver-extra.js": [ - "d77731a158e7e6069b04be1d9cad690c5e822d2b", + "ca61caf51e8eaf4f378da3165ed5c50bc0e3593a", "support" ], "tools/wptrunner/wptrunner/testdriver-vendor.js": [ @@ -671450,7 +671679,7 @@ "support" ], "tools/wptrunner/wptrunner/testharnessreport.js": [ - "62ddaffb443c94505383083923dc13fcb1cf5660", + "281f97ddaa6673333056e35c3e2f3adb804e100c", "support" ], "tools/wptrunner/wptrunner/testloader.py": [ @@ -671486,7 +671715,7 @@ "support" ], "tools/wptrunner/wptrunner/tests/test_products.py": [ - "441c83f735edca6adac02aa254be6e4830c0ae7e", + "c3454a0dd8f5590c96d1be450a94fd3452ac8f4c", "support" ], "tools/wptrunner/wptrunner/tests/test_stability.py": [ @@ -671602,7 +671831,7 @@ "support" ], "tools/wptrunner/wptrunner/wptrunner.py": [ - "7d35c51d90987672e34b8337d381ae7949845c33", + "8b98b2955f5525a938483c9b4abc598ff33ea9f7", "support" ], "tools/wptrunner/wptrunner/wpttest.py": [ @@ -671938,7 +672167,7 @@ "support" ], "tools/wptserve/wptserve/stash.py": [ - "d13703c16ebb2a6d7b497733dad1776760be00e0", + "8b6fd34f02c0e9b7073d0c94011707eaa4e5a1f1", "support" ], "tools/wptserve/wptserve/utils.py": [ @@ -672969,6 +673198,10 @@ "822376be24c2fc7e45441e47a1a3f09d341e7bac", "support" ], + "user-timing/supported-usertiming-types.any.js": [ + "a373c562f94d88460f5b19ff9f00ec503f1c1152", + "testharness" + ], "user-timing/user-timing-tojson.html": [ "6aef7fa904ab958a4c3f8600ea592fac418d0522", "testharness" @@ -674142,7 +674375,7 @@ "support" ], "wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html": [ - "dbd8ec99f81e7d2530f5cdaadcffc1248e3f5c40", + "a0c25525e6b61086e81f00a5d7a4226e43637942", "testharness" ], "wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html.headers": [ @@ -677910,7 +678143,7 @@ "testharness" ], "webrtc/RTCRtpParameters-helper.js": [ - "8f7c85df475f5a5c6cf09cfa08d0b9c45c1e7546", + "d70694930086590ab3616c1cde0fec419c1b63da", "support" ], "webrtc/RTCRtpParameters-rtcp.html": [ @@ -677930,7 +678163,7 @@ "testharness" ], "webrtc/RTCRtpReceiver-getParameters.html": [ - "453844d5f0e63cf6690ca8eb5fe3335073d34921", + "7f8ac673a60c73681122df5243f6054b82f31fff", "testharness" ], "webrtc/RTCRtpReceiver-getStats.https.html": [ @@ -677957,6 +678190,10 @@ "1278737414c418a2b1604eae32590c0999e0d645", "testharness" ], + "webrtc/RTCRtpSender-transport.https.html": [ + "c687911d09d2184f49b4dabded7c95e6cb9d310a", + "testharness" + ], "webrtc/RTCRtpTransceiver-direction.html": [ "e76bc1fbb7740f7a575f0acba397284aa5d5db94", "testharness" diff --git a/tests/wpt/metadata/css/cssom/stylesheet-same-origin.sub.html.ini b/tests/wpt/metadata/css/cssom/stylesheet-same-origin.sub.html.ini new file mode 100644 index 00000000000..e4e933e9fbf --- /dev/null +++ b/tests/wpt/metadata/css/cssom/stylesheet-same-origin.sub.html.ini @@ -0,0 +1,7 @@ +[stylesheet-same-origin.sub.html] + [Origin-clean check in cross-origin CSSOM Stylesheets (redirect from cross-origin to same-origin)] + expected: FAIL + + [Origin-clean check in loading error CSSOM Stylesheets] + expected: FAIL + diff --git a/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/cssom.html.ini b/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/cssom.html.ini new file mode 100644 index 00000000000..c1bf5fa223a --- /dev/null +++ b/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/cssom.html.ini @@ -0,0 +1,73 @@ +[cssom.html] + [[foo="bar" s\] getting CSSStyleRule#selectorText] + expected: FAIL + + [[foo="bar" /**/ s\] setting CSSStyleRule#selectorText] + expected: FAIL + + [[foo="bar" s\] getting CSSStyleRule#selectorText in @media] + expected: FAIL + + [[foo="bar" s\] getting CSSRule#cssText] + expected: FAIL + + [[foo="bar" /**/ s\] getting CSSStyleRule#selectorText in @media] + expected: FAIL + + [[foo="bar" s\] insertRule in @media] + expected: FAIL + + [[foo="bar"/**/s\] insertRule in @media] + expected: FAIL + + [[foo="bar"/**/s\] getting CSSStyleRule#selectorText] + expected: FAIL + + [[foo="bar"/**/s\] getting CSSRule#cssText] + expected: FAIL + + [[foo="bar" /**/ s\] setting CSSStyleRule#selectorText in @media] + expected: FAIL + + [[foo="bar"/**/s\] setting CSSStyleRule#selectorText] + expected: FAIL + + [[foo="bar" /**/ s\] getting CSSStyleRule#selectorText] + expected: FAIL + + [[foo="bar" /**/ s\] getting CSSRule#cssText] + expected: FAIL + + [[foo="bar" s\] setting CSSStyleRule#selectorText in @media] + expected: FAIL + + [[foo="bar" s\] setting CSSStyleRule#selectorText] + expected: FAIL + + [[foo="bar" s\] insertRule] + expected: FAIL + + [[foo="bar" /**/ s\] getting CSSRule#cssText in @media] + expected: FAIL + + [[foo="bar" /**/ s\] insertRule] + expected: FAIL + + [[foo="bar"/**/s\] getting CSSRule#cssText in @media] + expected: FAIL + + [[foo="bar" s\] getting CSSRule#cssText in @media] + expected: FAIL + + [[foo="bar"/**/s\] insertRule] + expected: FAIL + + [[foo="bar" /**/ s\] insertRule in @media] + expected: FAIL + + [[foo="bar"/**/s\] getting CSSStyleRule#selectorText in @media] + expected: FAIL + + [[foo="bar"/**/s\] setting CSSStyleRule#selectorText in @media] + expected: FAIL + diff --git a/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/semantics.html.ini b/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/semantics.html.ini new file mode 100644 index 00000000000..b46375f354a --- /dev/null +++ b/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/semantics.html.ini @@ -0,0 +1,1333 @@ +[semantics.html] + [[foo|='ä' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[lang*='A' s\] <div lang="xab"> in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="Ä"> in quirks mode] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="Ä"> in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="bar" {c}foo="x"> in XML] + expected: FAIL + + [[foo=' ' s\] /* tab in attribute */ <div foo="\t"> in standards mode] + expected: FAIL + + [[foo^='Ä' s\] /* COMBINING in selector */ <div foo="Ä"> in standards mode] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="Ä"> in standards mode] + expected: FAIL + + [[class~='a' s\] <div class="X A B"> with querySelector in quirks mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in standards mode] + expected: FAIL + + [[lang|='a' s\] <div lang="a-b"> in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="a"> with querySelector in standards mode] + expected: FAIL + + [[foo='Ä' s\] <div foo="ä"> in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="ä"> in standards mode] + expected: FAIL + + [[foo='I' s\] <div foo="İ"> with querySelector in standards mode] + expected: FAIL + + [[class~='a' s\] <div class="X A B"> with querySelector in standards mode] + expected: FAIL + + [[foo^='Ä' s\] /* COMBINING in selector */ <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in standards mode] + expected: FAIL + + [[lang|='a' s\] <div lang="A-B"> in standards mode] + expected: FAIL + + [[foo='i' s\] <div foo="İ"> with querySelector in standards mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="bar" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in XML] + expected: FAIL + + [[foo='ı' s\] <div foo="I"> in quirks mode] + expected: FAIL + + [[foo='i' s\] <div foo="ı"> in standards mode] + expected: FAIL + + [@namespace x 'A'; [x|foo='' s\] <div {a}foo=""> in XML] + expected: FAIL + + [[foo='I' s\] <div foo="ı"> in quirks mode] + expected: FAIL + + [[foo='i' s\] <div foo="ı"> with querySelector in quirks mode] + expected: FAIL + + [[foo='ı' s\] <div foo="i"> in standards mode] + expected: FAIL + + [[class~='A' s\] <div class="X A B"> in standards mode] + expected: FAIL + + [[foo='bar' s\] <div FOO="bar"> in standards mode] + expected: FAIL + + [[foo*='ä' s\] /* COMBINING in attribute */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[foo^='Ä' s\] /* COMBINING in selector */ <div foo="Ä"> in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="A"> in XML] + expected: FAIL + + [[foo='bar' s\][foo='bar'\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\] <div foo="BAR"> in XML] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[foo|='ä' s\] /* COMBINING in attribute */ <div foo="Ä"> in XML] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\][foo='bar' s\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[class~='A' s\] <div class="X A B"> with querySelector in quirks mode] + expected: FAIL + + [[foo*='ä' s\] /* COMBINING in attribute */ <div foo="ä"> in XML] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[lang|='a' s\] <div lang="a-b"> with querySelector in XML] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='İ' s\] <div foo="I"> with querySelector in quirks mode] + expected: FAIL + + [[foo='i' s\] <div foo="ı"> with querySelector in standards mode] + expected: FAIL + + [[id$='A' s\] <div id="xa"> with querySelector in standards mode] + expected: FAIL + + [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in standards mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="bar" {c}foo="x"> in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="a"> in XML] + expected: FAIL + + [[foo='BAR' s\][foo='BAR' s\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[align='LEFT' s\] <div align="LEFT"> in standards mode] + expected: FAIL + + [[foo=' ' s\] /* tab in attribute */ <div foo="\t"> with querySelector in XML] + expected: FAIL + + [[align='LEFT' s\] <div align="left"> with querySelector in standards mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in quirks mode] + expected: FAIL + + [[foo=' ' s\] /* tab in attribute */ <div foo="\t"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="Ä"> in standards mode] + expected: FAIL + + [[foo='İ' s\] <div foo="i"> with querySelector in quirks mode] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> in standards mode] + expected: FAIL + + [[class~='a' s\] <div class="X A B"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] <div foo="ä"> in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='BAR' s\][foo='bar'\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo|='ä' s\] /* COMBINING in attribute */ <div foo="Ä"> in standards mode] + expected: FAIL + + [[foo='ı' s\] <div foo="i"> in quirks mode] + expected: FAIL + + [[foo='' s\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\][foo='bar' s\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo$='Ä' s\] /* COMBINING in selector */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='ä' s\] <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo*='ä' s\] /* COMBINING in attribute */ <div foo="ä"> in standards mode] + expected: FAIL + + [[foo='İ' s\] <div foo="I"> with querySelector in standards mode] + expected: FAIL + + [[foo='i' s\] <div foo="İ"> in standards mode] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="Ä"> in quirks mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in XML] + expected: FAIL + + [[foo='bar' s\][foo='BAR'\] <div foo="bar"> in standards mode] + expected: FAIL + + [[foo='\x00' s\] /* \\0 in selector */ <div foo=""> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\][foo='BAR'\] <div foo="bar"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\][foo='bar'\] <div foo="BAR"> in XML] + expected: FAIL + + [[class~='a' s\] <div class="x a b"> with querySelector in XML] + expected: FAIL + + [[foo='bar' s\] <div foo="BAR"> in standards mode] + expected: FAIL + + [[foo='BAR'\][foo='bar' s\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[foo='bar' s\] <div baz="BAR"> in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="A"> in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="Ä"> in XML] + expected: FAIL + + [[class~='A' s\] <div class="x a b"> in XML] + expected: FAIL + + [[foo='Ä' s\] <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo='BAR' s\][foo='BAR' s\] <div foo="BAR"> in standards mode] + expected: FAIL + + [[foo='\t' s\] /* tab in selector */ <div foo=" "> with querySelector in quirks mode] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in XML] + expected: FAIL + + [[align='LEFT' s\] <div align="left"> with querySelector in XML] + expected: FAIL + + [[foo='' s\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[id$='A' s\] <div id="xa"> in XML] + expected: FAIL + + [[foo='bar' s\] <div baz="BAR"> in quirks mode] + expected: FAIL + + [[foo='BAR'\][foo='bar' s\] <div foo="BAR"> in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[align='left' s\] <div align="LEFT"> in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="A"> in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="ä"> in XML] + expected: FAIL + + [[class~='a' s\] <div class="x a b"> in quirks mode] + expected: FAIL + + [[align='LEFT' s\] <div align="left"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\][foo='bar' s\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in both */ <div foo="ä"> in XML] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in standards mode] + expected: FAIL + + [[foo='I' s\] <div foo="İ"> in XML] + expected: FAIL + + [[foo='İ' s\] <div foo="i"> in standards mode] + expected: FAIL + + [[lang|='a' s\] <div lang="A-B"> in quirks mode] + expected: FAIL + + [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in quirks mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="a"> with querySelector in XML] + expected: FAIL + + [[foo='ı' s\] <div foo="I"> with querySelector in XML] + expected: FAIL + + [[foo='bar' s\][foo='BAR'\] <div foo="bar"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="bar"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\][foo='bar' s\] <div foo="BAR"> in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in both */ <div foo="ä"> in standards mode] + expected: FAIL + + [[foo='bar' s\][foo='BAR'\] <div foo="bar"> in quirks mode] + expected: FAIL + + [[foo='bar'\][foo='BAR' s\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[foo='ı' s\] <div foo="I"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='ä' s\] <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[foo^='Ä' s\] /* COMBINING in selector */ <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="Ä"> in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="bar" {c}foo="x"> with querySelector in XML] + expected: FAIL + + [[align='left' s\] <div align="left"> in standards mode] + expected: FAIL + + [[foo='' s\] <div foo=""> in XML] + expected: FAIL + + [[foo='İ' s\] <div foo="I"> in XML] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in standards mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in standards mode] + expected: FAIL + + [[lang*='A' s\] <div lang="XAB"> in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> with querySelector in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[lang*='A' s\] <div lang="XAB"> with querySelector in quirks mode] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\] <div foo="x" {a}foo="BAR"> in standards mode] + expected: FAIL + + [[foo='ı' s\] <div foo="i"> with querySelector in standards mode] + expected: FAIL + + [[foo='I' s\] <div foo="İ"> with querySelector in quirks mode] + expected: FAIL + + [[foo='İ' s\] <div foo="I"> with querySelector in XML] + expected: FAIL + + [[foo='bar' s\][foo='BAR'\] <div foo="bar"> in XML] + expected: FAIL + + [[foo='' s\] <div foo="BAR"> in standards mode] + expected: FAIL + + [[foo='I' s\] <div foo="ı"> in standards mode] + expected: FAIL + + [[lang|='a' s\] <div lang="A-B"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\][foo='BAR'\] <div foo="bar"> with querySelector in XML] + expected: FAIL + + [[id^='a' s\] <div id="AB"> with querySelector in standards mode] + expected: FAIL + + [[id$='A' s\] <div id="xa"> with querySelector in quirks mode] + expected: FAIL + + [[id$='A' s\] <div id="XA"> with querySelector in standards mode] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[id^='a' s\] <div id="ab"> in XML] + expected: FAIL + + [[id^='a' s\] <div id="ab"> with querySelector in XML] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[foo='bar'\][foo='BAR' s\] <div foo="BAR"> in XML] + expected: FAIL + + [[lang*='A' s\] <div lang="xab"> with querySelector in quirks mode] + expected: FAIL + + [[lang*='A' s\] <div lang="xab"> in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> in XML] + expected: FAIL + + [[foo='ı' s\] <div foo="I"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\][foo='bar'\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[foo=' ' s\] /* tab in attribute */ <div foo="\t"> in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='\t' s\] /* tab in selector */ <div foo=" "> in quirks mode] + expected: FAIL + + [[lang|='a' s\] <div lang="A-B"> in XML] + expected: FAIL + + [[foo='bar' s\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[foo='bar' s\][foo='bar' s\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[foo='BAR'\][foo='bar' s\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='Ä' s\] <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[foo='Ä' s\] <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in XML] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in XML] + expected: FAIL + + [[foo*='ä' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="ä"> in XML] + expected: FAIL + + [[foo='bar' s\] <div foo="x" {a}foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="A"> in quirks mode] + expected: FAIL + + [[foo='ä' s\] <div foo="Ä"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in both */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[id$='A' s\] <div id="XA"> in quirks mode] + expected: FAIL + + [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in standards mode] + expected: FAIL + + [[class~='A' s\] <div class="X A B"> in XML] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[class~='A' s\] <div class="X A B"> with querySelector in standards mode] + expected: FAIL + + [[foo='İ' s\] <div foo="i"> in quirks mode] + expected: FAIL + + [[foo='\x00' s\] /* \\0 in selector */ <div foo=""> in XML] + expected: FAIL + + [[foo='I' s\] <div foo="ı"> with querySelector in XML] + expected: FAIL + + [[id$='A' s\] <div id="XA"> with querySelector in XML] + expected: FAIL + + [[foo='I' s\] <div foo="İ"> in standards mode] + expected: FAIL + + [[align='left' s\] <div align="left"> in XML] + expected: FAIL + + [[foo='' s\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[|foo='bar' s\] <div foo="x" {a}foo="BAR"> in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="bar" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in quirks mode] + expected: FAIL + + [[foo~='ä' s\] /* COMBINING in selector */ <div foo="ä"> in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="A"> with querySelector in quirks mode] + expected: FAIL + + [[foo='BAR' s\][foo='bar'\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[foo|='ä' s\] /* COMBINING in attribute */ <div foo="Ä"> in quirks mode] + expected: FAIL + + [[foo='BAR'\][foo='bar' s\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in both */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='\x00' s\] /* \\0 in selector */ <div foo=""> with querySelector in XML] + expected: FAIL + + [@namespace x 'A'; [x|foo='' s\] <div {a}foo=""> in quirks mode] + expected: FAIL + + [[foo='bar'\][foo='BAR' s\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[foo=' ' s\] /* tab in attribute */ <div foo="\t"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\] <div foo="x" {a}foo="BAR"> with querySelector in XML] + expected: FAIL + + [[foo='ı' s\] <div foo="I"> in XML] + expected: FAIL + + [[class~='a' s\] <div class="X A B"> in XML] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in XML] + expected: FAIL + + [[foo='İ' s\] <div foo="i"> with querySelector in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="a"> in quirks mode] + expected: FAIL + + [[foo|='ä' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[foo=' ' s\] /* tab in attribute */ <div foo="\t"> with querySelector in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> with querySelector in standards mode] + expected: FAIL + + [[foo='BAR'\][foo='bar' s\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[foo='\x00' s\] /* \\0 in selector */ <div foo=""> in quirks mode] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="Ä"> in standards mode] + expected: FAIL + + [@namespace x 'A'; [x|foo='' s\] <div {a}foo=""> in standards mode] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in XML] + expected: FAIL + + [[foo='' s\] <div foo=""> with querySelector in XML] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[foo|='ä' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\][foo='bar'\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[lang*='A' s\] <div lang="XAB"> with querySelector in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[id$='A' s\] <div id="xa"> with querySelector in XML] + expected: FAIL + + [[foo*='ä' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="ä"> in XML] + expected: FAIL + + [[id^='a' s\] <div id="ab"> in quirks mode] + expected: FAIL + + [@namespace x 'a'; [x|foo='' s\] <div {A}foo=""> in standards mode] + expected: FAIL + + [[foo='bar'\][foo='BAR' s\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="Ä"> in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="bar" {c}foo="x"> with querySelector in standards mode] + expected: FAIL + + [[foo='\t' s\] /* tab in selector */ <div foo=" "> in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[foo^='Ä' s\] /* COMBINING in selector */ <div foo="Ä"> in quirks mode] + expected: FAIL + + [[foo='' s\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[foo='i' s\] <div foo="İ"> with querySelector in XML] + expected: FAIL + + [[lang|='a' s\] <div lang="a-b"> with querySelector in quirks mode] + expected: FAIL + + [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in quirks mode] + expected: FAIL + + [[lang|='a' s\] <div lang="a-b"> in XML] + expected: FAIL + + [[lang*='A' s\] <div lang="xab"> with querySelector in XML] + expected: FAIL + + [[foo$='Ä' s\] /* COMBINING in selector */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='' s\] <div foo=""> in standards mode] + expected: FAIL + + [[align='left' s\] <div align="left"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="bar"> in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="A"> in quirks mode] + expected: FAIL + + [[lang*='A' s\] <div lang="XAB"> in standards mode] + expected: FAIL + + [[foo='BAR' s\][foo='bar'\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[foo$='Ä' s\] /* COMBINING in selector */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="bar"> in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="A"> with querySelector in quirks mode] + expected: FAIL + + [[class~='a' s\] <div class="X A B"> in standards mode] + expected: FAIL + + [[foo='i' s\] <div foo="İ"> in quirks mode] + expected: FAIL + + [[foo~='ä' s\] /* COMBINING in selector */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="Ä"> in quirks mode] + expected: FAIL + + [[foo='I' s\] <div foo="İ"> in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[align='LEFT' s\] <div align="left"> in XML] + expected: FAIL + + [[foo='' s\] <div foo=""> with querySelector in quirks mode] + expected: FAIL + + [[foo='ı' s\] <div foo="i"> with querySelector in XML] + expected: FAIL + + [[id^='a' s\] <div id="AB"> in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="a"> with querySelector in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="bar" {a}foo="x" {b}foo="x" {c}foo="x"> in standards mode] + expected: FAIL + + [[|foo='bar' s\] <div foo="x" {a}foo="BAR"> in quirks mode] + expected: FAIL + + [[foo='i' s\] <div foo="ı"> in XML] + expected: FAIL + + [[|foo='bar' s\] <div foo="x" {a}foo="BAR"> in standards mode] + expected: FAIL + + [[align='left' s\] <div align="LEFT"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="bar"> with querySelector in quirks mode] + expected: FAIL + + [[class~='A' s\] <div class="x a b"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar'\][foo='BAR' s\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[align='LEFT' s\] <div align="left"> in quirks mode] + expected: FAIL + + [[foo='' s\] /* \\0 in attribute */ <div foo="\x00"> with querySelector in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="a"> with querySelector in quirks mode] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="ä"> in standards mode] + expected: FAIL + + [[id$='A' s\] <div id="xa"> in quirks mode] + expected: FAIL + + [[align='left' s\] <div align="left"> in quirks mode] + expected: FAIL + + [[foo='I' s\] <div foo="İ"> with querySelector in XML] + expected: FAIL + + [[foo='bar'\][foo='BAR' s\] <div foo="BAR"> in standards mode] + expected: FAIL + + [[foo='İ' s\] <div foo="i"> with querySelector in standards mode] + expected: FAIL + + [[foo='BAR' s\][foo='BAR' s\] <div foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='i' s\] <div foo="ı"> in quirks mode] + expected: FAIL + + [[align='LEFT' s\] <div align="LEFT"> with querySelector in quirks mode] + expected: FAIL + + [[align='left' s\] <div align="LEFT"> with querySelector in XML] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo~='ä' s\] /* COMBINING in selector */ <div foo="ä"> in XML] + expected: FAIL + + [[foo='bar' s\] <div foo="bar"> in standards mode] + expected: FAIL + + [[class~='A' s\] <div class="X A B"> with querySelector in XML] + expected: FAIL + + [[align='LEFT' s\] <div align="LEFT"> in XML] + expected: FAIL + + [[foo='bar' s\] <div foo="bar"> with querySelector in XML] + expected: FAIL + + [[foo='İ' s\] <div foo="i"> in XML] + expected: FAIL + + [[lang*='A' s\] <div lang="XAB"> in quirks mode] + expected: FAIL + + [[foo='' s\] <div foo=""> in quirks mode] + expected: FAIL + + [[|foo='bar' s\] <div foo="x" {a}foo="BAR"> with querySelector in XML] + expected: FAIL + + [[foo='ä' s\] <div foo="Ä"> in standards mode] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[foo='i' s\] <div foo="ı"> with querySelector in XML] + expected: FAIL + + [[foo='' s\] /* \\0 in attribute */ <div foo="\x00"> in XML] + expected: FAIL + + [[foo='i' s\] <div foo="İ"> with querySelector in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="Ä"> in quirks mode] + expected: FAIL + + [[id^='a' s\] <div id="AB"> with querySelector in quirks mode] + expected: FAIL + + [[foo='BAR' s\][foo='BAR' s\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="x" {a}foo="BAR"> in quirks mode] + expected: FAIL + + [[id^='a' s\] <div id="AB"> in quirks mode] + expected: FAIL + + [[lang|='a' s\] <div lang="a-b"> in quirks mode] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in standards mode] + expected: FAIL + + [[foo='BAR' s\][foo='BAR' s\] <div foo="BAR"> with querySelector in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="ä"> in standards mode] + expected: FAIL + + [[foo='bar' s\] <div FOO="bar"> with querySelector in quirks mode] + expected: FAIL + + [[foo='BAR' s\][foo='bar'\] <div foo="BAR"> in standards mode] + expected: FAIL + + [[lang|='a' s\] <div lang="a-b"> with querySelector in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="A"> with querySelector in XML] + expected: FAIL + + [[class~='a' s\] <div class="x a b"> with querySelector in standards mode] + expected: FAIL + + [[foo='BAR'\][foo='bar' s\] <div foo="BAR"> in XML] + expected: FAIL + + [[id^='a' s\] <div id="ab"> with querySelector in standards mode] + expected: FAIL + + [[foo='' s\] /* \\0 in attribute */ <div foo="\x00"> in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="A"> with querySelector in standards mode] + expected: FAIL + + [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in XML] + expected: FAIL + + [[foo$='Ä' s\] /* COMBINING in selector */ <div foo="ä"> in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in attribute */ <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo*='ä' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in quirks mode] + expected: FAIL + + [[foo~='ä' s\] /* COMBINING in selector */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[align='left' s\] <div align="LEFT"> in XML] + expected: FAIL + + [[id^='a' s\] <div id="ab"> with querySelector in quirks mode] + expected: FAIL + + [[lang*='A' s\] <div lang="XAB"> with querySelector in standards mode] + expected: FAIL + + [[foo='ı' s\] <div foo="I"> in standards mode] + expected: FAIL + + [[foo='' s\] <div foo="BAR"> in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="Ä"> with querySelector in XML] + expected: FAIL + + [[foo='bar' s\] <div FOO="bar"> in XML] + expected: FAIL + + [[align='left' s\] <div align="LEFT"> with querySelector in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="a"> in standards mode] + expected: FAIL + + [[align='left' s\] <div align="LEFT"> in quirks mode] + expected: FAIL + + [[foo='İ' s\] <div foo="I"> in quirks mode] + expected: FAIL + + [[foo='' s\] /* \\0 in attribute */ <div foo="\x00"> in quirks mode] + expected: FAIL + + [[foo='bar' s\] <div foo="x" {a}foo="BAR"> in XML] + expected: FAIL + + [[foo='\t' s\] /* tab in selector */ <div foo=" "> with querySelector in standards mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> in XML] + expected: FAIL + + [[foo='' s\] <div foo=""> with querySelector in standards mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="bar" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\] <div foo="x" {a}foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="Ä"> in XML] + expected: FAIL + + [[lang|='a' s\] <div lang="A-B"> with querySelector in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="a"> with querySelector in XML] + expected: FAIL + + [[align='LEFT' s\] <div align="left"> in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="ä"> in XML] + expected: FAIL + + [[foo='bar' s\] <div baz="BAR"> in standards mode] + expected: FAIL + + [[foo='bar' s\] <div baz="BAR"> with querySelector in standards mode] + expected: FAIL + + [[align='left' s\] <div align="left"> with querySelector in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in both */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[id$='A' s\] <div id="XA"> in XML] + expected: FAIL + + [[foo='' s\] /* \\0 in attribute */ <div foo="\x00"> with querySelector in XML] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="a"> in XML] + expected: FAIL + + [[class~='A' s\] <div class="x a b"> with querySelector in standards mode] + expected: FAIL + + [[foo$='Ä' s\] /* COMBINING in selector */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo='ä' s\] <div foo="Ä"> with querySelector in standards mode] + expected: FAIL + + [[align='LEFT' s\] <div align="LEFT"> in quirks mode] + expected: FAIL + + [[foo='I' s\] <div foo="ı"> in XML] + expected: FAIL + + [[id^='a' s\] <div id="ab"> in standards mode] + expected: FAIL + + [[foo='bar' s\] <div foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="bar" {a}foo="x" {b}foo="x" {c}foo="x"> in quirks mode] + expected: FAIL + + [[foo='I' s\] <div foo="ı"> with querySelector in quirks mode] + expected: FAIL + + [[foo='ı' s\] <div foo="i"> in XML] + expected: FAIL + + [[class~='A' s\] <div class="x a b"> in standards mode] + expected: FAIL + + [[class~='a' s\] <div class="x a b"> in XML] + expected: FAIL + + [[foo='bar' s\][foo='bar'\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="A"> in standards mode] + expected: FAIL + + [[id^='a' s\] <div id="AB"> with querySelector in XML] + expected: FAIL + + [[foo='\t' s\] /* tab in selector */ <div foo=" "> in standards mode] + expected: FAIL + + [[class~='a' s\] <div class="x a b"> in standards mode] + expected: FAIL + + [[lang|='a' s\] <div lang="A-B"> with querySelector in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="a"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\] <div baz="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[foo='ä' s\] <div foo="Ä"> in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> in standards mode] + expected: FAIL + + [[foo='bar' s\] <div baz="BAR"> with querySelector in XML] + expected: FAIL + + [[foo~='ä' s\] /* COMBINING in selector */ <div foo="ä"> with querySelector in XML] + expected: FAIL + + [[id^='a' s\] <div id="AB"> in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in both */ <div foo="Ä"> in standards mode] + expected: FAIL + + [[foo='BAR' s\][foo='BAR' s\] <div foo="BAR"> in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="bar" {c}foo="x"> in quirks mode] + expected: FAIL + + [[class~='a' s\] <div class="x a b"> with querySelector in quirks mode] + expected: FAIL + + [[foo='\t' s\] /* tab in selector */ <div foo=" "> with querySelector in XML] + expected: FAIL + + [[class~='a' s\] <div class="X A B"> with querySelector in XML] + expected: FAIL + + [@namespace x 'a'; [x|foo='' s\] <div {A}foo=""> in XML] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[foo='i' s\] <div foo="İ"> in XML] + expected: FAIL + + [[lang*='A' s\] <div lang="xab"> with querySelector in standards mode] + expected: FAIL + + [[foo$='Ä' s\] /* COMBINING in selector */ <div foo="ä"> in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="A"> with querySelector in XML] + expected: FAIL + + [[foo='Ä' s\] <div foo="ä"> in quirks mode] + expected: FAIL + + [[foo='a' s\] /* COMBINING in attribute */ <div foo="Ä"> in XML] + expected: FAIL + + [[foo='BAR' s\][foo='bar'\] <div foo="BAR"> in XML] + expected: FAIL + + [[align='left' s\] <div align="left"> with querySelector in XML] + expected: FAIL + + [[foo='\x00' s\] /* \\0 in selector */ <div foo=""> with querySelector in standards mode] + expected: FAIL + + [[foo^='Ä' s\] /* COMBINING in selector */ <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> with querySelector in XML] + expected: FAIL + + [[foo='BAR' s\][foo='bar'\] <div foo="BAR"> in quirks mode] + expected: FAIL + + [[align='LEFT' s\] <div align="LEFT"> with querySelector in standards mode] + expected: FAIL + + [[class~='A' s\] <div class="x a b"> with querySelector in XML] + expected: FAIL + + [[id$='A' s\] <div id="XA"> in standards mode] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in quirks mode] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="ä"> in standards mode] + expected: FAIL + + [[foo~='ä' s\] /* COMBINING in selector */ <div foo="ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="Ä"> in standards mode] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="Ä"> with querySelector in quirks mode] + expected: FAIL + + [[foo='bar' s\][foo='bar' s\] <div foo="BAR"> in standards mode] + expected: FAIL + + [[foo='' s\] /* \\0 in attribute */ <div foo="\x00"> with querySelector in quirks mode] + expected: FAIL + + [[class~='A' s\] <div class="x a b"> in quirks mode] + expected: FAIL + + [[foo='I' s\] <div foo="ı"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\] <div FOO="bar"> with querySelector in standards mode] + expected: FAIL + + [[id$='A' s\] <div id="XA"> with querySelector in quirks mode] + expected: FAIL + + [[foo='\x00' s\] /* \\0 in selector */ <div foo=""> in standards mode] + expected: FAIL + + [[foo='ı' s\] <div foo="i"> with querySelector in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="A"> with querySelector in standards mode] + expected: FAIL + + [@namespace x 'a'; [x|foo='' s\] <div {A}foo=""> in quirks mode] + expected: FAIL + + [[|foo='bar' s\] <div foo="x" {a}foo="BAR"> with querySelector in standards mode] + expected: FAIL + + [[foo='İ' s\] <div foo="I"> in standards mode] + expected: FAIL + + [[foo='A' s\] /* COMBINING in attribute */ <div foo="ä"> with querySelector in standards mode] + expected: FAIL + + [[align='LEFT' s\] <div align="LEFT"> with querySelector in XML] + expected: FAIL + + [[*|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="A"> with querySelector in standards mode] + expected: FAIL + + [[foo='bar' s\] <div FOO="bar"> with querySelector in XML] + expected: FAIL + + [[foo='ä' s\] /* COMBINING in selector */ <div foo="a"> in quirks mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in selector */ <div foo="a"> in standards mode] + expected: FAIL + + [[id$='A' s\] <div id="xa"> in standards mode] + expected: FAIL + + [[foo='Ä' s\] /* COMBINING in both */ <div foo="ä"> in quirks mode] + expected: FAIL + + [[lang*='A' s\] <div lang="xab"> in standards mode] + expected: FAIL + + [[foo='bar' s\][foo='bar'\] <div foo="BAR"> in standards mode] + expected: FAIL + + [@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in XML] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="bar" {c}foo="x"> with querySelector in quirks mode] + expected: FAIL + + [[|foo='bar' s\] <div foo="x" {a}foo="BAR"> with querySelector in quirks mode] + expected: FAIL + + [[class~='A' s\] <div class="X A B"> in quirks mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> with querySelector in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="BAR" {a}foo="x" {b}foo="x" {c}foo="x"> in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="x" {a}foo="x" {b}foo="BAR" {c}foo="x"> with querySelector in quirks mode] + expected: FAIL + + [[*|lang='a' s\] <div {http://www.w3.org/XML/1998/namespace}lang="a"> in quirks mode] + expected: FAIL + + [[*|foo='bar' s\] <div foo="bar" {a}foo="x" {b}foo="x" {c}foo="x"> in XML] + expected: FAIL + + [[foo='bar' s\] <div FOO="bar"> in quirks mode] + expected: FAIL + diff --git a/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/syntax.html.ini b/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/syntax.html.ini new file mode 100644 index 00000000000..a768d0e86d4 --- /dev/null +++ b/tests/wpt/metadata/css/selectors/attribute-selectors/attribute-case/syntax.html.ini @@ -0,0 +1,433 @@ +[syntax.html] + [[baz='quux' s \] with querySelector in XML] + expected: FAIL + + [[baz='quux' \\s\] in XML] + expected: FAIL + + [[baz='quux' s\] in quirks mode] + expected: FAIL + + [[baz='quux' \\73\] with querySelector in XML] + expected: FAIL + + [[baz$='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux's\] with querySelector in quirks mode] + expected: FAIL + + [[baz=quux s\] in quirks mode] + expected: FAIL + + [[baz*='quux' s\] in XML] + expected: FAIL + + [[baz="quux" s\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' s \] in XML] + expected: FAIL + + [[baz='quux's \] with querySelector in standards mode] + expected: FAIL + + [[baz*='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[baz|='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux' \\s\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' \\73\] in standards mode] + expected: FAIL + + [[baz='quux' /**/ s\] with querySelector in XML] + expected: FAIL + + [[baz='quux' /**/ s\] in XML] + expected: FAIL + + [[baz='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz~='quux' s\] in XML] + expected: FAIL + + [[baz='quux'/**/s/**/\] with querySelector in XML] + expected: FAIL + + [[baz='quux'/**/s/**/\] in XML] + expected: FAIL + + [[baz=quux s\] with querySelector in XML] + expected: FAIL + + [[baz='quux' \\53\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' \\73\] in XML] + expected: FAIL + + [[baz$='quux' s\] in standards mode] + expected: FAIL + + [[baz~='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz~='quux' s\] in standards mode] + expected: FAIL + + [[baz='quux' S\] in standards mode] + expected: FAIL + + [[baz='quux' s\] in XML] + expected: FAIL + + [[baz='quux'\ns\n\] /* \\n */ in standards mode] + expected: FAIL + + [[baz='quux's \] in quirks mode] + expected: FAIL + + [[baz="quux" s\] with querySelector in standards mode] + expected: FAIL + + [[*|baz='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux's \] in standards mode] + expected: FAIL + + [[baz|='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux's \] with querySelector in XML] + expected: FAIL + + [[baz=quux/**/s\] with querySelector in XML] + expected: FAIL + + [[baz='quux'\ts\t\] /* \\t */ with querySelector in standards mode] + expected: FAIL + + [[baz=quux s\] with querySelector in quirks mode] + expected: FAIL + + [[baz$='quux' s\] in quirks mode] + expected: FAIL + + [[baz*='quux' s\] in standards mode] + expected: FAIL + + [[*|baz='quux' s\] in standards mode] + expected: FAIL + + [[baz='quux's \] in XML] + expected: FAIL + + [[baz^='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux'/**/s/**/\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux'\ts\t\] /* \\t */ in XML] + expected: FAIL + + [[*|baz='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz="quux" s\] with querySelector in XML] + expected: FAIL + + [[baz*='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[baz|='quux' s\] in XML] + expected: FAIL + + [[baz='quux' \\s\] with querySelector in XML] + expected: FAIL + + [[baz^='quux' s\] in quirks mode] + expected: FAIL + + [[|baz='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz='quux' s\] in standards mode] + expected: FAIL + + [[baz='quux' /**/ s\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux' s \] with querySelector in quirks mode] + expected: FAIL + + [[|baz='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[|baz='quux' s\] in quirks mode] + expected: FAIL + + [[baz='quux' \\53\] in quirks mode] + expected: FAIL + + [[baz$='quux' s\] in XML] + expected: FAIL + + [[baz='quux' /**/ s\] in quirks mode] + expected: FAIL + + [[baz=quux s\] with querySelector in standards mode] + expected: FAIL + + [[baz=quux s\] in XML] + expected: FAIL + + [[baz='quux' s /**/ \] with querySelector in XML] + expected: FAIL + + [[baz='quux' \\s\] in standards mode] + expected: FAIL + + [[baz|='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz='quux' S\] in quirks mode] + expected: FAIL + + [[baz='quux's\] with querySelector in XML] + expected: FAIL + + [[baz='quux'\ns\n\] /* \\n */ with querySelector in XML] + expected: FAIL + + [[baz=quux/**/s\] in XML] + expected: FAIL + + [[baz='quux' s \] in quirks mode] + expected: FAIL + + [[baz='quux' s /**/ \] in quirks mode] + expected: FAIL + + [[baz="quux" s\] in quirks mode] + expected: FAIL + + [[baz='quux'\rs\r\] /* \\r */ with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' s /**/ \] in XML] + expected: FAIL + + [[baz='quux'/**/s/**/\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' s \] in standards mode] + expected: FAIL + + [[baz='quux's\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux'\ts\t\] /* \\t */ in standards mode] + expected: FAIL + + [[baz^='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz='quux' \\73\] with querySelector in quirks mode] + expected: FAIL + + [[baz|='quux' s\] in standards mode] + expected: FAIL + + [[baz='quux'\ts\t\] /* \\t */ with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' \\53\] in standards mode] + expected: FAIL + + [[baz=quux/**/s\] in standards mode] + expected: FAIL + + [[baz$='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' /**/ s\] in standards mode] + expected: FAIL + + [[baz|='quux' s\] in quirks mode] + expected: FAIL + + [[baz~='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[baz^='quux' s\] in XML] + expected: FAIL + + [[baz='quux's\] in XML] + expected: FAIL + + [[baz=quux s\] in standards mode] + expected: FAIL + + [[baz="quux" s\] in XML] + expected: FAIL + + [[baz='quux'/**/s/**/\] in standards mode] + expected: FAIL + + [[baz='quux' \\s\] with querySelector in standards mode] + expected: FAIL + + [[*|baz='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux'\rs\r\] /* \\r */ with querySelector in standards mode] + expected: FAIL + + [[*|baz='quux' s\] in XML] + expected: FAIL + + [[|baz='quux' s\] in XML] + expected: FAIL + + [[baz='quux' \\s\] in quirks mode] + expected: FAIL + + [[baz='quux' S\] with querySelector in quirks mode] + expected: FAIL + + [[baz=quux/**/s\] in quirks mode] + expected: FAIL + + [[baz='quux's\] in standards mode] + expected: FAIL + + [[baz*='quux' s\] in quirks mode] + expected: FAIL + + [[baz='quux' s \] with querySelector in standards mode] + expected: FAIL + + [[baz*='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux' \\53\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux' \\53\] in XML] + expected: FAIL + + [[baz='quux'\ns\n\] /* \\n */ in quirks mode] + expected: FAIL + + [[baz='quux'\ts\t\] /* \\t */ in quirks mode] + expected: FAIL + + [[baz^='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[baz=quux/**/s\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux'\ts\t\] /* \\t */ with querySelector in XML] + expected: FAIL + + [[baz='quux'\ns\n\] /* \\n */ in XML] + expected: FAIL + + [[baz='quux'\ns\n\] /* \\n */ with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' s /**/ \] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux's \] with querySelector in quirks mode] + expected: FAIL + + [[baz^='quux' s\] in standards mode] + expected: FAIL + + [[baz~='quux' s\] in quirks mode] + expected: FAIL + + [[*|baz='quux' s\] in quirks mode] + expected: FAIL + + [[baz='quux' S\] with querySelector in XML] + expected: FAIL + + [[baz~='quux' s\] with querySelector in standards mode] + expected: FAIL + + [[baz$='quux' s\] with querySelector in XML] + expected: FAIL + + [[baz='quux'\rs\r\] /* \\r */ in quirks mode] + expected: FAIL + + [[baz="quux" s\] in standards mode] + expected: FAIL + + [[baz='quux' \\73\] with querySelector in standards mode] + expected: FAIL + + [[baz=quux/**/s\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[baz='quux' s /**/ \] in standards mode] + expected: FAIL + + [[baz='quux's\] in quirks mode] + expected: FAIL + + [[baz='quux'\rs\r\] /* \\r */ in standards mode] + expected: FAIL + + [[baz='quux' s /**/ \] with querySelector in standards mode] + expected: FAIL + + [[baz='quux'\rs\r\] /* \\r */ in XML] + expected: FAIL + + [[baz='quux'/**/s/**/\] in quirks mode] + expected: FAIL + + [[baz='quux'\ns\n\] /* \\n */ with querySelector in standards mode] + expected: FAIL + + [[baz='quux'\rs\r\] /* \\r */ with querySelector in XML] + expected: FAIL + + [[baz='quux' S\] with querySelector in standards mode] + expected: FAIL + + [[baz='quux' \\73\] in quirks mode] + expected: FAIL + + [[baz='quux' S\] in XML] + expected: FAIL + + [[baz='quux' \\53\] with querySelector in XML] + expected: FAIL + + [[|baz='quux' s\] with querySelector in quirks mode] + expected: FAIL + + [[|baz='quux' s\] in standards mode] + expected: FAIL + + [[baz='quux' /**/ s\] with querySelector in quirks mode] + expected: FAIL + diff --git a/tests/wpt/metadata/encoding/sniffing.html.ini b/tests/wpt/metadata/encoding/sniffing.html.ini new file mode 100644 index 00000000000..1449fe0afc3 --- /dev/null +++ b/tests/wpt/metadata/encoding/sniffing.html.ini @@ -0,0 +1,4 @@ +[sniffing.html] + [No (UTF-8) sniffing allowed] + 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/dom/documents/dom-tree-accessors/Document.currentScript.html.ini b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/Document.currentScript.html.ini index 163449501e4..ada0c300bb0 100644 --- a/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/Document.currentScript.html.ini +++ b/tests/wpt/metadata/html/dom/documents/dom-tree-accessors/Document.currentScript.html.ini @@ -7,6 +7,3 @@ [Script script-svg] expected: NOTRUN - [Script script-load-error] - expected: NOTRUN - diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini index 0f1a214d0ee..29b0025a2ae 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change.html.ini @@ -5,29 +5,11 @@ expected: TIMEOUT [picture: source (max-width:500px) valid image, img valid image, resize to wide] - expected: FAIL + expected: TIMEOUT [picture: source (max-width:500px) valid image, img broken image, resize to narrow] expected: TIMEOUT [picture: source (max-width:500px) valid image, img valid image, resize to narrow] - expected: FAIL - - [picture: source (max-width:500px) broken image, img valid image, resize to narrow] - expected: FAIL - - [img (srcset 1 cand) valid image, resize to wide] - expected: FAIL - - [picture: same URL in source (max-width:500px) and img, resize to wide] - expected: FAIL - - [img (srcset 1 cand) valid image, resize to narrow] - expected: FAIL - - [picture: source (max-width:500px) valid image, img broken image, resize to wide] - expected: FAIL - - [picture: same URL in source (max-width:500px) and img, resize to narrow] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini new file mode 100644 index 00000000000..8cc42056d34 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini @@ -0,0 +1,10 @@ +[non-active-document.html] + [DOMParser] + expected: FAIL + + [createHTMLDocument] + expected: FAIL + + [<template>] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html.ini index caa0aa5f39e..72a023d1ce4 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute-standards-mode.html.ini @@ -1,4 +1,5 @@ [parse-a-sizes-attribute-standards-mode.html] + expected: TIMEOUT [<img srcset="/images/green-1x1.png?e59 50w, /images/green-16x16.png?e59 51w" sizes="(min-width:0) or (min-width:unknown-mf-value) 1px"> ref sizes="1px" (standards mode)] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/range-intrinsic-size.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/range-intrinsic-size.html.ini new file mode 100644 index 00000000000..daea3792501 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/range-intrinsic-size.html.ini @@ -0,0 +1,2 @@ +[range-intrinsic-size.html] + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/muted-errors.sub.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/muted-errors.sub.html.ini index 461ea2d44c1..1debb969496 100644 --- a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/muted-errors.sub.html.ini +++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/muted-errors.sub.html.ini @@ -11,3 +11,9 @@ [Errors for same-origin scripts redirected to a cross-origin url and redirected back to same-origin should be muted] expected: FAIL + [Non-synthetic errors for same-origin scripts redirected to a cross-origin URL and redirected back to same-origin should be muted] + expected: FAIL + + [Syntax error for same-origin script redirected to a cross-origin URL and redirected back to same-origin should be muted] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini index e564ff94d4d..a3c928bd11c 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-body-window.html.ini @@ -48,3 +48,24 @@ [not shadowed paste (document.createElement("body"))] expected: FAIL + [shadowed resize (window)] + expected: FAIL + + [not shadowed loadend (window)] + expected: FAIL + + [shadowed resize (document.body)] + expected: FAIL + + [shadowed resize (document.createElement("body"))] + expected: FAIL + + [not shadowed securitypolicyviolation (window)] + expected: FAIL + + [not shadowed auxclick (window)] + expected: FAIL + + [shadowed error (window)] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini new file mode 100644 index 00000000000..466acc8a009 --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html.ini @@ -0,0 +1,64 @@ +[event-handler-attributes-frameset-window.html] + [shadowed resize (window)] + expected: FAIL + + [shadowed error (document.createElement("frameset"))] + expected: FAIL + + [not shadowed paste (document.createElement("frameset"))] + expected: FAIL + + [shadowed resize (document.body)] + expected: FAIL + + [shadowed resize (document.createElement("frameset"))] + expected: FAIL + + [not shadowed securitypolicyviolation (document.body)] + expected: FAIL + + [not shadowed auxclick (window)] + expected: FAIL + + [not shadowed securitypolicyviolation (document.createElement("frameset"))] + expected: FAIL + + [not shadowed cut (document.body)] + expected: FAIL + + [not shadowed copy (document.createElement("frameset"))] + expected: FAIL + + [not shadowed loadend (document.body)] + expected: FAIL + + [not shadowed securitypolicyviolation (window)] + expected: FAIL + + [not shadowed auxclick (document.body)] + expected: FAIL + + [not shadowed loadend (window)] + expected: FAIL + + [not shadowed paste (document.body)] + expected: FAIL + + [shadowed error (document.body)] + expected: FAIL + + [not shadowed copy (document.body)] + expected: FAIL + + [not shadowed loadend (document.createElement("frameset"))] + expected: FAIL + + [not shadowed cut (document.createElement("frameset"))] + expected: FAIL + + [shadowed error (window)] + expected: FAIL + + [not shadowed auxclick (document.createElement("frameset"))] + expected: FAIL + diff --git a/tests/wpt/metadata/navigation-timing/supported_navigation_type.any.js.ini b/tests/wpt/metadata/navigation-timing/supported_navigation_type.any.js.ini new file mode 100644 index 00000000000..3029022e9cf --- /dev/null +++ b/tests/wpt/metadata/navigation-timing/supported_navigation_type.any.js.ini @@ -0,0 +1,9 @@ +[supported_navigation_type.any.html] + [supportedEntryTypes contains 'navigation'.] + expected: FAIL + + +[supported_navigation_type.any.worker.html] + [supportedEntryTypes contains 'navigation'.] + expected: FAIL + diff --git a/tests/wpt/metadata/performance-timeline/supportedEntryTypes.any.js.ini b/tests/wpt/metadata/performance-timeline/supportedEntryTypes.any.js.ini new file mode 100644 index 00000000000..356bd49af5a --- /dev/null +++ b/tests/wpt/metadata/performance-timeline/supportedEntryTypes.any.js.ini @@ -0,0 +1,9 @@ +[supportedEntryTypes.any.html] + [supportedEntryTypes exists and returns entries in alphabetical order] + expected: FAIL + + +[supportedEntryTypes.any.worker.html] + [supportedEntryTypes exists and returns entries in alphabetical order] + expected: FAIL + diff --git a/tests/wpt/metadata/performance-timeline/webtiming-resolution.any.js.ini b/tests/wpt/metadata/performance-timeline/webtiming-resolution.any.js.ini index 7725b118e9d..99a24216c88 100644 --- a/tests/wpt/metadata/performance-timeline/webtiming-resolution.any.js.ini +++ b/tests/wpt/metadata/performance-timeline/webtiming-resolution.any.js.ini @@ -12,6 +12,3 @@ [Verifies the resolution of entry.startTime is at least 5 microseconds.] expected: TIMEOUT - [Verifies the resolution of performance.now() is at least 5 microseconds.] - expected: FAIL - diff --git a/tests/wpt/metadata/quirks/unitless-length/limited-quirks.html.ini b/tests/wpt/metadata/quirks/unitless-length/limited-quirks.html.ini new file mode 100644 index 00000000000..c7e9c7434f5 --- /dev/null +++ b/tests/wpt/metadata/quirks/unitless-length/limited-quirks.html.ini @@ -0,0 +1,283 @@ +[limited-quirks.html] + [top: -\\31 .5] + expected: FAIL + + [bottom: -1A] + expected: FAIL + + [bottom: -1a] + expected: FAIL + + [top: @1] + expected: FAIL + + [top: "1a"] + expected: FAIL + + [top: @a] + expected: FAIL + + [bottom: "1"] + expected: FAIL + + [bottom: -/**/1] + expected: FAIL + + [top: +/**/1] + expected: FAIL + + [bottom: @1a] + expected: FAIL + + [top: 1\\31 ] + expected: FAIL + + [top: url('1')] + expected: FAIL + + [bottom: -\\31 ] + expected: FAIL + + [top: calc(1)] + expected: FAIL + + [top: \\31 ] + expected: FAIL + + [bottom: +1\\31 ] + expected: FAIL + + [bottom: 1\\31 .5] + expected: FAIL + + [bottom: #0001] + expected: FAIL + + [top: calc(2 * 2px)] + expected: FAIL + + [bottom: 1a] + expected: FAIL + + [bottom: A] + expected: FAIL + + [bottom: #01] + expected: FAIL + + [top: +\\31 .5] + expected: FAIL + + [bottom: #1] + expected: FAIL + + [top: -/**/1] + expected: FAIL + + [bottom: +\\31 .5] + expected: FAIL + + [bottom: \\31 ] + expected: FAIL + + [bottom: calc(1)] + expected: FAIL + + [top: #001] + expected: FAIL + + [top: +\\31 ] + expected: FAIL + + [bottom: +\\31 ] + expected: FAIL + + [top: +1.5] + expected: FAIL + + [top: +1\\31 ] + expected: FAIL + + [bottom: @a] + expected: FAIL + + [bottom: @1] + expected: FAIL + + [top: #1] + expected: FAIL + + [top: 1a] + expected: FAIL + + [bottom: +1a] + expected: FAIL + + [bottom: +1A] + expected: FAIL + + [bottom: "a"] + expected: FAIL + + [top: #00001] + expected: FAIL + + [bottom: -1\\31 .5] + expected: FAIL + + [top: "1"] + expected: FAIL + + [bottom: 1.5] + expected: FAIL + + [bottom: -\\31 .5] + expected: FAIL + + [bottom: url('1')] + expected: FAIL + + [bottom: -1.5] + expected: FAIL + + [top: \\31 .5] + expected: FAIL + + [bottom: "1a"] + expected: FAIL + + [bottom: calc(2 * 2px)] + expected: FAIL + + [bottom: +1\\31 .5] + expected: FAIL + + [bottom: 1\\31 ] + expected: FAIL + + [bottom: +/**/1] + expected: FAIL + + [bottom: #00001] + expected: FAIL + + [top: url(1)] + expected: FAIL + + [bottom: #001] + expected: FAIL + + [top: +1\\31 .5] + expected: FAIL + + [top: -1a] + expected: FAIL + + [top: -1A] + expected: FAIL + + [bottom: url(1)] + expected: FAIL + + [top: a] + expected: FAIL + + [top: A] + expected: FAIL + + [top: #000001] + expected: FAIL + + [top: 1] + expected: FAIL + + [top: 1\\31 .5] + expected: FAIL + + [bottom: a] + expected: FAIL + + [bottom: 1] + expected: FAIL + + [bottom: +1] + expected: FAIL + + [bottom: #000001] + expected: FAIL + + [bottom: +a] + expected: FAIL + + [bottom: +A] + expected: FAIL + + [top: 1.5] + expected: FAIL + + [top: +A] + expected: FAIL + + [top: +a] + expected: FAIL + + [top: +1] + expected: FAIL + + [top: -1.5] + expected: FAIL + + [top: -1\\31 .5] + expected: FAIL + + [top: +1a] + expected: FAIL + + [top: +1A] + expected: FAIL + + [top: @1a] + expected: FAIL + + [bottom: \\31 .5] + expected: FAIL + + [top: "a"] + expected: FAIL + + [top: #01] + expected: FAIL + + [bottom: +1.5] + expected: FAIL + + [bottom: -A] + expected: FAIL + + [bottom: -a] + expected: FAIL + + [bottom: -1\\31 ] + expected: FAIL + + [top: #0001] + expected: FAIL + + [bottom: -1] + expected: FAIL + + [top: -\\31 ] + expected: FAIL + + [top: -A] + expected: FAIL + + [top: -a] + expected: FAIL + + [top: -1] + expected: FAIL + + [top: -1\\31 ] + expected: FAIL + diff --git a/tests/wpt/metadata/resource-timing/supported_resource_type.any.js.ini b/tests/wpt/metadata/resource-timing/supported_resource_type.any.js.ini new file mode 100644 index 00000000000..5ff8c59cc26 --- /dev/null +++ b/tests/wpt/metadata/resource-timing/supported_resource_type.any.js.ini @@ -0,0 +1,9 @@ +[supported_resource_type.any.html] + [supportedEntryTypes contains 'resource'.] + expected: FAIL + + +[supported_resource_type.any.worker.html] + [supportedEntryTypes contains 'resource'.] + expected: FAIL + diff --git a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini index f584fce5df1..268949ced5c 100644 --- a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini +++ b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini @@ -1,5 +1,4 @@ [005.html] - expected: ERROR [dedicated worker in shared worker in dedicated worker] expected: FAIL diff --git a/tests/wpt/web-platform-tests/.azure-pipelines.yml b/tests/wpt/web-platform-tests/.azure-pipelines.yml index bf4d16d1f26..cea8efe2719 100644 --- a/tests/wpt/web-platform-tests/.azure-pipelines.yml +++ b/tests/wpt/web-platform-tests/.azure-pipelines.yml @@ -13,7 +13,31 @@ trigger: none # disable builds for branches jobs: -- job: root +# The affected tests jobs are unconditional for speed, as most PRs have one or +# more affected tests: https://github.com/web-platform-tests/wpt/issues/13936. +- job: affected_macOS + displayName: 'affected tests (Safari Technology Preview)' + pool: + vmImage: 'macOS-10.13' + steps: + - template: tools/ci/azure/affected_tests.yml + parameters: + artifactName: 'results' + +- job: affected_without_changes_macOS + displayName: 'affected tests without changes (Safari Technology Preview)' + pool: + vmImage: 'macOS-10.13' + steps: + - template: tools/ci/azure/affected_tests.yml + parameters: + checkoutCommit: 'HEAD^1' + affectedRange: 'HEAD@{1}' + artifactName: 'results-without-changes' + +# The decision jobs runs `./wpt test-jobs` to determine which jobs to run, +# and all following jobs wait for it to finish and depend on its output. +- job: decision displayName: './wpt test-jobs' pool: vmImage: 'ubuntu-16.04' @@ -29,8 +53,8 @@ jobs: - job: infrastructure_macOS displayName: 'infrastructure/ tests (macOS)' - dependsOn: root - condition: dependencies.root.outputs['test_jobs.wptrunner_infrastructure'] + dependsOn: decision + condition: dependencies.decision.outputs['test_jobs.wptrunner_infrastructure'] pool: vmImage: 'macOS-10.13' steps: @@ -45,17 +69,22 @@ jobs: - template: tools/ci/azure/install_safari.yml - template: tools/ci/azure/update_hosts.yml - template: tools/ci/azure/update_manifest.yml - - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel=dev chrome infrastructure/ + - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/chrome.tbpl.log --log-tbpl-level info --channel dev chrome infrastructure/ displayName: 'Run tests (Chrome Dev)' - - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel=nightly firefox infrastructure/ + - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/firefox.tbpl.log --log-tbpl-level info --channel nightly firefox infrastructure/ displayName: 'Run tests (Firefox Nightly)' - - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --channel=preview safari infrastructure/ + - script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-tbpl $(Build.ArtifactStagingDirectory)/safari.tbpl.log --log-tbpl-level info --channel preview safari infrastructure/ displayName: 'Run tests (Safari Technology Preview)' + - task: PublishBuildArtifacts@1 + displayName: 'Publish results' + inputs: + artifactName: 'infrastructure' + condition: succeededOrFailed() - job: tools_unittest_macOS displayName: 'tools/ unittests (macOS)' - dependsOn: root - condition: dependencies.root.outputs['test_jobs.tools_unittest'] + dependsOn: decision + condition: dependencies.decision.outputs['test_jobs.tools_unittest'] pool: vmImage: 'macOS-10.13' steps: @@ -67,8 +96,8 @@ jobs: - job: wptrunner_unittest_macOS displayName: 'tools/wptrunner/ unittests (macOS)' - dependsOn: root - condition: dependencies.root.outputs['test_jobs.wptrunner_unittest'] + dependsOn: decision + condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest'] pool: vmImage: 'macOS-10.13' steps: @@ -79,8 +108,8 @@ jobs: - job: wpt_integration_macOS displayName: 'tools/wpt/ tests (macOS)' - dependsOn: root - condition: dependencies.root.outputs['test_jobs.wpt_integration'] + dependsOn: decision + condition: dependencies.decision.outputs['test_jobs.wpt_integration'] pool: vmImage: 'macOS-10.13' steps: diff --git a/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html index 1fe946ae70a..75cf3a3140c 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-dttext-manual.https.html @@ -4,25 +4,20 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> -async_test(function(t) { - var test_data = "Clipboard write (dt/text) -> read (dt/text) test data"; - var cb = navigator.clipboard; - var dt = new DataTransfer(); - dt.items.add(test_data, "text/plain"); +promise_test(async (t) => { + const input = "Clipboard write (dt/text) -> read (dt/text) test data"; + const dt = new DataTransfer(); + dt.items.add(input, "text/plain"); - cb.write(dt).then(t.step_func(() => { - cb.read().then(t.step_func((data) => { - assert_equals(data.items.length, 1); - data.items[0].getAsString(t.step_func((s) => { - assert_equals(s, test_data); - t.done(); - })); - }), function() { - t.unreached_func("clipboard.read() fail"); - }); - }), function() { - t.unreached_func("clipboard.write() fail"); + await navigator.clipboard.write(dt); + const output = await navigator.clipboard.read(); + + assert_equals(output.items.length, 1); + const result_promise = new Promise(resolve => { + output.items[0].getAsString(resolve); }); + const string_output = await result_promise; + assert_equals(string_output, input); }, "Verify write and read clipboard (DataTransfer/text)"); </script> Note: This is a manual test because it writes/reads to the shared system diff --git a/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-text-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-text-manual.https.html index b341d923395..3e68f9a5c66 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-text-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/async-write-dttext-read-text-manual.https.html @@ -4,22 +4,15 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> -async_test(function(t) { - var test_data = "Clipboard write (dt/text) -> readText test data"; - var cb = navigator.clipboard; - var dt = new DataTransfer(); - dt.items.add(test_data, "text/plain"); +promise_test(async (t) => { + const input = "Clipboard write (dt/text) -> readText test data"; + const dt = new DataTransfer(); + dt.items.add(input, "text/plain"); - cb.write(dt).then(t.step_func(() => { - cb.readText().then(t.step_func((data) => { - assert_equals(data, test_data); - t.done(); - }), function() { - t.unreached_func("clipboard.read() fail"); - }); - }), function() { - t.unreached_func("clipboard.write() fail"); - }); + await navigator.clipboard.write(dt); + const output = await navigator.clipboard.readText(); + + assert_equals(output, input); }, "Verify write and read clipboard (DataTransfer/text)"); </script> Note: This is a manual test because it writes/reads to the shared system diff --git a/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-dttext-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-dttext-manual.https.html index ab11ab9dfb4..232e144b7e0 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-dttext-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-dttext-manual.https.html @@ -4,22 +4,18 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> -async_test(function(t) { - var test_data = "Clipboard writeText -> read(dt/text) test data"; - var cb = navigator.clipboard; - cb.writeText(test_data).then(t.step_func(() => { - cb.read().then(t.step_func((data) => { - assert_equals(data.items.length, 1); - data.items[0].getAsString(t.step_func((s) => { - assert_equals(s, test_data); - t.done(); - })); - }), function() { - t.unreached_func("clipboard.read() fail"); - }); - }), function() { - t.unreached_func("clipboard.writeText() fail"); +promise_test(async (t) => { + const input = "Clipboard writeText -> read (dt/text) test data"; + + await navigator.clipboard.writeText(input); + const output = await navigator.clipboard.read(); + + assert_equals(output.items.length, 1); + const result_promise = new Promise(resolve => { + output.items[0].getAsString(resolve); }); + const string_output = await result_promise; + assert_equals(string_output, input); }, "Verify write and read clipboard (DOMString)"); </script> Note: This is a manual test because it writes/reads to the shared system diff --git a/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-text-manual.https.html b/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-text-manual.https.html index a5572164f23..783683eb048 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-text-manual.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/async-write-text-read-text-manual.https.html @@ -4,19 +4,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> -async_test(function(t) { - var test_data = "Clipboard writeText -> readText test data"; - var cb = navigator.clipboard; - cb.writeText(test_data).then(t.step_func(() => { - cb.readText().then(t.step_func((data) => { - assert_equals(data, test_data); - t.done(); - }), function() { - t.unreached_func("clipboard.readText() fail"); - }); - }), function() { - t.unreached_func("clipboard.writeText() fail"); - }); +promise_test(async (t) => { + const input = "Clipboard writeText -> readText test data"; + + await navigator.clipboard.writeText(input); + const output = await navigator.clipboard.readText(); + + assert_equals(output, input); }, "Verify write and read clipboard (DOMString)"); </script> Note: This is a manual test because it writes/reads to the shared system diff --git a/tests/wpt/web-platform-tests/css/css-conditional/test_group_insertRule.html b/tests/wpt/web-platform-tests/css/css-conditional/test_group_insertRule.html index f34245ec472..5326501913d 100644 --- a/tests/wpt/web-platform-tests/css/css-conditional/test_group_insertRule.html +++ b/tests/wpt/web-platform-tests/css/css-conditional/test_group_insertRule.html @@ -12,7 +12,7 @@ @media print {} </style> </head> -<body onload="run()"> +<body> <div id=log></div> <div id="test"></div> <script> diff --git a/tests/wpt/web-platform-tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html b/tests/wpt/web-platform-tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html index 52af22af769..0ed46f53bc7 100644 --- a/tests/wpt/web-platform-tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html +++ b/tests/wpt/web-platform-tests/css/css-shadow-parts/invalidation-change-part-name-idl-setter.html @@ -11,9 +11,10 @@ </head> <body> <style>#c-e::part(partp) { color: red; }</style> + <style>#c-e::part(new-partp) { color: green; }</style> <script>installCustomElement("custom-element", "custom-element-template");</script> <template id="custom-element-template"> - <style>span { color: green; }</style> + <style>span { color: blue; }</style> <span id="part" part="partp">This text</span> </template> The following text should be green: diff --git a/tests/wpt/web-platform-tests/css/css-transitions/currentcolor-animation-001.html b/tests/wpt/web-platform-tests/css/css-transitions/currentcolor-animation-001.html index 4fd982a8cc7..1ffa1a358ca 100644 --- a/tests/wpt/web-platform-tests/css/css-transitions/currentcolor-animation-001.html +++ b/tests/wpt/web-platform-tests/css/css-transitions/currentcolor-animation-001.html @@ -10,7 +10,7 @@ <script src="/resources/testharnessreport.js"></script> <style id="style"></style> </head> -<body onload="run()"> +<body> <div id=log></div> <div id="test"></div> <script> diff --git a/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html b/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html index ccfbf7cec2c..ef714670f54 100644 --- a/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html +++ b/tests/wpt/web-platform-tests/css/cssom/stylesheet-same-origin.sub.html @@ -7,41 +7,67 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <link id="crossorigin" href="http://www1.{{host}}:{{ports[http][1]}}/stylesheet-same-origin.css" rel="stylesheet"> + <link id="crossorigin" href="http://www1.{{host}}:{{ports[http][1]}}/css/cssom/stylesheet-same-origin.css" rel="stylesheet"> <link id="sameorigin" href="stylesheet-same-origin.css" rel="stylesheet"> <link id="sameorigindata" href="data:text/css,.green-text{color:rgb(0, 255, 0)}" rel="stylesheet"> + <link id="redirect-sameorigin-to-crossorigin" + href="/common/redirect.py?location=http://www1.{{host}}:{{ports[http][1]}}/css/cssom/stylesheet-same-origin.css" + rel="stylesheet"> + <link id="redirect-crossorigin-to-sameorigin" + href="http://www1.{{host}}:{{ports[http][1]}}/common/redirect.py?location=http://{{host}}:{{ports[http][0]}}/css/cssom/stylesheet-same-origin.css" + rel="stylesheet"> + <link id="loaderror" href="support/malformed-http-response.asis" rel="stylesheet"> <script> var crossorigin = document.getElementById("crossorigin").sheet; + var redirectSameOriginToCrossOrigin = document.getElementById("redirect-sameorigin-to-crossorigin").sheet; + var redirectCrossOriginToSameOrigin = document.getElementById("redirect-crossorigin-to-sameorigin").sheet; + var loadError = document.getElementById("loaderror").sheet; var sameorigin = document.getElementById("sameorigin").sheet; var sameorigindata = document.getElementById("sameorigindata").sheet; - test(function() { + function doOriginCleanCheck(sheet, name) { + assert_equals(sheet.cssRules.length, 1, name + " stylesheet.cssRules should be accessible."); + sheet.insertRule("#test { margin: 10px; }", 1); + assert_equals(sheet.cssRules.length, 2, name + " stylesheet.insertRule should be accessible."); + sheet.deleteRule(0); + assert_equals(sheet.cssRules.length, 1, name + " stylesheet.deleteRule should be accessible."); + } + + function doOriginDirtyCheck(sheet) { assert_throws("SecurityError", function () { - crossorigin.cssRules; + sheet.cssRules; }, - "Cross origin stylesheet.cssRules should throw SecurityError."); + 'stylesheet.cssRules should throw SecurityError.'); assert_throws("SecurityError", function () { - crossorigin.insertRule("#test { margin: 10px; }", 1); + sheet.insertRule("#test { margin: 10px; }", 1); }, - "Cross origin stylesheet.insertRule should throw SecurityError."); + 'stylesheet.insertRule should throw SecurityError.'); assert_throws("SecurityError", function () { - crossorigin.deleteRule(0); + sheet.deleteRule(0); }, - "Cross origin stylesheet.deleteRule should throw SecurityError."); + 'stylesheet.deleteRule should throw SecurityError.'); + } + + test(function() { + doOriginDirtyCheck(crossorigin); }, "Origin-clean check in cross-origin CSSOM Stylesheets"); - function doOriginCleanCheck(sheet, name) { - assert_equals(sheet.cssRules.length, 1, name + " stylesheet.cssRules should be accessible."); - sheet.insertRule("#test { margin: 10px; }", 1); - assert_equals(sheet.cssRules.length, 2, name + " stylesheet.insertRule should be accessible."); - sheet.deleteRule(0); - assert_equals(sheet.cssRules.length, 1, name + " stylesheet.deleteRule should be accessible."); - } + test(function() { + doOriginDirtyCheck(redirectSameOriginToCrossOrigin); + }, "Origin-clean check in cross-origin CSSOM Stylesheets (redirect from same-origin to cross-origin)"); + + test(function() { + doOriginDirtyCheck(redirectCrossOriginToSameOrigin); + }, "Origin-clean check in cross-origin CSSOM Stylesheets (redirect from cross-origin to same-origin)"); + + test(function() { + doOriginDirtyCheck(loadError); + }, "Origin-clean check in loading error CSSOM Stylesheets"); test(function() { doOriginCleanCheck(sameorigin, "Same-origin"); diff --git a/tests/wpt/web-platform-tests/css/cssom/support/malformed-http-response.asis b/tests/wpt/web-platform-tests/css/cssom/support/malformed-http-response.asis new file mode 100644 index 00000000000..bc3c68d46d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom/support/malformed-http-response.asis @@ -0,0 +1 @@ +HAHAHA THIS IS NOT HTTP AND THE BROWSER SHOULD CONSIDER IT A NETWORK ERROR diff --git a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/cssom.html b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/cssom.html index 5c01e3cc78e..d03d820a3e6 100644 --- a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/cssom.html +++ b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/cssom.html @@ -24,6 +24,9 @@ var tests = [ ['[foo="bar" i]', '[foo="bar" i]'], ['[foo="bar" /**/ i]', '[foo="bar" i]'], ['[foo="bar"/**/i]', '[foo="bar" i]'], + ['[foo="bar" s]', '[foo="bar" s]'], + ['[foo="bar" /**/ s]', '[foo="bar" s]'], + ['[foo="bar"/**/s]', '[foo="bar" s]'], ] tests.forEach(function(arr) { diff --git a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-quirks.html b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-quirks.html index 4606419b31c..a7ec7e2e04f 100644 --- a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-quirks.html +++ b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-quirks.html @@ -1,5 +1,5 @@ <style></style> -<div id=test foo="BAR"></div> +<div id=test foo="BAR" baz="quux"></div> <script> var mode = "quirks mode"; </script> diff --git a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-xml.xhtml b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-xml.xhtml index 19491c94c46..b90c2777464 100644 --- a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-xml.xhtml +++ b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/resources/syntax-xml.xhtml @@ -3,7 +3,7 @@ <style></style> </head> <body> -<div id="test" foo="BAR"/> +<div id="test" foo="BAR" baz="quux"/> <script> var mode = "XML"; </script> diff --git a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/semantics.html b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/semantics.html index 6b04fb517ac..51e5c516284 100644 --- a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/semantics.html +++ b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/semantics.html @@ -12,6 +12,17 @@ setup({explicit_done:true}); var match = [ // [selector, attrs...] (each attr is [ns, name, value]) ["[foo='BAR'] /* sanity check (match) */", ["", "foo", "BAR"]], + ["[foo='bar'] /* sanity check (match) */", ["", "foo", "bar"]], + ["[align='left'] /* sanity check (match) */", ["", "align", "left"]], + ["[class~='a'] /* sanity check (match) */", ["", "class", "X a b"]], + ["[class~='A'] /* sanity check (match) */", ["", "class", "x A B"]], + ["[id^='a'] /* sanity check (match) */", ["", "id", "ab"]], + ["[id$='A'] /* sanity check (match) */", ["", "id", "XA"]], + ["[lang|='a'] /* sanity check (match) */", ["", "lang", "a-b"]], + ["[lang*='A'] /* sanity check (match) */", ["", "lang", "XAB"]], + ["@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A'] /* sanity check (match) */", + ["http://www.w3.org/XML/1998/namespace", "lang", "A"]], + // Case-insensitive matching. ["[foo='bar' i]", ["", "foo", "BAR"]], ["[foo='' i]", ["", "foo", ""]], ["[foo='a\u0308' i] /* COMBINING in both */", ["", "foo", "A\u0308"]], @@ -32,9 +43,47 @@ var match = [ ["[foo='bar' i][foo='bar' i]", ["", "foo", "BAR"]], ["[foo='BAR'][foo='bar' i]", ["", "foo", "BAR"]], ["[foo='bar' i][foo='BAR']", ["", "foo", "BAR"]], + // Case-sensitive matching. + ["[foo='bar' s]", ["", "foo", "bar"]], + ["[foo='' s]", ["", "foo", ""]], + ["[foo='a\u0308' s] /* COMBINING in both */", ["", "foo", "a\u0308"]], + ["[*|foo='bar' s]", ["", "foo", "x"], ["a", "foo", "x"], ["b", "foo", "bar"], ["c", "foo", "x"]], + ["[*|foo='bar' s]", ["", "foo", "bar"], ["a", "foo", "x"], ["b", "foo", "x"], ["c", "foo", "x"]], + ["[align='left' s]", ["", "align", "left"]], + ["[align='LEFT' s]", ["", "align", "LEFT"]], + ["[class~='a' s]", ["", "class", "x a b"]], + ["[class~='A' s]", ["", "class", "X A B"]], + ["[id^='a' s]", ["", "id", "ab"]], + ["[id$='A' s]", ["", "id", "XA"]], + ["[lang|='a' s]", ["", "lang", "a-b"]], + ["[lang*='A' s]", ["", "lang", "XAB"]], + ["[*|lang='a' s]", ["http://www.w3.org/XML/1998/namespace", "lang", "a"]], + ["[*|lang='A' s]", ["http://www.w3.org/XML/1998/namespace", "lang", "A"]], + ["@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s]", ["http://www.w3.org/XML/1998/namespace", "lang", "A"]], + ["[foo='BAR' s][foo='BAR' s]", ["", "foo", "BAR"]], ]; + +var matchHTMLOnly = [ + ["[align='left'] /* sanity check (match HTML) */", ["", "align", "LEFT"]], + ["[align='LEFT'] /* sanity check (match HTML) */", ["", "align", "left"]], + ["[lang|='a'] /* sanity check (match HTML) */", ["", "lang", "A-B"]], + ["[lang*='A'] /* sanity check (match HTML) */", ["", "lang", "xab"]], +]; + var nomatch = [ ["[missingattr] /* sanity check (no match) */", ["", "foo", "BAR"]], + ["[foo='bar'] /* sanity check (no match) */", ["", "foo", "BAR"]], + ["[class~='a'] /* sanity check (no match) */", ["", "class", "X A B"]], + ["[class~='A'] /* sanity check (no match) */", ["", "class", "x a b"]], + ["[id^='a'] /* sanity check (no match) */", ["", "id", "AB"]], + ["[id$='A']", ["", "id", "xa"]], + ["[*|lang='a'] /* sanity check (no match) */", + ["http://www.w3.org/XML/1998/namespace", "lang", "A"]], + ["[*|lang='A'] /* sanity check (no match) */", + ["http://www.w3.org/XML/1998/namespace", "lang", "a"]], + ["@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A'] /* sanity check (no match) */", + ["http://www.w3.org/XML/1998/namespace", "lang", "a"]], + // Case-insensitive matching. ["[foo='' i]", ["", "foo", "BAR"]], ["[foo='\u0000' i] /* \\0 in selector */", ["", "foo", ""]], ["[foo='' i] /* \\0 in attribute */", ["", "foo", "\u0000"]], @@ -73,6 +122,66 @@ var nomatch = [ ["@namespace x 'A'; [x|foo='' i]", ["a", "foo", ""]], ["[foo='bar' i][foo='bar']", ["", "foo", "BAR"]], ["[foo='bar' i]", ["", "baz", "BAR"]], + // Case-sensitive matching + ["[foo='' s]", ["", "foo", "BAR"]], + ["[foo='\u0000' s] /* \\0 in selector */", ["", "foo", ""]], + ["[foo='' s] /* \\0 in attribute */", ["", "foo", "\u0000"]], + ["[foo='\u00E4' s]", ["", "foo", "\u00C4"]], + ["[foo='\u00C4' s]", ["", "foo", "\u00E4"]], + ["[foo='a\u0308' s] /* COMBINING in selector */", ["", "foo", "\u00C4"]], + ["[foo~='a\u0308' s] /* COMBINING in selector */", ["", "foo", "\u00E4"]], + ["[foo^='A\u0308' s] /* COMBINING in selector */", ["", "foo", "\u00C4"]], + ["[foo$='A\u0308' s] /* COMBINING in selector */", ["", "foo", "\u00E4"]], + ["[foo*='\u00E4' s] /* COMBINING in attribute */", ["", "foo", "a\u0308"]], + ["[foo|='\u00E4' s] /* COMBINING in attribute */", ["", "foo", "A\u0308"]], + ["[foo='\u00C4' s] /* COMBINING in attribute */", ["", "foo", "a\u0308"]], + ["[foo='\u00C4' s] /* COMBINING in attribute */", ["", "foo", "A\u0308"]], + ["[foo='a\u0308' s] /* COMBINING in selector */", ["", "foo", "a"]], + ["[foo='a\u0308' s] /* COMBINING in selector */", ["", "foo", "A"]], + ["[foo='A\u0308' s] /* COMBINING in selector */", ["", "foo", "a"]], + ["[foo='A\u0308' s] /* COMBINING in selector */", ["", "foo", "A"]], + ["[foo='a' s] /* COMBINING in attribute */", ["", "foo", "a\u0308"]], + ["[foo='A' s] /* COMBINING in attribute */", ["", "foo", "a\u0308"]], + ["[foo='a' s] /* COMBINING in attribute */", ["", "foo", "A\u0308"]], + ["[foo='A' s] /* COMBINING in attribute */", ["", "foo", "A\u0308"]], + ["[foo='i' s]", ["", "foo", "\u0130"]], + ["[foo='i' s]", ["", "foo", "\u0131"]], + ["[foo='I' s]", ["", "foo", "\u0130"]], + ["[foo='I' s]", ["", "foo", "\u0131"]], + ["[foo='\u0130' s]", ["", "foo", "i"]], + ["[foo='\u0131' s]", ["", "foo", "i"]], + ["[foo='\u0130' s]", ["", "foo", "I"]], + ["[foo='\u0131' s]", ["", "foo", "I"]], + ["[foo='bar' s]", ["", "foo", "x"], ["a", "foo", "BAR"]], + ["[|foo='bar' s]", ["", "foo", "x"], ["a", "foo", "BAR"]], + ["[foo='bar' s]", ["", "FOO", "bar"]], + ["[foo='\t' s] /* tab in selector */", ["", "foo", " "]], + ["[foo=' ' s] /* tab in attribute */", ["", "foo", "\t"]], + ["@namespace x 'a'; [x|foo='' s]", ["A", "foo", ""]], + ["@namespace x 'A'; [x|foo='' s]", ["a", "foo", ""]], + ["[foo='bar' s][foo='bar']", ["", "foo", "BAR"]], + ["[foo='bar' s]", ["", "baz", "BAR"]], + ["[foo='bar' s]", ["", "foo", "BAR"]], + ["[foo='a\u0308' s] /* COMBINING in both */", ["", "foo", "A\u0308"]], + ["[foo='A\u0308' s] /* COMBINING in both */", ["", "foo", "a\u0308"]], + ["[*|foo='bar' s]", ["", "foo", "x"], ["a", "foo", "x"], ["b", "foo", "BAR"], ["c", "foo", "x"]], + ["[*|foo='bar' s]", ["", "foo", "BAR"], ["a", "foo", "x"], ["b", "foo", "x"], ["c", "foo", "x"]], + ["[align='left' s]", ["", "align", "LEFT"]], + ["[align='LEFT' s]", ["", "align", "left"]], + ["[class~='a' s]", ["", "class", "X A B"]], + ["[class~='A' s]", ["", "class", "x a b"]], + ["[id^='a' s]", ["", "id", "AB"]], + ["[id$='A' s]", ["", "id", "xa"]], + ["[lang|='a' s]", ["", "lang", "A-B"]], + ["[lang*='A' s]", ["", "lang", "xab"]], + ["[*|lang='a' s]", ["http://www.w3.org/XML/1998/namespace", "lang", "A"]], + ["[*|lang='A' s]", ["http://www.w3.org/XML/1998/namespace", "lang", "a"]], + ["@namespace x 'http://www.w3.org/XML/1998/namespace'; [x|lang='A' s]", ["http://www.w3.org/XML/1998/namespace", "lang", "a"]], + ["[foo='bar' s][foo='bar' s]", ["", "foo", "BAR"]], + ["[foo='BAR' s][foo='bar']", ["", "foo", "BAR"]], + ["[foo='bar'][foo='BAR' s]", ["", "foo", "BAR"]], + ["[foo='BAR'][foo='bar' s]", ["", "foo", "BAR"]], + ["[foo='bar' s][foo='BAR']", ["", "foo", "bar"]], ]; var mode = "standards mode"; function format_attrs(attrs) { @@ -107,7 +216,11 @@ onload = function() { elm.setAttributeNS(attr[0], attr[1], attr[2]); }); } - match.forEach(function(arr) { + var localMatch = match.slice(); + if (global != xml) { + localMatch.push(...matchHTMLOnly); + } + localMatch.forEach(function(arr) { var s = arr[0]; var attrs = arr.slice(1); var ns_decl = s.substr(0, "@namespace".length) == "@namespace"; diff --git a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/syntax.html b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/syntax.html index be00f624e39..e5acde100b0 100644 --- a/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/syntax.html +++ b/tests/wpt/web-platform-tests/css/selectors/attribute-selectors/attribute-case/syntax.html @@ -5,13 +5,15 @@ <script src="/resources/testharnessreport.js"></script> <style></style> <div id=log></div> -<div id=test foo="BAR"></div> +<div id=test foo="BAR" baz="quux"></div> <iframe id="quirks" src="resources/syntax-quirks.html"></iframe> <iframe id="xml" src="resources/syntax-xml.xhtml"></iframe> <script> setup({explicit_done:true}); var valid = [ "[foo='BAR'] /* sanity check (valid) */", + "[baz='quux'] /* sanity check (valid) */", + // Case-insensitive selectors. "[foo='bar' i]", "[foo='bar' I]", "[foo=bar i]", @@ -28,6 +30,7 @@ var valid = [ "[foo='bar'\ri\r] /* \\r */", "[foo='bar' \\i]", "[foo='bar' \\69]", + "[foo='bar' \\49]", "[foo~='bar' i]", "[foo^='bar' i]", "[foo$='bar' i]", @@ -35,6 +38,31 @@ var valid = [ "[foo|='bar' i]", "[|foo='bar' i]", "[*|foo='bar' i]", + // Case-sensitive selectors. + "[baz='quux' s]", + "[baz='quux' S]", + "[baz=quux s]", + '[baz="quux" s]', + "[baz='quux's]", + "[baz='quux's ]", + "[baz='quux' s ]", + "[baz='quux' /**/ s]", + "[baz='quux' s /**/ ]", + "[baz='quux'/**/s/**/]", + "[baz=quux/**/s]", + "[baz='quux'\ts\t] /* \\t */", + "[baz='quux'\ns\n] /* \\n */", + "[baz='quux'\rs\r] /* \\r */", + "[baz='quux' \\s]", + "[baz='quux' \\73]", + "[baz='quux' \\53]", + "[baz~='quux' s]", + "[baz^='quux' s]", + "[baz$='quux' s]", + "[baz*='quux' s]", + "[baz|='quux' s]", + "[|baz='quux' s]", + "[*|baz='quux' s]", ]; var invalid = [ "[foo[ /* sanity check (invalid) */", diff --git a/tests/wpt/web-platform-tests/encoding/sniffing.html b/tests/wpt/web-platform-tests/encoding/sniffing.html new file mode 100644 index 00000000000..480be55515e --- /dev/null +++ b/tests/wpt/web-platform-tests/encoding/sniffing.html @@ -0,0 +1,12 @@ +<!doctype html> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<title>No (UTF-8) sniffing allowed</title> +<div id=log></div> +<div id=content> Hello World! </div> +<script> +test(() => { + assert_equals(document.getElementById("content").textContent, "\u00C2\u20AC\u00C2\u20AC Hello World! \u00C2\u20AC\u00C2\u20AC"); + assert_equals(document.characterSet, "windows-1252"); +}); +</script> diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-bufferbeforeonload.html b/tests/wpt/web-platform-tests/event-timing/event-timing-bufferbeforeonload.html index 22fc4d547b9..e021e22d8d5 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-bufferbeforeonload.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-bufferbeforeonload.html @@ -2,7 +2,7 @@ <html> <meta charset=utf-8 /> <title>Event Timing: buffer long-latency events before onload</title> -<button id='button' onclick='clickDelay()'>Generate a 'click' event</button> +<button id='button' onmousedown='clickDelay()'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/resources/testdriver.js></script> @@ -27,7 +27,7 @@ } function validateEntries() { - const entries = performance.getEntriesByName('click', 'event'); + const entries = performance.getEntriesByName('mousedown', 'event'); const entriesBeforeOnload = entries.filter( e => e.startTime < onloadStart); @@ -69,7 +69,8 @@ const observerPromise = new Promise((resolve, reject) => { let entryCount = 0; new PerformanceObserver(entryList => { - entryCount += entryList.getEntries().length; + entryCount += entryList.getEntries().filter( + entry => entry.name === 'mousedown').length; if (entryCount >= 2) resolve(); }).observe({ entryTypes: ['event'] }); diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-crossiframe.html b/tests/wpt/web-platform-tests/event-timing/event-timing-crossiframe.html index 0e77b3822f5..b5d14a4c7ae 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-crossiframe.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-crossiframe.html @@ -7,7 +7,7 @@ </head> <body> -<button id='button' onclick='1'>Generate a 'click' event</button> +<button id='button'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/resources/testdriver.js></script> @@ -22,7 +22,7 @@ let onloadStart; function validateEntries() { - const entries = performance.getEntriesByName('click', 'event'); + const entries = performance.getEntriesByName('mousedown', 'event'); assert_equals(entries.length, 1, "Observer of main frames should only capture main-frame event-timing entries." diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-observethenonload.html b/tests/wpt/web-platform-tests/event-timing/event-timing-observethenonload.html index 3d72e6aa8f6..3e2801f5496 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-observethenonload.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-observethenonload.html @@ -3,7 +3,7 @@ <meta charset=utf-8 /> <title>Event Timing: Performance observers can observe long-latency events </title> -<button id='button' onclick='1'>Generate a 'click' event</button> +<button id='button'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/resources/testdriver.js></script> @@ -77,7 +77,8 @@ async_test(function(t) { const observerPromise = new Promise((resolve, reject) => { new PerformanceObserver(function(entryList) { - observedEntries = observedEntries.concat(entryList.getEntries()); + observedEntries = observedEntries.concat(entryList.getEntries().filter( + entry => entry.name === 'mousedown')); if (observedEntries.length < 2) return; resolve(observedEntries); }).observe({ entryTypes: ['event'] }); @@ -93,7 +94,7 @@ Promise.all([observerPromise, bufferPromise]).then((results) => { timeAfterSecondClick = performance.now(); t.step(verifyObserverEntries.bind(null, results[0])); - t.step(verifyBuffer.bind(null, performance.getEntriesByName('click', 'event'))); + t.step(verifyBuffer.bind(null, performance.getEntriesByName('mousedown', 'event'))); t.done(); }); }); diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve-firstInput.html b/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve-firstInput.html index 22ac4cb45e9..6d188b69648 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve-firstInput.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve-firstInput.html @@ -2,7 +2,7 @@ <html> <meta charset=utf-8 /> <title>Event Timing: buffer long-latency events before onload</title> -<button id='button' onclick='1'>Generate a 'click' event</button> +<button id='button'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/resources/testdriver.js></script> @@ -23,7 +23,8 @@ let numFirstInputObserved = 0; let numEventsObserved = 0; new PerformanceObserver(t.step_func((entryList, obs) => { - const observedEntries = entryList.getEntries(); + const observedEntries = entryList.getEntries().filter( + entry => entry.name === 'mousedown'); numEventsObserved += observedEntries.filter(entry => entry.entryType == 'event').length; numFirstInputObserved += observedEntries.filter(entry => diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve.html b/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve.html index 07cc236cb47..1c25a33d979 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-onloadthenobserve.html @@ -4,7 +4,7 @@ <title>Event Timing: long-latency events after onload and before observer registration are lost </title> -<button id='button' onclick='1'>Generate a 'click' event</button> +<button id='button'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/resources/testdriver.js></script> @@ -18,7 +18,7 @@ registration are lost function verifyBufferAndObserverEntries(observedEntries) { // Verify buffer entries - const bufferedEntries = performance.getEntriesByName('click', 'event'); + const bufferedEntries = performance.getEntriesByName('mousedown', 'event'); const bufferedEntriesBeforeObserver = bufferedEntries.filter(e => e.startTime < observerStart); assert_equals(bufferedEntries.length, 0, @@ -42,7 +42,8 @@ registration are lost function startObserver(t) { new PerformanceObserver(t.step_func_done((entryList, obs) => { callbackTime = performance.now(); - const observedEntries = entryList.getEntries(); + const observedEntries = entryList.getEntries().filter( + entry => entry.name === 'mousedown'); verifyBufferAndObserverEntries(observedEntries); })).observe({ entryTypes: ['event'] }); observerStart = performance.now(); diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-only-observe-firstInput.html b/tests/wpt/web-platform-tests/event-timing/event-timing-only-observe-firstInput.html index 2f24d519c89..2ab4894d617 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-only-observe-firstInput.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-only-observe-firstInput.html @@ -2,7 +2,7 @@ <html> <meta charset=utf-8 /> <title>Event Timing: only observe the first input</title> -<button id='button' onclick='1'>Generate a 'click' event</button> +<button id='button'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/resources/testdriver.js></script> @@ -24,10 +24,11 @@ new PerformanceObserver(t.step_func((entryList) => { assert_false(hasObservedFirstInput); hasObservedFirstInput = true; - const observedEntries = entryList.getEntries(); + const observedEntries = entryList.getEntries().filter( + entry => entry.name === 'mousedown'); assert_equals(observedEntries.length, 1); assert_equals(observedEntries[0].entryType, 'firstInput'); - assert_equals(observedEntries[0].name, 'click'); + assert_equals(observedEntries[0].name, 'mousedown'); })).observe({ entryTypes: ['firstInput'] }); on_event(window, 'load', () => { clickAndBlockMain('button').then(() => { diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-retrievability.html b/tests/wpt/web-platform-tests/event-timing/event-timing-retrievability.html index f38761b469d..abc962d8fd8 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-retrievability.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-retrievability.html @@ -2,7 +2,7 @@ <html> <meta charset=utf-8> <title>Event Timing: make sure event-timing entries are retrievable by existing perf APIs.</title> -<button id='button' onclick='1'>Generate a 'click' event</button> +<button id='button'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src=/resources/testdriver.js></script> @@ -13,7 +13,7 @@ <script> function validateEntries() { - const entriesByName = performance.getEntriesByName('click', 'event'); + const entriesByName = performance.getEntriesByName('mousedown', 'event'); const entriesByType = performance.getEntriesByType('event'); const allEntries = performance.getEntries(); assert_equals(entriesByName.length, 1, 'event-timing entry should be retrievable by getEntriesByName'); diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-retrieve-firstInput.html b/tests/wpt/web-platform-tests/event-timing/event-timing-retrieve-firstInput.html index ded00e61c75..b1b020ea699 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-retrieve-firstInput.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-retrieve-firstInput.html @@ -21,7 +21,7 @@ assert_equals(performance.getEntriesByType('firstInput').length, 1, "There should be a firstInput entry in the performance timeline"); const entry = performance.getEntriesByType('firstInput')[0]; - assert_equals(entry.name, 'click'); + assert_equals(entry.name, 'mousedown'); assert_equals(entry.entryType, 'firstInput'); assert_greater_than(entry.duration, 50, "The first input was a long one."); diff --git a/tests/wpt/web-platform-tests/event-timing/event-timing-timingconditions.html b/tests/wpt/web-platform-tests/event-timing/event-timing-timingconditions.html index 1e5dd2fd65c..03994c44e80 100644 --- a/tests/wpt/web-platform-tests/event-timing/event-timing-timingconditions.html +++ b/tests/wpt/web-platform-tests/event-timing/event-timing-timingconditions.html @@ -3,7 +3,7 @@ <meta charset=utf-8 /> <title>Event Timing only times certain types of trusted event. </title> -<button id='button' onclick='mainThreadBusy(60)' +<button id='button' onmousedown='mainThreadBusy(60)' onfocus='mainThreadBusy(60)'>Generate a 'click' event</button> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> @@ -23,7 +23,7 @@ function untrustedClickAndBlockMain(id) { const target = document.getElementById(id); // Block mainthread in the callback, as dispatchEvent() is a sync call. - target.dispatchEvent(new MouseEvent('click')); + target.dispatchEvent(new MouseEvent('mousedown')); } function trustedFocusAndBlockMain(id) { @@ -36,11 +36,12 @@ async_test(function(t) { new PerformanceObserver(t.step_func_done(entryList => { const observerCallbackTime = performance.now(); - const entries = entryList.getEntries(); + const entries = entryList.getEntries().filter( + entry => entry.name === 'mousedown'); assert_equals(entries.length, 1, "Should only observe one entry: " + JSON.stringify(entries) + "."); - assert_equals(entries[0].name, 'click', + assert_equals(entries[0].name, 'mousedown', "The observed entry should be a click"); assert_less_than(entries[0].startTime, observerCallbackTime, "The startTime should be before observerCallbackTime"); diff --git a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-crossiframe-childframe.html b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-crossiframe-childframe.html index 7491fd88cb3..b0fbdeb459c 100644 --- a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-crossiframe-childframe.html +++ b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-crossiframe-childframe.html @@ -1,7 +1,7 @@ <!DOCType html> <html> <script src=event-timing-support.js></script> -<button id='button_child_frame' onclick='2'>Generate a 'click' event</button> +<button id='button_child_frame'>Generate a 'click' event</button> <img src=slow-image.py> <script> const clickTimeMin = performance.now(); @@ -9,7 +9,7 @@ const processingStartMin = performance.now(); const observerPromise = new Promise((resolve, reject) => { new PerformanceObserver((entryList) => { - resolve(entryList.getEntries()); + resolve(entryList.getEntries().filter(entry => entry.name === 'mousedown')); }).observe({ entryTypes: ['event'] }); }); window.addEventListener('load', e => { diff --git a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-support.js b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-support.js index a2a583c8989..1f3d9f7d4e1 100644 --- a/tests/wpt/web-platform-tests/event-timing/resources/event-timing-support.js +++ b/tests/wpt/web-platform-tests/event-timing/resources/event-timing-support.js @@ -11,9 +11,9 @@ function clickOnElement(id, callback) { mainThreadBusy(60); if (callback) callback(); - element.removeEventListener("click", clickHandler); + element.removeEventListener("mousedown", clickHandler); }; - element.addEventListener("click", clickHandler); + element.addEventListener("mousedown", clickHandler); test_driver.click(element); } @@ -27,7 +27,7 @@ function mainThreadBusy(duration) { // the timings of the 'firstInput' entry should be equal to those of this entry. function verifyClickEvent(entry, is_first=false) { assert_true(entry.cancelable); - assert_equals(entry.name, 'click'); + assert_equals(entry.name, 'mousedown'); assert_equals(entry.entryType, 'event'); assert_greater_than(entry.duration, 50, "The entry's duration should be greater than 50ms."); diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html index 4d924e4aa39..be7806e1ee5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-button-element/button-events.html @@ -16,6 +16,13 @@ var btn = document.getElementById("btn"), menu_btn = document.getElementById("menu_btn"), t1 = async_test("The submit event must be fired when click a button in submit status"), t2 = async_test("The reset event must be fired when click a button in reset status"); + t3 = async_test("type=button shouldn't trigger submit or reset events"); + t4 = async_test("Switching from type=button to type=submit should submit the form"); + t5 = async_test("Switching from type=button to type=reset should reset the form"); + t6 = async_test("Innermost button should submit its form"); + t7 = async_test("Innermost button should reset its form"); + t8 = async_test("Anchor inside a button should be prevent button activation"); + t9 = async_test("input type=submit inside a button should be prevent button activation"); document.forms.fm1.onsubmit = t1.step_func(function (evt) { evt.preventDefault(); @@ -46,4 +53,114 @@ t2.step(function () { btn.click(); }); +t3.step(function () { + btn.type = "button"; + assert_equals(btn.type, "button", "The button type should be 'button'."); + document.forms.fm1.onsubmit = t3.step_func(function (evt) { + assert_unreached("type=button shouldn't trigger submission."); + }); + document.forms.fm1.onreset = t3.step_func(function (evt) { + assert_unreached("type=button shouldn't reset the form."); + }); + btn.click(); + t3.done(); +}); + +t4.step(function () { + btn.type = "button"; + btn.onclick = function() { btn.type = "submit"; } + document.forms.fm1.onsubmit = t4.step_func(function (evt) { + evt.preventDefault(); + assert_equals(btn.type, "submit", "The button type should be 'submit'."); + t4.done(); + }); + btn.click(); +}); + +t5.step(function () { + btn.type = "button"; + btn.onclick = function() { btn.type = "reset"; } + document.forms.fm1.onreset = t5.step_func(function (evt) { + evt.preventDefault(); + assert_equals(btn.type, "reset", "The button type should be 'reset'."); + t5.done(); + }); + btn.click(); +}); + +t6.step(function () { + btn.type = "submit"; + btn.innerHTML = ""; + var fm2 = document.createElement("form"); + var btn2 = document.createElement("button"); + btn2.type = "submit"; + fm2.appendChild(btn2); + btn.appendChild(fm2); + assert_true(document.forms.fm1.contains(fm2), "Should have nested forms"); + + function submitListener(evt) { + evt.preventDefault(); + assert_equals(evt.target, fm2, "Innermost form should have got the submit event"); + }; + window.addEventListener("submit", submitListener, true); + btn2.click(); + window.removeEventListener("submit", submitListener, true); + t6.done(); +}); + +t7.step(function () { + btn.type = "reset"; + btn.innerHTML = ""; + var fm2 = document.createElement("form"); + var btn2 = document.createElement("button"); + btn2.type = "reset"; + fm2.appendChild(btn2); + btn.appendChild(fm2); + assert_true(document.forms.fm1.contains(fm2), "Should have nested forms"); + + function resetListener(evt) { + evt.currentTarget.removeEventListener(evt.type, resetListener, true); + evt.preventDefault(); + assert_equals(evt.target, fm2, "Innermost form should have got the reset event"); + t7.done(); + }; + window.addEventListener("reset", resetListener, true); + btn2.click(); +}); + +t8.step(function () { + btn.type = "submit"; + btn.innerHTML = ""; + var a = document.createElement("a"); + a.href = "#"; + btn.appendChild(a); + document.forms.fm1.onsubmit = t8.step_func(function (evt) { + assert_unreached("type=button shouldn't trigger submission."); + }); + + a.click(); + t8.done(); +}); + +t9.step(function () { + btn.type = "submit"; + btn.innerHTML = ""; + var fm2 = document.createElement("form"); + var btn2 = document.createElement("input"); + btn2.type = "submit"; + fm2.appendChild(btn2); + btn.appendChild(fm2); + assert_true(document.forms.fm1.contains(fm2), "Should have nested forms"); + + function submitListener(evt) { + evt.preventDefault(); + assert_equals(evt.target, fm2, "Innermost form should have got the submit event"); + }; + + window.addEventListener("submit", submitListener, true); + btn2.click(); + window.removeEventListener("submit", submitListener, true); + t9.done(); +}); + </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size-ref.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size-ref.html new file mode 100644 index 00000000000..0f8ee37b06b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size-ref.html @@ -0,0 +1,99 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>Reference: type=range intrinsic size</title> + <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1512066"> + <style> +html,body { + color:black; background-color:white; font:16px/1 monospace; +} + +.flex { + display: inline-flex; + width: 0; + border: 1px solid; + justify-items:start; +} +.flex2 { + display: inline-flex; + border: 1px solid; + justify-items:start; +} +.grid { + display: inline-grid; + grid: auto / 0; + border: 1px solid; + justify-items:start; +} +.grid2 { + display: inline-grid; + border: 1px solid; + justify-items:start; +} +.ib { + display: inline-block; + width: 0; + border: 1px solid; + justify-items:start; +} + +input { + width: -moz-max-content; + width: max-content; + min-width: 0; +} +input.min { + min-width: -moz-min-content; + min-width: min-content; +} +input.mbp0 { + margin-left: 0; + margin-right: 0; + padding: 0; + border: 0; +} + </style> +</head> +<body> + +<div class="flex"><input type="range" class="min"></div><br> +<div class="flex"><input type="range" style="width:0"></div><br> +<div class="flex"><input type="range" class="min"></div><br> +<div class="flex"><input type="range" class="min"></div><br> +<div class="flex"><input type="range" class="min"></div><br> +<br> + +<div class="flex2"><input type="range"></div> +<div class="flex2" style="width:3px"><input type="range" style="width:3px" class="mbp0"></div> +<div class="flex2" style="width:30px"><input type="range" class="mbp0"></div> +<div class="flex2"><input type="range"></div> +<div class="flex2"><input type="range"></div> +<div class="flex2"><input type="range"></div> +<div class="flex2"><input type="range"></div> +<br> + +<div class="grid"><input type="range" style="width:0"></div><br> +<div class="grid"><input type="range" style="width:0"></div><br> +<div class="grid" style="justify-items:start"><input type="range"></div><br> + +<div class="grid2"><input type="range"></div> +<div class="grid2"><input type="range" style="min-width:0"></div> +<div class="grid2" style="width:3px"><input type="range" style="width:3px" class="mbp0"></div> +<div class="flex2" style="width:30px"><input type="range" class="mbp0"></div> +<div class="flex2" style="width:30px"><input type="range" class="mbp0"></div> +<div class="grid2" style="justify-items:start"><input type="range"></div> + +<br> + +<div class="ib"><input type="range"></div><br> +<div class="ib"><input type="range"></div><br> + +<input type="range"> +<input type="range" + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size.html new file mode 100644 index 00000000000..c45a180063f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/range-intrinsic-size.html @@ -0,0 +1,85 @@ +<!DOCTYPE HTML> +<!-- + Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ +--> +<html><head> + <meta charset="utf-8"> + <title>Test: type=range intrinsic size</title> + <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1512066"> + <link rel="match" href="range-intrinsic-size-ref.html"> + <style> +html,body { + color:black; background-color:white; font:16px/1 monospace; +} + +.flex { + display: inline-flex; + width: 0; + border: 1px solid; +} +.flex2 { + display: inline-flex; + border: 1px solid; +} +.grid { + display: inline-grid; + grid: auto / 0; + border: 1px solid; +} +.grid2 { + display: inline-grid; + border: 1px solid; +} +.ib { + display: inline-block; + width: 0; + border: 1px solid; +} +input.mbp0 { + margin-left: 0; + margin-right: 0; + padding: 0; + border: 0; +} + </style> +</head> +<body> + +<div class="flex"><input type="range"></div><br> +<div class="flex"><input type="range" style="min-width:0"></div><br> +<div class="flex" style="justify-items:start"><input type="range"></div><br> +<div class="flex" style="-webkit-box-pack: start"><input type="range"></div><br> +<div class="flex" style="-webkit-box-pack: start; justify-content: flex-start;"><input type="range"></div><br> +<br> + +<div class="flex2"><input type="range"></div> +<div class="flex2" style="width:3px"><input type="range" style="min-width:0" class="mbp0"></div> +<div class="flex2" style="width:30px"><input type="range" style="min-width:0" class="mbp0"></div> +<div class="flex2"><input type="range" style="min-width:0"></div> +<div class="flex2" style="justify-items:start"><input type="range"></div> +<div class="flex2" style="-webkit-box-pack: start"><input type="range"></div> +<div class="flex2" style="-webkit-box-pack: start; justify-content: flex-start;"><input type="range"></div> +<br> + +<div class="grid"><input type="range"></div><br> +<div class="grid"><input type="range" style="min-width:0"></div><br> +<div class="grid" style="justify-items:start"><input type="range"></div><br> + +<div class="grid2"><input type="range"></div> +<div class="grid2"><input type="range" style="min-width:0"></div> +<div class="grid2" style="width:3px"><input type="range" style="min-width:0" class="mbp0"></div> +<div class="grid2" style="width:30px"><input type="range" style="min-width:0" class="mbp0"></div> +<div class="grid2" style="grid:auto/30px"><input type="range" class="mbp0"></div> +<div class="grid2" style="justify-items:start"><input type="range"></div> + +<br> + +<div class="ib"><input type="range"></div><br> +<div class="ib"><input type="range" style="min-width:0"></div><br> + +<input type="range" style="width:-moz-min-content; width:min-content;"> +<input type="range" style="width:-moz-max-content; width:max-content;"> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html index 1b255faf7e1..61643c5f08c 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/muted-errors.sub.html @@ -53,6 +53,16 @@ "same-origin url should be muted"); var check5 = test5.step_func_done(() => check(true)); + const test6 = async_test("Non-synthetic errors for same-origin scripts redirected to a " + + "cross-origin URL and redirected back to same-origin should be " + + "muted"); + const check6 = test6.step_func_done(() => check(true)); + + const test7 = async_test("Syntax error for same-origin script redirected to a " + + "cross-origin URL and redirected back to same-origin should be " + + "muted"); + const check7 = test7.step_func_done(() => check(true)); + function unreachable() { log.push("unexpected"); } </script> <script src="cacheable-script-throw.py" onerror="test1.unreached_func()()" onload="check1()"></script> @@ -67,3 +77,9 @@ onerror="test4.unreached_func()()" onload="check4()"></script> <script src="//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location= //{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/cacheable-script-throw.py?cross-same" onerror="test5.unreached_func()()" onload="check5()"></script> +<script src="//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location= +//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/resources/throw.js" +onerror="test6.unreached_func()()" onload="check6()"></script> +<script src="//{{domains[www2]}}:{{ports[http][0]}}/fetch/api/resources/redirect.py?location= +//{{host}}:{{ports[http][0]}}/html/semantics/scripting-1/the-script-element/resources/syntax-error.js" +onerror="test7.unreached_func()()" onload="check7()"></script> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/syntax-error.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/syntax-error.js new file mode 100644 index 00000000000..40dc81dcfac --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/syntax-error.js @@ -0,0 +1 @@ +This cannot be parsed as JavaScript diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/throw.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/throw.js new file mode 100644 index 00000000000..be53dd1ef3f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/resources/throw.js @@ -0,0 +1 @@ +document.querySelector(":::not-going-to-be-valid"); diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/047-1.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/047-1.html new file mode 100644 index 00000000000..6a43faec510 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/047-1.html @@ -0,0 +1,7 @@ +<script> +onload = opener.t.step_func_done(function() { + document.write("<body>Filler Text<div id='log'></div>"); + opener.assert_equals(document.body.textContent, "Filler Text"); +}); +</script> +<body>FAIL diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/047.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/047.html index 51faf6c85f1..677d3e17869 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/047.html +++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/047.html @@ -1,15 +1,11 @@ <!doctype html> <title>document.write</title> -<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> -var t = async_test(); -onload = function() { - t.step(function() { - document.write("<body>Filler Text<div id='log'></div>"); - assert_equals(document.body.textContent, "Filler Text"); - }); - t.done(); -}; +var win; +var t = async_test(() => { + win = window.open("047-1.html"); +}); +t.add_cleanup(() => win.close()); </script> -<body>FAIL -<div id="log"></div> diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/048.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/048.html deleted file mode 100644 index 51faf6c85f1..00000000000 --- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/document-write/048.html +++ /dev/null @@ -1,15 +0,0 @@ -<!doctype html> -<title>document.write</title> -<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script> -<script> -var t = async_test(); -onload = function() { - t.step(function() { - document.write("<body>Filler Text<div id='log'></div>"); - assert_equals(document.body.textContent, "Filler Text"); - }); - t.done(); -}; -</script> -<body>FAIL -<div id="log"></div> diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html index 4a6bee61bef..e8055d99f35 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html @@ -11,40 +11,7 @@ setup({ explicit_done: true }); handlersListPromise.then(({ shadowedHandlers, notShadowedHandlers }) => { - const createdBody = document.createElement("body"); - for (const [description, body, altBody] of [ - ["document.body", document.body, createdBody], - ['document.createElement("body")', createdBody, document.body] - ]) { - const f = () => 0; - - shadowedHandlers.forEach(function(handler) { - test(function() { - body['on' + handler] = f; - assert_equals(window['on' + handler], f, "window should reflect"); - assert_equals(altBody['on' + handler], f, "alternative body should reflect"); - }, `shadowed ${handler} (${description})`); - }); - notShadowedHandlers.forEach(function(handler) { - test(function() { - body['on' + handler] = f; - assert_equals(window['on' + handler], null, "window should reflect"); - assert_equals(altBody['on' + handler], null, "alternative body should reflect"); - }, `not shadowed ${handler} (${description})`); - }); - - [...shadowedHandlers, ...notShadowedHandlers].forEach(function(handler) { - body['on' + handler] = null; - }); - - shadowedHandlers.forEach(function(handler) { - test(function() { - assert_equals(body['on' + handler], null, "body should reflect changes to itself"); - assert_equals(window['on' + handler], null, "window should reflect"); - assert_equals(altBody['on' + handler], null, "alternative body should reflect"); - }, `shadowed ${handler} removal (${description})`); - }); - } + eventHandlerTest(shadowedHandlers, notShadowedHandlers, "body"); done(); }); diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html new file mode 100644 index 00000000000..ecfe90e88ea --- /dev/null +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-frameset-window.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<meta charset=utf-8> +<title>event handlers</title> +<link rel="author" title="Intel" href="http://www.intel.com"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/WebIDLParser.js"></script> +<script src="resources/event-handler-body.js"></script> +<script> +setup({ explicit_done: true }); + +handlersListPromise.then(({ shadowedHandlers, notShadowedHandlers }) => { + eventHandlerTest(shadowedHandlers, notShadowedHandlers, "frameset"); + + // The testharness framework appends test results to document.body, + // show test results in frame after test done. + add_completion_callback(() => { + const log_elem = document.getElementById("log"); + const frame_elem = document.querySelector("frame"); + frame_elem.contentDocument.body.innerHTML = log_elem.innerHTML; + }); + + done(); +}); +</script> +<frameset> + <frame src="/common/blank.html" /> +</frameset> diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-window-body.html b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-window-body.html deleted file mode 100644 index 1ceed5278de..00000000000 --- a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-window-body.html +++ /dev/null @@ -1,49 +0,0 @@ -<!DOCTYPE html> -<title>HTMLBodyElement event handlers</title> - -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/resources/WebIDLParser.js"></script> -<script src="resources/event-handler-body.js"></script> -<div id="log"></div> -<body> -<script> -setup({ explicit_done: true }); - -function f() { - return 0; -} - -handlersListPromise.then(({ shadowedHandlers, notShadowedHandlers }) => { - const body = document.createElement("body"); - - shadowedHandlers.forEach(function(handler) { - test(function() { - window['on' + handler] = f; - assert_equals(document.body['on' + handler], f, "document.body should reflect"); - assert_equals(body['on' + handler], f, "document.createElement('body') should reflect"); - }, `shadowed ${handler}`); - }); - notShadowedHandlers.forEach(function(handler) { - test(function() { - window['on' + handler] = f; - assert_equals(document.body['on' + handler], null, "document.body should reflect"); - assert_equals(body['on' + handler], null, "document.createElement('body') should reflect"); - }, `not shadowed ${handler}`); - }); - - [...shadowedHandlers, ...notShadowedHandlers].forEach(function(handler) { - window['on' + handler] = null; - }); - - shadowedHandlers.forEach(function(handler) { - test(function() { - assert_equals(window['on' + handler], null, "window should reflect changes to itself"); - assert_equals(document.body['on' + handler], null, "document.body should reflect"); - assert_equals(body['on' + handler], null, "document.createElement('body') should reflect"); - }, `shadowed ${handler} removal`); - }); - - done(); -}); -</script> diff --git a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/resources/event-handler-body.js b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/resources/event-handler-body.js index 656903cf99e..0a9f36a732d 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/scripting/events/resources/event-handler-body.js +++ b/tests/wpt/web-platform-tests/html/webappapis/scripting/events/resources/event-handler-body.js @@ -24,3 +24,42 @@ const handlersListPromise = fetch("/interfaces/html.idl").then(res => res.text() notShadowedHandlers }; }); + +function eventHandlerTest(shadowedHandlers, notShadowedHandlers, element) { + const altBody = document.createElement(element); + for (const [des, obj1, obj2, obj3, des1, des2, des3] of [ + ["document.body", document.body, altBody, window, "body", "alternative body", "window"], + [`document.createElement("${element}")`, altBody, document.body, window, "alternative body", "body", "window"], + ["window", window, document.body, altBody, "window", "body", "alternative body"] + ]) { + const f = () => 0; + + shadowedHandlers.forEach(handler => { + const eventHandler = obj1['on' + handler]; + test(() => { + obj1['on' + handler] = f; + assert_equals(obj2['on' + handler], f, `${des2} should reflect`); + assert_equals(obj3['on' + handler], f, `${des3} should reflect`); + }, `shadowed ${handler} (${des})`); + obj1['on' + handler] = eventHandler; + }); + + notShadowedHandlers.forEach(handler => { + const eventHandler = obj1['on' + handler]; + test(() => { + obj1['on' + handler] = f; + assert_equals(obj2['on' + handler], null, `${des2} should reflect`); + assert_equals(obj3['on' + handler], null, `${des3} should reflect`); + }, `not shadowed ${handler} (${des})`); + obj1['on' + handler] = eventHandler; + }); + + shadowedHandlers.forEach(handler => { + test(() => { + assert_equals(obj1['on' + handler], null, `${des1} should reflect changes to itself`); + assert_equals(obj2['on' + handler], null, `${des2} should reflect`); + assert_equals(obj3['on' + handler], null, `${des3} should reflect`); + }, `shadowed ${handler} removal (${des})`); + }); + } +} diff --git a/tests/wpt/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html b/tests/wpt/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html index d090aad609d..006827f186e 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html +++ b/tests/wpt/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/protocol.https.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <meta charset='utf-8'> -<title>registerProtocolHandler()</title> +<title>protocol handlers</title> <script src='/resources/testharness.js'></script> <script src='/resources/testharnessreport.js'></script> @@ -11,141 +11,80 @@ registration requests on a page, you might need to disable or significantly increase that limit for the tests below to run.</p> -<div id='log'></div> - <script type='text/javascript'> - -test(function () { +test(() => { assert_idl_attribute(navigator, 'registerProtocolHandler'); }, 'the registerProtocolHandler method should exist on the navigator object'); -test(function () { - navigator.registerProtocolHandler('tel', location.href + '/%s', 'foo'); -}, 'a handler with valid arguments should work'); - +test(() => { + assert_idl_attribute(navigator, 'unregisterProtocolHandler'); +}, 'the unregisterProtocolHandler method should exist on the navigator object'); /* URL argument */ -test(function () { - navigator.registerProtocolHandler('tel', '%s', 'foo'); -}, 'a relative URL should work'); - -test(function () { - navigator.registerProtocolHandler('tel', location.href + '#%s', 'foo'); -}, 'a URL with a fragment identifier should work'); - -test(function () { - navigator.registerProtocolHandler('tel', location.href + '?foo=%s', 'foo'); -}, 'a URL with a query string should work'); - -test(function () { - navigator.registerProtocolHandler('tel', location.href + '?foo=%s&bar', 'foo'); -}, 'a URL with a multi-argument query string should work'); - -test(function () { - navigator.registerProtocolHandler('tel', location.href + '/%s/bar/baz/', 'foo'); -}, 'a URL with the passed string as a directory name should work'); - -test(function () { - navigator.registerProtocolHandler('tel', location.href + '/%s/bar/baz/?foo=1337&bar#baz', 'foo'); -}, 'a URL with the passed string as a directory name followed by a query string and fragment identifier should work'); - -test(function () { - navigator.registerProtocolHandler('tel', location.href + '/%s/foo/%s/', 'foo'); -}, 'a URL with the passed string included twice should work'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto', '', 'foo') } ); -}, 'an empty url argument should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler('mailto', 'http://%s.com', 'foo') } ); -}, '%s instead of domain name should throw SECURITY_ERR'); - -test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler('mailto', 'http://%s.example.com', 'foo') } ); -}, '%s instead of subdomain name should throw SECURITY_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto', location.href + '', 'foo') } ); -}, 'a url argument without %s should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto', 'http://example.com', 'foo') } ); -}, 'a url argument pointing to a different domain name, without %s should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto', location.href + '/%', 'foo') } ); -}, 'a url argument without %s (but with %) should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto', location.href + '/%a', 'foo') } ); -}, 'a url argument without %s (but with %a) should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler('mailto', 'http://example.com/%s', 'foo') } ); -}, 'a url argument pointing to a different domain name should throw SECURITY_ERR'); - -test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler('mailto', 'https://example.com/%s', 'foo') } ); -}, 'a url argument pointing to a different domain name should throw SECURITY_ERR (2)'); - -test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler('mailto', 'http://foobar.example.com/%s', 'foo') } ); -}, 'a url argument pointing to a different domain name should throw SECURITY_ERR (3)'); +const vaild_urls = [ + '%s', + location.href + '/%s', + location.href + '#%s', + location.href + '?foo=%s', + location.href + '?foo=%s&bar', + location.href + '/%s/bar/baz/', + location.href + '/%s/bar/baz/?foo=1337&bar#baz', + location.href + '/%s/foo/%s/', +]; +for (const url of vaild_urls) { + test(() => { + navigator.registerProtocolHandler('tel', url, 'foo'); + }, 'registerProtocolHandler: Valid URL "' + url + '" should work.'); + + test(() => { + navigator.unregisterProtocolHandler('tel', url); + }, 'unregisterProtocolHandler: Valid URL "' + url + '" should work.'); +} -test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler('mailto', 'mailto:%s@example.com', 'foo') } ); -}, 'looping handlers should throw SECURITY_ERR'); +const invalid_urls1 = [ + '', + '%S', + location.href + '', + location.href + '/%', + location.href + '/%a', + 'http://example.com', + 'http://[v8.:::]//url=%s', +]; + +for (const url of invalid_urls1) { + test(() => { + assert_throws('SYNTAX_ERR', () => { navigator.registerProtocolHandler('mailto', url, 'foo'); }); + }, 'registerProtocolHandler: Invalid URL "' + url + '" should throw SYNTAX_ERR.'); + + test(() => { + assert_throws('SYNTAX_ERR', () => { navigator.unregisterProtocolHandler('mailto', url); }); + }, 'unregisterProtocolHandler: Invalid URL "' + url + '" should throw SYNTAX_ERR.'); +} -test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler('sms', 'tel:%s', 'foo') } ); -}, 'a url argument pointing to a non-http[s] scheme should throw SECURITY_ERR due to not being of the same origin'); +const invaild_urls2 = [ + 'http://%s.com', + 'http://%s.example.com', + 'http://example.com/%s', + 'https://example.com/%s', + 'http://foobar.example.com/%s', + 'mailto:%s@example.com', + 'mailto:%s', +]; +for (const url of invaild_urls2) { + test(() => { + assert_throws('SECURITY_ERR', () => { navigator.registerProtocolHandler('mailto', url, 'foo'); }); + }, 'registerProtocolHandler: Invalid URL "' + url + '" should throw SECURITY_ERR.'); + + test(() => { + assert_throws('SECURITY_ERR', () => { navigator.unregisterProtocolHandler('mailto', url); }); + }, 'unregisterProtocolHandler: Invalid URL "' + url + '" should throw SECURITY_ERR.'); +} /* Protocol argument */ -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('unrecognized', location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing an unrecognized scheme should throw SECURITY_ERR'); /* This is a whitelist, not a blacklist. */ - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto:', location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing : should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto://', location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing :// should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('http://', location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing http:// should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto' + String.fromCharCode(0), location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing a null character should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailtoo' + String.fromCharCode(8), location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing a backspace character should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mailto' + String.fromCharCode(10), location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing a LF character should throw SYNTAX_ERR'); - -test(function () { - assert_throws('SYNTAX_ERR', function () { navigator.registerProtocolHandler('mаilto', location.href + '/%a', 'foo') } ); -}, 'a protocol argument containing non-alphanumeric characters (like a cyrillic “а”) should throw SYNTAX_ERR'); - -test(function () { - navigator.registerProtocolHandler('TEL', location.href + '/%s', 'foo'); -}, 'a protocol argument of “TEL” should be equivalent to “tel”'); - -test(function () { - navigator.registerProtocolHandler('teL', location.href + '/%s', 'foo'); -}, 'a protocol argument of “teL” should be equivalent to “tel”'); - /* Overriding any of the following protocols must never be allowed. That would * break the browser. */ -var blacklist = new Array( +const blacklist = [ 'about', 'attachment', 'blob', @@ -170,45 +109,76 @@ var blacklist = new Array( 'view-source', 'ws', 'wss', - 'wyciwyg'); - -for ( var bi=0, bl=blacklist.length; bi<bl; ++bi ){ - - test(function () { - assert_throws('SECURITY_ERR', function () { navigator.registerProtocolHandler(blacklist[bi], location.href + '/%s', 'foo') } ); - }, 'attempting to override the ' + blacklist[bi] + ' protocol should throw SECURITY_ERR'); - + 'wyciwyg', + /*other invalid schemes*/ + 'unrecognized', + 'mаilto', /*a cyrillic "а"*/ + 'mailto:', + 'mailto://', + 'mailto' + String.fromCharCode(0), + 'mailtoo' + String.fromCharCode(8), + 'mailto' + String.fromCharCode(10), + 'http://', + 'ssh:/', + 'magnet:+', + 'tel:sip', + 'web+', +]; +for (const scheme of blacklist) { + test(() => { + assert_throws('SECURITY_ERR', () => { navigator.registerProtocolHandler(scheme, location.href + '/%s', 'foo'); }); + }, 'registerProtocolHandler: Attempting to override the "' + scheme + '" protocol should throw SECURITY_ERR.'); + + test(() => { + assert_throws('SECURITY_ERR', () => { navigator.unregisterProtocolHandler(scheme, location.href + '/%s', 'foo'); }); + }, 'unregisterProtocolHandler: Attempting to override the "' + scheme + '" protocol should throw SECURITY_ERR.'); } /* The following protocols must be possible to override. * We're just testing that the call goes through here. Whether or not they * actually work as handlers is covered by the interactive tests. */ -var whitelist = new Array( + +const safelist = [ + /* safelisted schemes listed in + * https://html.spec.whatwg.org/multipage/system-state.html#safelisted-scheme */ + 'bitcoin', 'geo', 'im', 'irc', 'ircs', + 'magnet', 'mailto', 'mms', 'news', 'nntp', + 'openpgp4fpr', + 'sip', 'sms', 'smsto', + 'ssh', 'tel', 'urn', 'webcal', 'wtai', - 'xmpp'); - -for ( var wi=0, wl=whitelist.length; wi<wl; ++wi ){ - - test(function () { - navigator.registerProtocolHandler(whitelist[wi], location.href + '/%s', 'foo'); - assert_true(true); - }, 'overriding the ' + whitelist[wi] + ' protocol should work'); - + 'xmpp', + /*other vaild schemes*/ + 'BitcoIn', + 'Irc', + 'MagneT', + 'SmsTo', + 'TEL', + 'teL', + 'WebCAL', + 'WTAI', + 'web+myprotocol', +]; +for (const scheme of safelist) { + test(() => { + navigator.registerProtocolHandler(scheme, location.href + '/%s', "foo"); + }, 'registerProtocolHandler: overriding the "' + scheme + '" protocol should work'); + + test(() => { + navigator.unregisterProtocolHandler(scheme, location.href + '/%s'); + }, 'unregisterProtocolHandler: overriding the "' + scheme + '" protocol should work'); } </script> - -</body> -</html> diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementPosition.html.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementPosition.html.ini index 750dd055dbd..9ae71a6e73e 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementPosition.html.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementPosition.html.ini @@ -1,7 +1,4 @@ [elementPosition.html] - expected: - if product == "chrome": ERROR - [TestDriver actions: element position] expected: if product == "safari": FAIL diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini index 7a6cf82bbd3..a06134a6ea4 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini @@ -1,3 +1,4 @@ [elementTiming.html] - expected: - if product == "chrome": ERROR + [TestDriver actions: element timing] + expected: + if product == "chrome": FAIL diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/eventOrder.html.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/eventOrder.html.ini index 64f3f2f8c48..00916c7af3f 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/eventOrder.html.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/eventOrder.html.ini @@ -1,3 +1,7 @@ [eventOrder.html] expected: - if product == "chrome" or product == "safari": ERROR + if product == "safari": ERROR + + [TestDriver actions: event order] + expected: + if product == "chrome": FAIL diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/pause.html.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/pause.html.ini index 3b0d6fa50de..7ceec9f531b 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/pause.html.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/pause.html.ini @@ -1,3 +1,7 @@ [pause.html] expected: - if product == "chrome" or product == "safari": ERROR + if product == "safari": ERROR + + [TestDriver actions: pause] + expected: + if product == "chrome": FAIL diff --git a/tests/wpt/web-platform-tests/longtask-timing/supported-longtask-types.any.js b/tests/wpt/web-platform-tests/longtask-timing/supported-longtask-types.any.js new file mode 100644 index 00000000000..0179fc5e60c --- /dev/null +++ b/tests/wpt/web-platform-tests/longtask-timing/supported-longtask-types.any.js @@ -0,0 +1,9 @@ +test(() => { + if (typeof PerformanceObserver.supportedEntryTypes === "undefined") + assert_unreached("supportedEntryTypes is not supported."); + const types = PerformanceObserver.supportedEntryTypes; + assert_true(types.includes("longtask"), + "There should be 'longtask' in PerformanceObserver.supportedEntryTypes"); + assert_false(types.includes("taskattribution"), + "There should NOT be 'taskattribution' in PerformanceObserver.supportedEntryTypes"); +}, "supportedEntryTypes contains 'longtask' but not 'taskattribution'."); diff --git a/tests/wpt/web-platform-tests/media-source/mediasource-errors.html b/tests/wpt/web-platform-tests/media-source/mediasource-errors.html index 3df1dedcc2b..b2224aa5f6f 100644 --- a/tests/wpt/web-platform-tests/media-source/mediasource-errors.html +++ b/tests/wpt/web-platform-tests/media-source/mediasource-errors.html @@ -207,28 +207,67 @@ { assert_equals(mediaElement.readyState, HTMLMediaElement.HAVE_NOTHING); - // Fail if the append error algorithm occurs, since the network - // error will be provided by us directly via endOfStream(). - mediaElement.addEventListener("loadedmetadata", test.unreached_func("'loadedmetadata' should not be fired on mediaElement")); - var mediaSegment = MediaSourceUtil.extractSegmentData(mediaData, segmentInfo.media[0]); var index = segmentInfo.init.size + (mediaSegment.length - 1) / 2; // Corrupt the media data from index of mediaData, so it can signal 'decode' error. // Here use mediaSegment to replace the original mediaData[index, index + mediaSegment.length] mediaData.set(mediaSegment, index); + // Depending on implementation, mediaElement transition to + // HAVE_METADATA and dispatching 'loadedmetadata' may occur, since the + // initialization segment is uncorrupted and forms the initial part of + // the appended bytes. The segment parser loop continues and + // eventually should observe decode error. Other implementations may + // delay such transition until some larger portion of the append's + // parsing is completed or until the media element is configured to + // handle the playback of media with the associated metadata (which may + // not occur in this case before the MSE append error algorithm executes.) + // So we cannot reliably expect the lack or presence of + // 'loadedmetadata' before the MSE append error algortihm executes in + // this case; similarly, mediaElement's resulting readyState may be + // either HAVE_NOTHING or HAVE_METADATA after the append error + // algorithm executes, and the resulting MediaError code would + // respectively be MEDIA_ERR_SRC_NOT_SUPPORTED or MEDIA_ERR_DECODE. + let loaded = false; + mediaElement.addEventListener("loadedmetadata", test.step_func(() => { loaded = true; })); + let errored = false; + mediaElement.addEventListener("error", test.step_func(() => { errored = true; })); + test.expectEvent(sourceBuffer, "error", "sourceBuffer error."); test.expectEvent(sourceBuffer, "updateend", "mediaSegment append ended."); - test.expectEvent(mediaElement, "error", "mediaElement error."); test.expectEvent(mediaSource, "sourceended", "mediaSource ended."); sourceBuffer.appendBuffer(mediaData); + let verifyFinalState = test.step_func(function() { + if (loaded) { + assert_greater_than(mediaElement.readyState, HTMLMediaElement.HAVE_NOTHING); + assert_true(mediaElement.error != null); + assert_equals(mediaElement.error.code, MediaError.MEDIA_ERR_DECODE); + test.done(); + } else { + assert_equals(mediaElement.readyState, HTMLMediaElement.HAVE_NOTHING); + assert_true(mediaElement.error != null); + assert_equals(mediaElement.error.code, MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED); + test.done(); + } + }); + + let awaitMediaElementError = test.step_func(function() { + if (!errored) { + test.step_timeout(awaitMediaElementError, 100); + } else { + verifyFinalState(); + } + }); + test.waitForExpectedEvents(function() { - assert_equals(mediaElement.readyState, HTMLMediaElement.HAVE_NOTHING); - assert_true(mediaElement.error != null); - assert_equals(mediaElement.error.code, MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED); - test.done(); + // Not all implementations will reliably fire a "loadedmetadata" + // event, so we use custom logic to verify mediaElement state based + // on whether or not "loadedmetadata" was ever fired. But first + // we must ensure "error" was fired on the mediaElement. + awaitMediaElementError(); }); - }, "Signaling 'decode' error via segment parser loop algorithm."); + + }, "Signaling 'decode' error via segment parser loop algorithm of append containing init plus corrupted media segment."); </script> diff --git a/tests/wpt/web-platform-tests/navigation-timing/supported_navigation_type.any.js b/tests/wpt/web-platform-tests/navigation-timing/supported_navigation_type.any.js new file mode 100644 index 00000000000..5e9151cea72 --- /dev/null +++ b/tests/wpt/web-platform-tests/navigation-timing/supported_navigation_type.any.js @@ -0,0 +1,6 @@ +test(() => { + if (typeof PerformanceObserver.supportedEntryTypes === "undefined") + assert_unreached("supportedEntryTypes is not supported."); + assert_true(PerformanceObserver.supportedEntryTypes.includes("navigation"), + "There should be an entry 'navigation' in PerformanceObserver.supportedEntryTypes"); +}, "supportedEntryTypes contains 'navigation'."); diff --git a/tests/wpt/web-platform-tests/paint-timing/supported-paint-type.any.js b/tests/wpt/web-platform-tests/paint-timing/supported-paint-type.any.js new file mode 100644 index 00000000000..623c880c573 --- /dev/null +++ b/tests/wpt/web-platform-tests/paint-timing/supported-paint-type.any.js @@ -0,0 +1,6 @@ +test(() => { + if (typeof PerformanceObserver.supportedEntryTypes === "undefined") + assert_unreached("supportedEntryTypes is not supported."); + assert_true(PerformanceObserver.supportedEntryTypes.includes("paint"), + "There should be an entry 'paint' in PerformanceObserver.supportedEntryTypes"); +}, "supportedEntryTypes contains 'paint'."); diff --git a/tests/wpt/web-platform-tests/performance-timeline/supportedEntryTypes.any.js b/tests/wpt/web-platform-tests/performance-timeline/supportedEntryTypes.any.js new file mode 100644 index 00000000000..a0225ad2f76 --- /dev/null +++ b/tests/wpt/web-platform-tests/performance-timeline/supportedEntryTypes.any.js @@ -0,0 +1,12 @@ +test(() => { + if (typeof PerformanceObserver.supportedEntryTypes === "undefined") + assert_unreached("supportedEntryTypes is not supported."); + const types = PerformanceObserver.supportedEntryTypes; + assert_greater_than(types.length, 0, + "There should be at least one entry in supportedEntryTypes."); + for (let i = 1; i < types.length; i++) { + assert_true(types[i-1] < types[i], + "The strings '" + types[i-1] + "' and '" + types[i] + + "' are repeated or they are not in alphabetical order.") + } +}, "supportedEntryTypes exists and returns entries in alphabetical order"); diff --git a/tests/wpt/web-platform-tests/picture-in-picture/mediastream.html b/tests/wpt/web-platform-tests/picture-in-picture/mediastream.html index e187de3d4b6..116a0f7dd4f 100644 --- a/tests/wpt/web-platform-tests/picture-in-picture/mediastream.html +++ b/tests/wpt/web-platform-tests/picture-in-picture/mediastream.html @@ -10,18 +10,10 @@ promise_test(async t => { const canvas = document.createElement('canvas'); const video = document.createElement('video'); - const mediastreamVideoLoadedPromise = new Promise((resolve, reject) => { - canvas.getContext('2d').fillRect(0, 0, canvas.width, canvas.height); - video.autoplay = true; - video.srcObject = canvas.captureStream(60 /* fps */); - video.onloadedmetadata = () => { - resolve(video); - }; - video.onerror = error => { - reject(error); - }; - }); - await mediastreamVideoLoadedPromise; + canvas.getContext('2d').fillRect(0, 0, canvas.width, canvas.height); + video.muted = true; + video.srcObject = canvas.captureStream(60 /* fps */); + await video.play(); return requestPictureInPictureWithTrustedClick(video) .then(pipWindow => { diff --git a/tests/wpt/web-platform-tests/resource-timing/supported_resource_type.any.js b/tests/wpt/web-platform-tests/resource-timing/supported_resource_type.any.js new file mode 100644 index 00000000000..6096ad71490 --- /dev/null +++ b/tests/wpt/web-platform-tests/resource-timing/supported_resource_type.any.js @@ -0,0 +1,6 @@ +test(() => { + if (typeof PerformanceObserver.supportedEntryTypes === "undefined") + assert_unreached("supportedEntryTypes is not supported."); + assert_true(PerformanceObserver.supportedEntryTypes.includes("resource"), + "There should be an entry 'resource' in PerformanceObserver.supportedEntryTypes"); +}, "supportedEntryTypes contains 'resource'."); diff --git a/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-certs.sh b/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-certs.sh index e1d2ea9e3cb..01330e46d8f 100755 --- a/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-certs.sh +++ b/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-certs.sh @@ -10,7 +10,7 @@ openssl ecparam -out 127.0.0.1.sxg.key -name prime256v1 -genkey openssl req -new -sha256 \ -key 127.0.0.1.sxg.key \ -out 127.0.0.1.sxg.csr \ - --subj '/CN=127.0.0.1/O=Test/C=US' + -subj '/CN=127.0.0.1/O=Test/C=US' openssl x509 -req -days 3650 \ -in 127.0.0.1.sxg.csr \ diff --git a/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage-attribute.svg b/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage-attribute.svg new file mode 100644 index 00000000000..44c386d5171 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage-attribute.svg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Percentages in shapes</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="percentage-ref.svg" /> + + <style> + svg { + fill: none; + stroke-width: 30px; + } + </style> + + <circle cx="70%" cy="60%" r="50%" stroke="cyan" /> + <ellipse cx="40%" cy="30%" rx="10%" ry="20%" stroke="green" /> + <rect x="10%" y="20%" width="70%" height="60%" stroke="blue" /> +</svg> diff --git a/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage-ref.svg b/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage-ref.svg new file mode 100644 index 00000000000..09fd10f287b --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage-ref.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + + <style> + svg { + fill: none; + stroke-width: 30px; + } + </style> + + <circle cx="434" cy="204" r="250" stroke="cyan" /> + <ellipse cx="248" cy="102" rx="62" ry="68" stroke="green" /> + <rect x="62" y="68" width="434" height="204" stroke="blue" /> +</svg> diff --git a/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage.svg b/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage.svg new file mode 100644 index 00000000000..c2ca49341c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/geometry/reftests/percentage.svg @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Percentages in shapes</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="percentage-ref.svg" /> + + <style> + svg { + fill: none; + stroke-width: 30px; + } + circle { + cx: 70%; + cy: 60%; + r: 50%; + } + ellipse { + cx: 40%; + cy: 30%; + rx: 10%; + ry: 20%; + } + rect { + x: 10%; + y: 20%; + width: 70%; + height: 60%; + } + </style> + + <circle stroke="cyan" /> + <ellipse stroke="green" /> + <rect stroke="blue" /> +</svg> diff --git a/tests/wpt/web-platform-tests/svg/painting/reftests/percentage-attribute.svg b/tests/wpt/web-platform-tests/svg/painting/reftests/percentage-attribute.svg new file mode 100644 index 00000000000..d245999db08 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/painting/reftests/percentage-attribute.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Percentages in stroke dimensions</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="percentage-ref.svg" /> + + <style> + rect { + fill: none; + stroke: blue; + } + </style> + + <rect x="62" y="68" width="434" height="204" + stroke-width="10%" stroke-dasharray="20% 30%" stroke-dashoffset="-10%" /> +</svg> diff --git a/tests/wpt/web-platform-tests/svg/painting/reftests/percentage-ref.svg b/tests/wpt/web-platform-tests/svg/painting/reftests/percentage-ref.svg new file mode 100644 index 00000000000..610a3ddb2d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/painting/reftests/percentage-ref.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + + <style> + rect { + fill: none; + stroke: blue; + stroke-width: 50px; + stroke-dasharray: 100px 150px; + stroke-dashoffset: -50px; + } + </style> + + <rect x="62" y="68" width="434" height="204" /> +</svg> diff --git a/tests/wpt/web-platform-tests/svg/painting/reftests/percentage.svg b/tests/wpt/web-platform-tests/svg/painting/reftests/percentage.svg new file mode 100644 index 00000000000..640c1eb450d --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/painting/reftests/percentage.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Percentages in stroke dimensions</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="percentage-ref.svg" /> + + <style> + rect { + fill: none; + stroke: blue; + stroke-width: 10%; + stroke-dasharray: 20% 30%; + stroke-dashoffset: -10%; + } + </style> + + <rect x="62" y="68" width="434" height="204" /> +</svg> diff --git a/tests/wpt/web-platform-tests/tools/ci/azure/affected_tests.yml b/tests/wpt/web-platform-tests/tools/ci/azure/affected_tests.yml new file mode 100644 index 00000000000..17fca51d50c --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/azure/affected_tests.yml @@ -0,0 +1,25 @@ +parameters: + checkoutCommit: '' + affectedRange: 'HEAD^1' + artifactName: '' + +steps: +- template: checkout.yml +- ${{ if ne(parameters.checkoutCommit, '') }}: + - script: git checkout ${{ parameters.checkoutCommit }} + displayName: 'Checkout ${{ parameters.checkoutCommit }}' +- template: pip_install.yml + parameters: + packages: virtualenv +- template: install_fonts.yml +- template: install_certs.yml +- template: install_safari.yml +- template: update_hosts.yml +- template: update_manifest.yml +- script: no_proxy='*' ./wpt run --yes --no-pause --no-fail-on-unexpected --no-restart-on-unexpected --affected ${{ parameters.affectedRange }} --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report.json --channel preview safari + displayName: 'Run tests' +- task: PublishBuildArtifacts@1 + displayName: 'Publish results' + inputs: + artifactName: '${{ parameters.artifactName }}' + condition: succeededOrFailed() diff --git a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py index 619b3faee54..881002ad117 100644 --- a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py +++ b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/transport.py @@ -1,5 +1,6 @@ import httplib import json +import select import urlparse import error @@ -83,9 +84,35 @@ class HTTPWireProtocol(object): self.port = port self.url_prefix = url_prefix + self._conn = None self._timeout = timeout + def __del__(self): + self.close() + + def close(self): + """Closes the current HTTP connection, if there is one.""" + if self._conn: + self._conn.close() + + @property + def connection(self): + """Gets the current HTTP connection, or lazily creates one.""" + if not self._conn: + conn_kwargs = {} + if self._timeout is not None: + conn_kwargs["timeout"] = self._timeout + + self._conn = httplib.HTTPConnection( + self.host, self.port, strict=True, **conn_kwargs) + + return self._conn + def url(self, suffix): + """ + From the relative path to a command end-point, + craft a full URL suitable to be used in a request to the HTTPD. + """ return urlparse.urljoin(self.url_prefix, suffix) def send(self, @@ -111,6 +138,8 @@ class HTTPWireProtocol(object): element references to ``webdriver.Element`` is provided. Use ``webdriver.protocol.Decoder`` to achieve this behaviour. + The client will attempt to use persistent HTTP connections. + :param method: `GET`, `POST`, or `DELETE`. :param uri: Relative endpoint of the requests URL path. :param body: Body of the request. Defaults to an empty @@ -141,26 +170,23 @@ class HTTPWireProtocol(object): raise ValueError("Failed to encode request body as JSON:\n" "%s" % json.dumps(body, indent=2)) - if isinstance(payload, text_type): - payload = body.encode("utf-8") + response = self._request(method, uri, payload, headers) + return Response.from_http(response, decoder=decoder, **codec_kwargs) + + def _request(self, method, uri, payload, headers=None): + if isinstance(payload, text_type): + payload = payload.encode("utf-8") if headers is None: headers = {} - headers.update({'Connection': 'keep-alive'}) + headers.update({"Connection": "keep-alive"}) url = self.url(uri) - conn_kwargs = {} - if self._timeout is not None: - conn_kwargs["timeout"] = self._timeout - - conn = httplib.HTTPConnection( - self.host, self.port, strict=True, **conn_kwargs) - conn.request(method, url, payload, headers) + if self._has_unread_data(): + self.close() + self.connection.request(method, url, payload, headers) + return self.connection.getresponse() - try: - response = conn.getresponse() - return Response.from_http( - response, decoder=decoder, **codec_kwargs) - finally: - conn.close() + def _has_unread_data(self): + return self._conn and select.select([self._conn.sock], [], [], 0)[0] diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py index 70324bec31f..712ff3fbc9b 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py @@ -16,7 +16,7 @@ def inherit(super_module, child_globals, product_name): child_wptrunner["product"] = product_name for k in ("check_args", "browser", "browser_kwargs", "executor_kwargs", - "env_extras", "env_options"): + "env_extras", "env_options", "timeout_multiplier"): attr = super_wptrunner[k] child_globals[attr] = getattr(super_module, attr) @@ -57,6 +57,13 @@ def get_free_port(start_port, exclude=None): finally: s.close() + +def get_timeout_multiplier(test_type, run_info_data, **kwargs): + if kwargs["timeout_multiplier"] is not None: + return kwargs["timeout_multiplier"] + return 1 + + def browser_command(binary, args, debug_info): if debug_info: if debug_info.requiresEscapedArgs: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py index c46f33c1169..aa44817276f 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py @@ -1,4 +1,5 @@ from .base import Browser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..webdriver_server import ChromeDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401 @@ -15,7 +16,8 @@ __wptrunner__ = {"product": "chrome", "browser_kwargs": "browser_kwargs", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", - "env_options": "env_options"} + "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier",} def check_args(**kwargs): @@ -34,6 +36,7 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, cache_manager, run_info_data, **kwargs) executor_kwargs["close_after_done"] = True + executor_kwargs["supports_eager_pageload"] = False capabilities = { "goog:chromeOptions": { @@ -48,6 +51,9 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, } } + if test_type == "testharness": + capabilities["pageLoadStrategy"] = "none" + for (kwarg, capability) in [("binary", "binary"), ("binary_args", "args")]: if kwargs[kwarg] is not None: capabilities["goog:chromeOptions"][capability] = kwargs[kwarg] diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py index c96cf5634f3..3c277a567d7 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py @@ -1,6 +1,7 @@ import subprocess from .base import Browser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..webdriver_server import ChromeDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401 @@ -17,7 +18,8 @@ __wptrunner__ = {"product": "chrome_android", "browser_kwargs": "browser_kwargs", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", - "env_options": "env_options"} + "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier"} _wptserve_ports = set() diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py index ad2bb513a6a..9a746819021 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py @@ -14,7 +14,9 @@ __wptrunner__ = {"product": "edge", "browser_kwargs": "browser_kwargs", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", - "env_options": "env_options"} + "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier"} + def get_timeout_multiplier(test_type, run_info_data, **kwargs): if kwargs["timeout_multiplier"] is not None: @@ -23,9 +25,11 @@ def get_timeout_multiplier(test_type, run_info_data, **kwargs): return 10 return 1 + def check_args(**kwargs): require_arg(kwargs, "webdriver_binary") + def browser_kwargs(test_type, run_info_data, config, **kwargs): return {"webdriver_binary": kwargs["webdriver_binary"], "webdriver_args": kwargs.get("webdriver_args"), @@ -33,6 +37,7 @@ def browser_kwargs(test_type, run_info_data, config, **kwargs): run_info_data, **kwargs)} + def executor_kwargs(test_type, server_config, cache_manager, run_info_data, **kwargs): executor_kwargs = base_executor_kwargs(test_type, server_config, @@ -42,14 +47,19 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, run_info_data, **kwargs) executor_kwargs["capabilities"] = {} + if test_type == "testharness": + executor_kwargs["capabilities"]["pageLoadStrategy"] = "eager" return executor_kwargs + def env_extras(**kwargs): return [] + def env_options(): return {"supports_debugger": False} + class EdgeBrowser(Browser): used_ports = set() init_timeout = 60 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py index a7009dd26b3..771396d06b5 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/fennec.py @@ -6,7 +6,7 @@ from mozprocess import ProcessHandler from mozprofile import FirefoxProfile from mozrunner import FennecEmulatorRunner -from serve.serve import make_hosts_file +from tools.serve.serve import make_hosts_file from .base import (get_free_port, cmd_arg, @@ -26,7 +26,9 @@ __wptrunner__ = {"product": "fennec", "env_extras": "env_extras", "env_options": "env_options", "run_info_extras": "run_info_extras", - "update_properties": "update_properties"} + "update_properties": "update_properties", + "timeout_multiplier": "get_timeout_multiplier"} + def check_args(**kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py index 26d744749e5..618f011abaf 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py @@ -38,7 +38,8 @@ __wptrunner__ = {"product": "firefox", "env_extras": "env_extras", "env_options": "env_options", "run_info_extras": "run_info_extras", - "update_properties": "update_properties"} + "update_properties": "update_properties", + "timeout_multiplier": "get_timeout_multiplier"} def get_timeout_multiplier(test_type, run_info_data, **kwargs): @@ -98,6 +99,8 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, **kwargs) executor_kwargs["e10s"] = run_info_data["e10s"] capabilities = {} + if test_type == "testharness": + capabilities["pageLoadStrategy"] = "eager" if test_type == "reftest": executor_kwargs["reftest_internal"] = kwargs["reftest_internal"] executor_kwargs["reftest_screenshot"] = kwargs["reftest_screenshot"] diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/ie.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/ie.py index a0730f8ba29..0eca40925c2 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/ie.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/ie.py @@ -1,4 +1,5 @@ from .base import Browser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..webdriver_server import InternetExplorerDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401 @@ -14,7 +15,8 @@ __wptrunner__ = {"product": "ie", "browser_kwargs": "browser_kwargs", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", - "env_options": "env_options"} + "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier"} def check_args(**kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/opera.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/opera.py index c5aeaaaf967..805fedee636 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/opera.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/opera.py @@ -1,4 +1,5 @@ from .base import Browser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..webdriver_server import OperaDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401 @@ -15,7 +16,8 @@ __wptrunner__ = {"product": "opera", "browser_kwargs": "browser_kwargs", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", - "env_options": "env_options"} + "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier"} def check_args(**kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py index 1e18f95af70..dba8432b5a7 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py @@ -1,4 +1,5 @@ from .base import Browser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..webdriver_server import SafariDriverServer from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401 @@ -15,7 +16,8 @@ __wptrunner__ = {"product": "safari", "browser_kwargs": "browser_kwargs", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", - "env_options": "env_options"} + "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier"} def check_args(**kwargs): @@ -33,6 +35,8 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, cache_manager, run_info_data, **kwargs) executor_kwargs["close_after_done"] = True executor_kwargs["capabilities"] = {} + if test_type == "testharness": + executor_kwargs["capabilities"]["pageLoadStrategy"] = "eager" if kwargs["binary"] is not None: raise ValueError("Safari doesn't support setting executable location") diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py index c6863005a0f..3301c75b210 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py @@ -14,6 +14,7 @@ from cStringIO import StringIO as CStringIO import requests from .base import Browser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401 SeleniumRefTestExecutor) # noqa: F401 @@ -32,7 +33,8 @@ __wptrunner__ = {"product": "sauce", "browser_kwargs": "browser_kwargs", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", - "env_options": "env_options"} + "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier"} def get_capabilities(**kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py index 1a357a3ced9..2e0b0a25c14 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py @@ -1,6 +1,7 @@ import os from .base import NullBrowser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorservo import ServoTestharnessExecutor, ServoRefTestExecutor, ServoWdspecExecutor # noqa: F401 @@ -19,6 +20,7 @@ __wptrunner__ = { "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier", "update_properties": "update_properties", } diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py index 44efb8950b6..0a63a32c966 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py @@ -7,6 +7,7 @@ from mozprocess import ProcessHandler from tools.serve.serve import make_hosts_file from .base import Browser, require_arg, get_free_port, browser_command, ExecutorBrowser +from .base import get_timeout_multiplier # noqa: F401 from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorservodriver import (ServoWebDriverTestharnessExecutor, # noqa: F401 ServoWebDriverRefTestExecutor) # noqa: F401 @@ -25,6 +26,7 @@ __wptrunner__ = { "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", "env_options": "env_options", + "timeout_multiplier": "get_timeout_multiplier", "update_properties": "update_properties", } diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py index 19527a132c7..bd444eef1df 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/webkit.py @@ -1,4 +1,5 @@ from .base import Browser, ExecutorBrowser, require_arg +from .base import get_timeout_multiplier # noqa: F401 from ..executors import executor_kwargs as base_executor_kwargs from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401 WebDriverRefTestExecutor) # noqa: F401 @@ -16,7 +17,8 @@ __wptrunner__ = {"product": "webkit", "executor_kwargs": "executor_kwargs", "env_extras": "env_extras", "env_options": "env_options", - "run_info_extras": "run_info_extras"} + "run_info_extras": "run_info_extras", + "timeout_multiplier": "get_timeout_multiplier"} def check_args(**kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py index ba89fb9fe76..493d3c43fc0 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/environment.py @@ -46,13 +46,14 @@ class TestEnvironmentError(Exception): class TestEnvironment(object): - def __init__(self, test_paths, pause_after_test, debug_info, options, ssl_config, env_extras): + def __init__(self, test_paths, testharness_timeout_multipler, pause_after_test, debug_info, options, ssl_config, env_extras): """Context manager that owns the test environment i.e. the http and websockets servers""" self.test_paths = test_paths self.server = None self.config_ctx = None self.config = None + self.testharness_timeout_multipler = testharness_timeout_multipler self.pause_after_test = pause_after_test self.test_server_port = options.pop("test_server_port", True) self.debug_info = debug_info @@ -169,7 +170,10 @@ class TestEnvironment(object): for path, format_args, content_type, route in [ ("testharness_runner.html", {}, "text/html", "/testharness_runner.html"), (self.options.get("testharnessreport", "testharnessreport.js"), - {"output": self.pause_after_test}, "text/javascript;charset=utf8", + {"output": self.pause_after_test, + "timeout_multiplier": self.testharness_timeout_multipler, + "explicit_timeout": "true" if self.debug_info is not None else "false"}, + "text/javascript;charset=utf8", "/resources/testharnessreport.js")]: path = os.path.normpath(os.path.join(here, path)) # Note that .headers. files don't apply to static routes, so we need to 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 e71ce4c04d7..0e54eca778b 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 @@ -522,7 +522,7 @@ class CallbackHandler(object): return callback(url, payload) def process_complete(self, url, payload): - rv = [url] + payload + rv = [strip_server(url)] + payload return True, rv def process_action(self, url, payload): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py index 84bde160890..d471b4ed660 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -1,6 +1,7 @@ import json import os import threading +import time import traceback import urlparse import uuid @@ -98,6 +99,10 @@ class MarionetteBaseProtocolPart(BaseProtocolPart): except errors.ScriptTimeoutException: self.logger.debug("Script timed out") pass + except errors.JavascriptException as e: + # This can happen if we navigate, but just keep going + self.logger.debug(e.message) + pass except IOError: self.logger.debug("Socket closed") break @@ -183,29 +188,43 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart): else: break - def get_test_window(self, window_id, parent): + def get_test_window(self, window_id, parent, timeout=5): + """Find the test window amongst all the open windows. + This is assumed to be either the named window or the one after the parent in the list of + window handles + + :param window_id: The DOM name of the Window + :param parent: The handle of the runner window + :param timeout: The time in seconds to wait for the window to appear. This is because in + some implementations there's a race between calling window.open and the + window being added to the list of WebDriver accessible windows.""" test_window = None - if window_id: - try: - # Try this, it's in Level 1 but nothing supports it yet - win_s = self.parent.base.execute_script("return window['%s'];" % self.window_id) - win_obj = json.loads(win_s) - test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] - except Exception: - pass + end_time = time.time() + timeout + while time.time() < end_time: + if window_id: + try: + # Try this, it's in Level 1 but nothing supports it yet + win_s = self.parent.base.execute_script("return window['%s'];" % self.window_id) + win_obj = json.loads(win_s) + test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] + except Exception: + pass - if test_window is None: - after = self.marionette.window_handles - if len(after) == 2: - test_window = next(iter(set(after) - set([parent]))) - elif after[0] == parent and len(after) > 2: - # Hope the first one here is the test window - test_window = after[1] - else: - raise Exception("unable to find test window") + if test_window is None: + handles = self.marionette.window_handles + if len(handles) == 2: + test_window = next(iter(set(handles) - set([parent]))) + elif handles[0] == parent and len(handles) > 2: + # Hope the first one here is the test window + test_window = handles[1] + + if test_window is not None: + assert test_window != parent + return test_window - assert test_window != parent - return test_window + time.sleep(0.1) + + raise Exception("unable to find test window") class MarionettePrefsProtocolPart(PrefsProtocolPart): @@ -623,8 +642,8 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): timeout_multiplier, kwargs["e10s"], ccov) - self.script = open(os.path.join(here, "testharness_webdriver.js")).read() - self.script_resume = open(os.path.join(here, "testharness_webdriver_resume.js")).read() + with open(os.path.join(here, "testharness_webdriver_resume.js")) as f: + self.script_resume = f.read() self.close_after_done = close_after_done self.window_id = str(uuid.uuid4()) self.debug = debug @@ -677,29 +696,18 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): def do_testharness(self, protocol, url, timeout): parent_window = protocol.testharness.close_old_windows(protocol) - if timeout is not None: - timeout_ms = str(timeout * 1000) - else: - timeout_ms = "null" - if self.protocol.coverage.is_enabled: self.protocol.coverage.reset() - format_map = {"abs_url": url, - "url": strip_server(url), - "window_id": self.window_id, - "timeout_multiplier": self.timeout_multiplier, - "timeout": timeout_ms, - "explicit_timeout": timeout is None} - - script = self.script % format_map - - protocol.base.execute_script(script, async=True) - test_window = protocol.testharness.get_test_window(self.window_id, parent_window) + format_map = {"url": strip_server(url)} + protocol.base.execute_script("window.open('about:blank', '%s', 'noopener')" % self.window_id) + test_window = protocol.testharness.get_test_window(self.window_id, parent_window, + timeout=10*self.timeout_multiplier) + self.protocol.base.set_window(test_window) handler = CallbackHandler(self.logger, protocol, test_window) + protocol.marionette.navigate(url) while True: - self.protocol.base.set_window(test_window) result = protocol.base.execute_script( self.script_resume % format_map, async=True) if result is None: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py index 0e788c5b287..75e7b2cc4ae 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py @@ -2,6 +2,7 @@ import json import os import socket import threading +import time import traceback import urlparse import uuid @@ -102,29 +103,43 @@ class SeleniumTestharnessProtocolPart(TestharnessProtocolPart): self.webdriver.switch_to_window(self.runner_handle) return self.runner_handle - def get_test_window(self, window_id, parent): + def get_test_window(self, window_id, parent, timeout=5): + """Find the test window amongst all the open windows. + This is assumed to be either the named window or the one after the parent in the list of + window handles + + :param window_id: The DOM name of the Window + :param parent: The handle of the runner window + :param timeout: The time in seconds to wait for the window to appear. This is because in + some implementations there's a race between calling window.open and the + window being added to the list of WebDriver accessible windows.""" test_window = None - try: - # Try using the JSON serialization of the WindowProxy object, - # it's in Level 1 but nothing supports it yet - win_s = self.webdriver.execute_script("return window['%s'];" % window_id) - win_obj = json.loads(win_s) - test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] - except Exception: - pass + end_time = time.time() + timeout + while time.time() < end_time: + try: + # Try using the JSON serialization of the WindowProxy object, + # it's in Level 1 but nothing supports it yet + win_s = self.webdriver.execute_script("return window['%s'];" % window_id) + win_obj = json.loads(win_s) + test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] + except Exception: + pass - if test_window is None: - after = self.webdriver.window_handles - if len(after) == 2: - test_window = next(iter(set(after) - set([parent]))) - elif after[0] == parent and len(after) > 2: - # Hope the first one here is the test window - test_window = after[1] - else: - raise Exception("unable to find test window") + if test_window is None: + after = self.webdriver.window_handles + if len(after) == 2: + test_window = next(iter(set(after) - set([parent]))) + elif after[0] == parent and len(after) > 2: + # Hope the first one here is the test window + test_window = after[1] + + if test_window is not None: + assert test_window != parent + return test_window + + time.sleep(0.1) - assert test_window != parent - return test_window + raise Exception("unable to find test window") class SeleniumSelectorProtocolPart(SelectorProtocolPart): @@ -282,8 +297,6 @@ class SeleniumTestharnessExecutor(TestharnessExecutor): timeout_multiplier=timeout_multiplier, debug_info=debug_info) self.protocol = SeleniumProtocol(self, browser, capabilities) - with open(os.path.join(here, "testharness_webdriver.js")) as f: - self.script = f.read() with open(os.path.join(here, "testharness_webdriver_resume.js")) as f: self.script_resume = f.read() self.close_after_done = close_after_done @@ -310,20 +323,17 @@ class SeleniumTestharnessExecutor(TestharnessExecutor): return (test.result_cls(*data), []) def do_testharness(self, protocol, url, timeout): - format_map = {"abs_url": url, - "url": strip_server(url), - "window_id": self.window_id, - "timeout_multiplier": self.timeout_multiplier, - "timeout": timeout * 1000} + format_map = {"url": strip_server(url)} parent_window = protocol.testharness.close_old_windows() # Now start the test harness - protocol.base.execute_script(self.script % format_map, async=True) - test_window = protocol.testharness.get_test_window(self.window_id, parent_window) - + protocol.base.execute_script("window.open('about:blank', '%s', 'noopener')" % self.window_id) + test_window = protocol.testharness.get_test_window(self.window_id, parent_window, + timeout=5*self.timeout_multiplier) + self.protocol.base.set_window(test_window) + protocol.webdriver.get(url) handler = CallbackHandler(self.logger, protocol, test_window) while True: - self.protocol.base.set_window(test_window) result = protocol.base.execute_script( self.script_resume % format_map, async=True) done, rv = handler(result) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py index 784356bb8b0..485cdc5c98d 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py @@ -122,7 +122,7 @@ class ServoTestharnessExecutor(ProcessTestExecutor): self.proc.wait() else: self.proc.kill() - except: + except: # noqa self.proc.kill() raise diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index ce103a73bea..0e83118d9ac 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -2,6 +2,7 @@ import json import os import socket import threading +import time import traceback import urlparse import uuid @@ -94,29 +95,43 @@ class WebDriverTestharnessProtocolPart(TestharnessProtocolPart): self.webdriver.window_handle = self.runner_handle return self.runner_handle - def get_test_window(self, window_id, parent): + def get_test_window(self, window_id, parent, timeout=5): + """Find the test window amongst all the open windows. + This is assumed to be either the named window or the one after the parent in the list of + window handles + + :param window_id: The DOM name of the Window + :param parent: The handle of the runner window + :param timeout: The time in seconds to wait for the window to appear. This is because in + some implementations there's a race between calling window.open and the + window being added to the list of WebDriver accessible windows.""" test_window = None - try: - # Try using the JSON serialization of the WindowProxy object, - # it's in Level 1 but nothing supports it yet - win_s = self.webdriver.execute_script("return window['%s'];" % window_id) - win_obj = json.loads(win_s) - test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] - except Exception: - pass + end_time = time.time() + timeout + while time.time() < end_time: + try: + # Try using the JSON serialization of the WindowProxy object, + # it's in Level 1 but nothing supports it yet + win_s = self.webdriver.execute_script("return window['%s'];" % window_id) + win_obj = json.loads(win_s) + test_window = win_obj["window-fcc6-11e5-b4f8-330a88ab9d7f"] + except Exception: + pass - if test_window is None: - after = self.webdriver.handles - if len(after) == 2: - test_window = next(iter(set(after) - set([parent]))) - elif after[0] == parent and len(after) > 2: - # Hope the first one here is the test window - test_window = after[1] - else: - raise Exception("unable to find test window") + if test_window is None: + after = self.webdriver.handles + if len(after) == 2: + test_window = next(iter(set(after) - set([parent]))) + elif after[0] == parent and len(after) > 2: + # Hope the first one here is the test window + test_window = after[1] + + if test_window is not None: + assert test_window != parent + return test_window - assert test_window != parent - return test_window + time.sleep(0.1) + + raise Exception("unable to find test window") class WebDriverSelectorProtocolPart(SelectorProtocolPart): @@ -282,18 +297,17 @@ class WebDriverTestharnessExecutor(TestharnessExecutor): def __init__(self, browser, server_config, timeout_multiplier=1, close_after_done=True, capabilities=None, debug_info=None, - **kwargs): + supports_eager_pageload=True, **kwargs): """WebDriver-based executor for testharness.js tests""" TestharnessExecutor.__init__(self, browser, server_config, timeout_multiplier=timeout_multiplier, debug_info=debug_info) self.protocol = WebDriverProtocol(self, browser, capabilities) - with open(os.path.join(here, "testharness_webdriver.js")) as f: - self.script = f.read() with open(os.path.join(here, "testharness_webdriver_resume.js")) as f: self.script_resume = f.read() self.close_after_done = close_after_done self.window_id = str(uuid.uuid4()) + self.supports_eager_pageload = supports_eager_pageload def is_alive(self): return self.protocol.is_alive() @@ -316,20 +330,22 @@ class WebDriverTestharnessExecutor(TestharnessExecutor): return (test.result_cls(*data), []) def do_testharness(self, protocol, url, timeout): - format_map = {"abs_url": url, - "url": strip_server(url), - "window_id": self.window_id, - "timeout_multiplier": self.timeout_multiplier, - "timeout": timeout * 1000} + format_map = {"url": strip_server(url)} parent_window = protocol.testharness.close_old_windows() # Now start the test harness - protocol.base.execute_script(self.script % format_map, async=True) - test_window = protocol.testharness.get_test_window(self.window_id, parent_window) - + protocol.base.execute_script("window.open('about:blank', '%s', 'noopener')" % self.window_id) + test_window = protocol.testharness.get_test_window(self.window_id, + parent_window, + timeout=5*self.timeout_multiplier) + self.protocol.base.set_window(test_window) handler = CallbackHandler(self.logger, protocol, test_window) + protocol.webdriver.url = url + + if not self.supports_eager_pageload: + self.wait_for_load(protocol) + while True: - self.protocol.base.set_window(test_window) result = protocol.base.execute_script( self.script_resume % format_map, async=True) done, rv = handler(result) @@ -337,6 +353,29 @@ class WebDriverTestharnessExecutor(TestharnessExecutor): break return rv + def wait_for_load(self, protocol): + # pageLoadStrategy=eager doesn't work in Chrome so try to emulate in user script + loaded = False + seen_error = False + while not loaded: + try: + loaded = protocol.base.execute_script(""" +var callback = arguments[arguments.length - 1]; +if (location.href === "about:blank") { + callback(false); +} else if (document.readyState !== "loading") { + callback(true); +} else { + document.addEventListener("readystatechange", () => {if (document.readyState !== "loading") {callback(true)}}); +}""", async=True) + except client.JavascriptErrorException: + # We can get an error here if the script runs in the initial about:blank + # document before it has navigated, with the driver returning an error + # indicating that the document was unloaded + if seen_error: + raise + seen_error = True + class WebDriverRefTestExecutor(RefTestExecutor): def __init__(self, browser, server_config, timeout_multiplier=1, diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/runner.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/runner.js index 8b800036756..171e6febd9f 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/runner.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/runner.js @@ -1,59 +1 @@ document.title = '%(title)s'; - -window.addEventListener( - "message", - function(event) { - window.message_queue.push(event); - window.process_next_event(); - }, - false -); - - -window.process_next_event = function() { - /* This function handles the next testdriver event. The presence of - window.testdriver_callback is used as a switch; when that function - is present we are able to handle the next event and when is is not - present we must wait. Therefore to drive the event processing, this - function must be called in two circumstances: - * Every time there is a new event that we may be able to handle - * Every time we set the callback function - This function unsets the callback, so no further testdriver actions - will be run until it is reset, which wptrunner does after it has - completed handling the current action. - */ - if (!window.testdriver_callback) { - return; - } - var event = window.message_queue.shift(); - if (!event) { - return; - } - var data = event.data; - - var payload = undefined; - - switch(data.type) { - case "complete": - var tests = event.data.tests; - var status = event.data.status; - - var subtest_results = tests.map(function(x) { - return [x.name, x.status, x.message, x.stack]; - }); - payload = [status.status, - status.message, - status.stack, - subtest_results]; - clearTimeout(window.timer); - break; - case "action": - payload = data; - break; - default: - return; - } - var callback = window.testdriver_callback; - window.testdriver_callback = null; - callback([window.url, data.type, payload]); -}; diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver.js deleted file mode 100644 index 37023d81408..00000000000 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver.js +++ /dev/null @@ -1,19 +0,0 @@ -var callback = arguments[arguments.length - 1]; -var loaded = false; - -window.timeout_multiplier = %(timeout_multiplier)d; -window.url = "%(url)s"; -window.win = window.open("%(abs_url)s", "%(window_id)s"); -window.win.addEventListener('DOMContentLoaded', (e) => { - callback(); -}); - - -window.message_queue = []; -window.testdriver_callback = null; - -if (%(timeout)s != null) { - window.timer = setTimeout(function() { - window.win.timeout(); - }, %(timeout)s); -} diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js index e78951a2604..36d086c9747 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js @@ -1,21 +1,5 @@ -var callback = arguments[arguments.length - 1]; -window.opener.testdriver_callback = function(results) { - /** - * The current window and its opener belong to the same domain, making it - * technically possible for data structures to be shared directly. - * Unfortunately, some browser/WebDriver implementations incorrectly - * serialize Arrays from foreign realms [1]. This issue does not extend to - * the behavior of `JSON.stringify` and `JSON.parse` in these - * implementations. Use that API to re-create the data structure in the local - * realm to avoid the problem in the non-conforming browsers. - * - * [1] This has been observed in Edge version 17 and/or the corresponding - * release of Edgedriver - */ - try { - results = JSON.parse(JSON.stringify(results)); - } catch (error) {} - - callback(results); -}; -window.opener.process_next_event(); +// We have to set the url here to ensure we get the same escaping as in the harness +// and also to handle the case where the test changes the fragment +window.__wptrunner_url = "%(url)s"; +window.__wptrunner_testdriver_callback = arguments[arguments.length - 1]; +window.__wptrunner_process_next_event(); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py index 0c1f86ff06a..4575dfb5e95 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py @@ -3,6 +3,7 @@ import imp from .browsers import product_list + def products_enabled(config): names = config.get("products", {}).keys() if not names: @@ -10,6 +11,7 @@ def products_enabled(config): else: return names + def product_module(config, product): if product not in products_enabled(config): raise ValueError("Unknown product %s" % product) @@ -26,28 +28,39 @@ def product_module(config, product): return module -def load_product(config, product): - module = product_module(config, product) - data = module.__wptrunner__ - - check_args = getattr(module, data["check_args"]) - browser_cls = getattr(module, data["browser"]) - browser_kwargs = getattr(module, data["browser_kwargs"]) - executor_kwargs = getattr(module, data["executor_kwargs"]) - env_options = getattr(module, data["env_options"])() - env_extras = getattr(module, data["env_extras"]) - run_info_extras = (getattr(module, data["run_info_extras"]) - if "run_info_extras" in data else lambda **kwargs:{}) - - executor_classes = {} - for test_type, cls_name in data["executor"].iteritems(): - cls = getattr(module, cls_name) - executor_classes[test_type] = cls - - return (check_args, - browser_cls, browser_kwargs, - executor_classes, executor_kwargs, - env_options, env_extras, run_info_extras) +class Product(object): + def __init__(self, config, product): + module = product_module(config, product) + data = module.__wptrunner__ + self.name = product + self.check_args = getattr(module, data["check_args"]) + self.browser_cls = getattr(module, data["browser"]) + self.get_browser_kwargs = getattr(module, data["browser_kwargs"]) + self.get_executor_kwargs = getattr(module, data["executor_kwargs"]) + self.env_options = getattr(module, data["env_options"])() + self.get_env_extras = getattr(module, data["env_extras"]) + self.run_info_extras = (getattr(module, data["run_info_extras"]) + if "run_info_extras" in data else lambda **kwargs:{}) + self.get_timeout_multiplier = getattr(module, data["timeout_multiplier"]) + + self.executor_classes = {} + for test_type, cls_name in data["executor"].iteritems(): + cls = getattr(module, cls_name) + self.executor_classes[test_type] = cls + + +def load_product(config, product, load_cls=False): + rv = Product(config, product) + if not load_cls: + return (rv.check_args, + rv.browser_cls, + rv.get_browser_kwargs, + rv.executor_classes, + rv.get_executor_kwargs, + rv.env_options, + rv.get_env_extras, + rv.run_info_extras) + return rv def load_product_update(config, product): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js index d77731a158e..ca61caf51e8 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testdriver-extra.js @@ -57,7 +57,7 @@ pending_resolve = resolve; pending_reject = reject; }); - window.opener.postMessage({"type": "action", "action": "click", "selector": selector}, "*"); + window.__wptrunner_message_queue.push({"type": "action", "action": "click", "selector": selector}); return pending_promise; }; @@ -67,7 +67,7 @@ pending_resolve = resolve; pending_reject = reject; }); - window.opener.postMessage({"type": "action", "action": "send_keys", "selector": selector, "keys": keys}, "*"); + window.__wptrunner_message_queue.push({"type": "action", "action": "send_keys", "selector": selector, "keys": keys}); return pending_promise; }; @@ -85,7 +85,7 @@ } } } - window.opener.postMessage({"type": "action", "action": "action_sequence", "actions": actions}, "*"); + window.__wptrunner_message_queue.push({"type": "action", "action": "action_sequence", "actions": actions}); return pending_promise; }; })(); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testharnessreport.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testharnessreport.js index 62ddaffb443..281f97ddaa6 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testharnessreport.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testharnessreport.js @@ -1,13 +1,68 @@ -var props = {output:%(output)d, - explicit_timeout: true, - message_events: ["completion"]}; +window.__wptrunner_testdriver_callback = null; +window.__wptrunner_message_queue = []; +window.__wptrunner_url = null; -if (window.opener && "timeout_multiplier" in window.opener) { - props["timeout_multiplier"] = window.opener.timeout_multiplier; -} +window.__wptrunner_process_next_event = function() { + /* This function handles the next testdriver event. The presence of + window.testdriver_callback is used as a switch; when that function + is present we are able to handle the next event and when is is not + present we must wait. Therefore to drive the event processing, this + function must be called in two circumstances: + * Every time there is a new event that we may be able to handle + * Every time we set the callback function + This function unsets the callback, so no further testdriver actions + will be run until it is reset, which wptrunner does after it has + completed handling the current action. + */ -if (window.opener && window.opener.explicit_timeout) { - props["explicit_timeout"] = window.opener.explicit_timeout; -} + if (!window.__wptrunner_testdriver_callback) { + return; + } + var data = window.__wptrunner_message_queue.shift(); + if (!data) { + return; + } + + var payload = undefined; + + switch(data.type) { + case "complete": + var tests = data.tests; + var status = data.status; + + var subtest_results = tests.map(function(x) { + return [x.name, x.status, x.message, x.stack]; + }); + payload = [status.status, + status.message, + status.stack, + subtest_results]; + clearTimeout(window.__wptrunner_timer); + break; + case "action": + payload = data; + break; + default: + return; + } + var callback = window.__wptrunner_testdriver_callback; + window.__wptrunner_testdriver_callback = null; + callback([__wptrunner_url, data.type, payload]); +}; + +(function() { + var props = {output: %(output)d, + timeout_multiplier: %(timeout_multiplier)s, + explicit_timeout: %(explicit_timeout)s, + message_events: ["completion"]}; + + add_completion_callback(function(tests, harness_status) { + __wptrunner_message_queue.push({ + "type": "complete", + "tests": tests, + "status": harness_status}); + __wptrunner_process_next_event(); + }); + setup(props); +})(); -setup(props); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py index 441c83f735e..c3454a0dd8f 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_products.py @@ -46,6 +46,7 @@ def test_server_start_config(product): with mock.patch.object(environment.serve, "start") as start: with environment.TestEnvironment(test_paths, + 1, False, None, env_options, diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py index 7d35c51d909..8b98b2955f5 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py @@ -138,14 +138,11 @@ def run_tests(config, test_paths, product, **kwargs): with wptlogging.CaptureIO(logger, not kwargs["no_capture_stdio"]): env.do_delayed_imports(logger, test_paths) - (check_args, - target_browser_cls, get_browser_kwargs, - executor_classes, get_executor_kwargs, - env_options, get_env_extras, run_info_extras) = products.load_product(config, product) + product = products.load_product(config, product, load_cls=True) - env_extras = get_env_extras(**kwargs) + env_extras = product.get_env_extras(**kwargs) - check_args(**kwargs) + product.check_args(**kwargs) if kwargs["install_fonts"]: env_extras.append(FontInstaller( @@ -154,8 +151,8 @@ def run_tests(config, test_paths, product, **kwargs): )) run_info, test_loader = get_loader(test_paths, - product, - run_info_extras=run_info_extras(**kwargs), + product.name, + run_info_extras=product.run_info_extras(**kwargs), **kwargs) test_source_kwargs = {"processes": kwargs["processes"]} @@ -180,10 +177,13 @@ def run_tests(config, test_paths, product, **kwargs): "host_cert_path": kwargs["host_cert_path"], "ca_cert_path": kwargs["ca_cert_path"]}} + testharness_timeout_multipler = product.get_timeout_multiplier("testharness", run_info, **kwargs) + with env.TestEnvironment(test_paths, + testharness_timeout_multipler, kwargs["pause_after_test"], kwargs["debug_info"], - env_options, + product.env_options, ssl_config, env_extras) as test_environment: try: @@ -205,7 +205,9 @@ def run_tests(config, test_paths, product, **kwargs): test_count = 0 unexpected_count = 0 - logger.suite_start(test_loader.test_ids, name='web-platform-test', run_info=run_info, + logger.suite_start(test_loader.test_ids, + name='web-platform-test', + run_info=run_info, extra={"run_by_dir": kwargs["run_by_dir"]}) for test_type in kwargs["test_types"]: logger.info("Running %s tests" % test_type) @@ -218,23 +220,23 @@ def run_tests(config, test_paths, product, **kwargs): if test_type == "wdspec": browser_cls = NullBrowser else: - browser_cls = target_browser_cls + browser_cls = product.browser_cls - browser_kwargs = get_browser_kwargs(test_type, - run_info, - config=test_environment.config, - **kwargs) + browser_kwargs = product.get_browser_kwargs(test_type, + run_info, + config=test_environment.config, + **kwargs) - executor_cls = executor_classes.get(test_type) - executor_kwargs = get_executor_kwargs(test_type, - test_environment.config, - test_environment.cache_manager, - run_info, - **kwargs) + executor_cls = product.executor_classes.get(test_type) + executor_kwargs = product.get_executor_kwargs(test_type, + test_environment.config, + test_environment.cache_manager, + run_info, + **kwargs) if executor_cls is None: logger.error("Unsupported test type %s for product %s" % - (test_type, product)) + (test_type, product.name)) continue for test in test_loader.disabled_tests[test_type]: @@ -245,8 +247,8 @@ def run_tests(config, test_paths, product, **kwargs): if test_type == "testharness": run_tests = {"testharness": []} for test in test_loader.tests["testharness"]: - if (test.testdriver and not executor_cls.supports_testdriver) or ( - test.jsshell and not executor_cls.supports_jsshell): + if ((test.testdriver and not executor_cls.supports_testdriver) or + (test.jsshell and not executor_cls.supports_jsshell)): logger.test_start(test.id) logger.test_end(test.id, status="SKIP") skipped_tests += 1 diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/stash.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/stash.py index d13703c16eb..8b6fd34f02c 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/stash.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/stash.py @@ -6,23 +6,29 @@ import threading from multiprocessing.managers import AcquirerProxy, BaseManager, DictProxy from six import text_type + class ServerDictManager(BaseManager): shared_data = {} + def _get_shared(): return ServerDictManager.shared_data + ServerDictManager.register("get_dict", callable=_get_shared, proxytype=DictProxy) ServerDictManager.register('Lock', threading.Lock, AcquirerProxy) + class ClientDictManager(BaseManager): pass + ClientDictManager.register("get_dict") ClientDictManager.register("Lock") + class StashServer(object): def __init__(self, address=None, authkey=None): self.address = address @@ -37,6 +43,7 @@ class StashServer(object): if self.manager is not None: self.manager.shutdown() + def load_env_config(): address, authkey = json.loads(os.environ["WPT_STASH_CONFIG"]) if isinstance(address, list): @@ -46,10 +53,12 @@ def load_env_config(): authkey = base64.b64decode(authkey) return address, authkey + def store_env_config(address, authkey): authkey = base64.b64encode(authkey) os.environ["WPT_STASH_CONFIG"] = json.dumps((address, authkey.decode("ascii"))) + def start_server(address=None, authkey=None): if isinstance(authkey, text_type): authkey = authkey.encode("ascii") @@ -75,6 +84,7 @@ class LockWrapper(object): def __exit__(self, *args, **kwargs): self.release() + #TODO: Consider expiring values after some fixed time for long-running #servers @@ -173,5 +183,6 @@ class Stash(object): return value + class StashError(Exception): pass diff --git a/tests/wpt/web-platform-tests/user-timing/supported-usertiming-types.any.js b/tests/wpt/web-platform-tests/user-timing/supported-usertiming-types.any.js new file mode 100644 index 00000000000..a373c562f94 --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/supported-usertiming-types.any.js @@ -0,0 +1,11 @@ +test(() => { + if (typeof PerformanceObserver.supportedEntryTypes === "undefined") + assert_unreached("supportedEntryTypes is not supported."); + const types = PerformanceObserver.supportedEntryTypes; + assert_true(types.includes("mark"), + "There should be 'mark' in PerformanceObserver.supportedEntryTypes"); + assert_true(types.includes("measure"), + "There should be 'measure' in PerformanceObserver.supportedEntryTypes"); + assert_greater_than(types.indexOf("measure"), types.indexOf('mark'), + "The 'measure' entry should appear after the 'mark' entry"); +}, "supportedEntryTypes contains 'mark' and 'measure'."); diff --git a/tests/wpt/web-platform-tests/wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html b/tests/wpt/web-platform-tests/wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html index dbd8ec99f81..a0c25525e6b 100644 --- a/tests/wpt/web-platform-tests/wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html +++ b/tests/wpt/web-platform-tests/wake-lock/wakelock-enabled-on-self-origin-by-feature-policy.https.sub.html @@ -12,8 +12,8 @@ const cross_origin_src = "https://{{domains[www]}}:{{ports[https][0]}}" + same_origin_src; - promise_test(() => { - navigator.getWakeLock("screen"); + promise_test(t => { + return navigator.getWakeLock("screen"); }, 'Feature-Policy header wake-lock "self" allows the top-level document.'); async_test(t => { diff --git a/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-helper.js b/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-helper.js index 8f7c85df475..d7069493008 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-helper.js +++ b/tests/wpt/web-platform-tests/webrtc/RTCRtpParameters-helper.js @@ -19,6 +19,8 @@ async function doOfferAnswerExchange(t, caller) { const answer = await callee.createAnswer(); await callee.setLocalDescription(answer); await caller.setRemoteDescription(answer); + + return callee; } /* diff --git a/tests/wpt/web-platform-tests/webrtc/RTCRtpReceiver-getParameters.html b/tests/wpt/web-platform-tests/webrtc/RTCRtpReceiver-getParameters.html index 453844d5f0e..7f8ac673a60 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCRtpReceiver-getParameters.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCRtpReceiver-getParameters.html @@ -33,10 +33,51 @@ - transactionId and degradationPreference are left undefined. */ - test(t => { + promise_test(async t => { const pc = new RTCPeerConnection(); - const { receiver } = pc.addTransceiver('audio'); - const param = receiver.getParameters(); + t.add_cleanup(() => pc.close()); + pc.addTransceiver('audio'); + const callee = await doOfferAnswerExchange(t, pc); + const param = callee.getReceivers()[0].getParameters(); validateReceiverRtpParameters(param); - }); + + assert_greater_than(param.headerExtensions.length, 0); + assert_greater_than(param.codecs.length, 0); + assert_equals(param.encodings.length, 1); + }, 'getParameters() with audio receiver'); + + promise_test(async t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + pc.addTransceiver('video'); + const callee = await doOfferAnswerExchange(t, pc); + const param = callee.getReceivers()[0].getParameters(); + validateReceiverRtpParameters(param); + + assert_greater_than(param.headerExtensions.length, 0); + assert_greater_than(param.codecs.length, 0); + assert_equals(param.encodings.length, 1); + }, 'getParameters() with video receiver'); + + promise_test(async t => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + pc.addTransceiver('video', { + sendEncodings: [ + { rid: "rid1" }, + { rid: "rid2" } + ] + }); + const callee = await doOfferAnswerExchange(t, pc); + const param = callee.getReceivers()[0].getParameters(); + validateReceiverRtpParameters(param); + + assert_greater_than(param.headerExtensions.length, 0); + assert_greater_than(param.codecs.length, 0); + assert_equals(param.encodings.length, 2, 'layer count must match'); + assert_equals(param.encodings[0].rid, "rid1", + 'simulcast rids must match'); + assert_equals(param.encodings[1].rid, "rid2", + 'simulcast rids must match'); + }, 'getParameters() with simulcast video receiver'); </script> diff --git a/tests/wpt/web-platform-tests/webrtc/RTCRtpSender-transport.https.html b/tests/wpt/web-platform-tests/webrtc/RTCRtpSender-transport.https.html new file mode 100644 index 00000000000..c687911d09d --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/RTCRtpSender-transport.https.html @@ -0,0 +1,84 @@ +<!doctype html> +<meta charset=utf-8> +<title>RTCRtpSender.transport</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="dictionary-helper.js"></script> +<script src="RTCPeerConnection-helper.js"></script> +<script> + 'use strict'; + + // Spec link: http://w3c.github.io/webrtc-pc/#dom-rtcrtpsender-transport + promise_test(async t => { + const caller = new RTCPeerConnection(); + t.add_cleanup(() => caller.close()); + const stream = await navigator.mediaDevices.getUserMedia({audio: true}); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + const [track] = stream.getTracks(); + const sender = caller.addTrack(track); + assert_equals(sender.transport, null); + }, 'RTCRtpSender.transport is null when unconnected'); + + // Test for the simple/happy path of connecting a single track + promise_test(async t => { + const caller = new RTCPeerConnection(); + t.add_cleanup(() => caller.close()); + const stream = await navigator.mediaDevices.getUserMedia({audio: true}); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + const [track] = stream.getTracks(); + const sender = caller.addTrack(track); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + exchangeIceCandidates(caller, callee); + await exchangeOfferAndListenToOntrack(t, caller, callee); + assert_not_equals(sender.transport, null); + const [transceiver] = caller.getTransceivers(); + assert_equals(transceiver.sender.transport, + transceiver.receiver.transport); + }, 'RTCRtpSender/receiver.transport has a value when connected'); + + // Test with multiple tracks, and checking details of when things show up + // for different bundle policies. + for (let bundle_policy of ['balanced', 'max-bundle', 'max-compat']) { + promise_test(async t => { + const caller = new RTCPeerConnection({bundlePolicy: bundle_policy}); + t.add_cleanup(() => caller.close()); + const stream = await navigator.mediaDevices.getUserMedia( + {audio: true, video:true}); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + const [track1, track2] = stream.getTracks(); + const sender1 = caller.addTrack(track1); + const sender2 = caller.addTrack(track2); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + exchangeIceCandidates(caller, callee); + const offer = await caller.createOffer(); + assert_equals(sender1.transport, null); + assert_equals(sender2.transport, null); + await caller.setLocalDescription(offer); + assert_not_equals(sender1.transport, null); + assert_not_equals(sender2.transport, null); + const [caller_transceiver1, caller_transceiver2] = caller.getTransceivers(); + assert_equals(sender1.transport, caller_transceiver1.sender.transport); + if (bundle_policy == 'max-bundle') { + assert_equals(caller_transceiver1.sender.transport, + caller_transceiver2.sender.transport); + } else { + assert_not_equals(caller_transceiver1.sender.transport, + caller_transceiver2.sender.transport); + } + await callee.setRemoteDescription(offer); + const [callee_transceiver1, callee_transceiver2] = callee.getTransceivers(); + assert_not_equals(callee_transceiver1.receiver.transport, null); + assert_not_equals(callee_transceiver2.receiver.transport, null); + const answer = await callee.createAnswer(); + await callee.setLocalDescription(answer); + // At this point, bundle should have kicked in. + assert_equals(callee_transceiver1.receiver.transport, + callee_transceiver2.receiver.transport); + await caller.setRemoteDescription(answer); + assert_equals(caller_transceiver1.receiver.transport, + caller_transceiver2.receiver.transport); + }, 'RTCRtpSender/receiver.transport at the right time, with bundle policy ' + bundle_policy); + } + </script> |