diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index c75740964c8..3ba00c74978 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -1,8 +1,5 @@ { "items": { - "conformancechecker": { - "html/semantics/embedded-content/media-elements/src_object_blob.html": [] - }, "manual": { "2dcontext/conformance-requirements/2d.coordinatespace-manual.html": [ [ @@ -12766,7 +12763,6 @@ {} ] ], - "html/semantics/embedded-content/media-elements/src_object_blob.html": [], "html/semantics/embedded-content/media-elements/video_controls_present-manual.html": [ [ "html/semantics/embedded-content/media-elements/video_controls_present-manual.html", @@ -13685,6 +13681,12 @@ {} ] ], + "payment-request/payment-response/payerdetailschange-updateWith-manual.https.html": [ + [ + "payment-request/payment-response/payerdetailschange-updateWith-manual.https.html", + {} + ] + ], "payment-request/payment-response/rejects_if_not_active-manual.https.html": [ [ "payment-request/payment-response/rejects_if_not_active-manual.https.html", @@ -19067,6 +19069,12 @@ {} ] ], + "web-nfc/NFCReader_options_url-manual.https.html": [ + [ + "web-nfc/NFCReader_options_url-manual.https.html", + {} + ] + ], "web-nfc/nfc_hw_disabled-manual.https.html": [ [ "web-nfc/nfc_hw_disabled-manual.https.html", @@ -194971,7 +194979,6 @@ {} ] ], - "html/semantics/embedded-content/media-elements/src_object_blob.html": [], "html/semantics/embedded-content/media-elements/track/track-element/track-cue-rendering-after-controls-added.html": [ [ "html/semantics/embedded-content/media-elements/track/track-element/track-cue-rendering-after-controls-added.html", @@ -202220,7 +202227,6 @@ {} ] ], - "html/semantics/embedded-content/media-elements/src_object_blob.html": [], "infrastructure/assumptions/ahem-ref.html": [ [ "infrastructure/assumptions/ahem-ref.html", @@ -202319,7 +202325,6 @@ ] }, "stub": { - "html/semantics/embedded-content/media-elements/src_object_blob.html": [], "service-workers/stub-3.1-service-worker-obj.html": [ [ "service-workers/stub-3.1-service-worker-obj.html", @@ -301102,7 +301107,6 @@ {} ] ], - "html/semantics/embedded-content/media-elements/src_object_blob.html": [], "html/semantics/embedded-content/media-elements/track/track-element/cors/support/common.js": [ [ {} @@ -326168,6 +326172,11 @@ {} ] ], + "user-timing/resources/user-timing-helper.js": [ + [ + {} + ] + ], "user-timing/resources/webperftestharness.js": [ [ {} @@ -392703,6 +392712,12 @@ {} ] ], + "html/semantics/forms/the-output-element/mutations.window.js": [ + [ + "html/semantics/forms/the-output-element/mutations.window.html", + {} + ] + ], "html/semantics/forms/the-output-element/output-setcustomvalidity.html": [ [ "html/semantics/forms/the-output-element/output-setcustomvalidity.html", @@ -393096,13 +393111,17 @@ "html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html": [ [ "html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html", - {} + { + "timeout": "long" + } ] ], "html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html": [ [ "html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html", - {} + { + "timeout": "long" + } ] ], "html/semantics/rellist-feature-detection.html": [ @@ -427714,6 +427733,12 @@ {} ] ], + "service-workers/service-worker/data-transfer-files.https.html": [ + [ + "service-workers/service-worker/data-transfer-files.https.html", + {} + ] + ], "service-workers/service-worker/dedicated-worker-service-worker-interception.https.html": [ [ "service-workers/service-worker/dedicated-worker-service-worker-interception.https.html", @@ -436038,6 +436063,12 @@ {} ] ], + "svg/pservers/pattern-with-invalid-base-cloned-crash.html": [ + [ + "svg/pservers/pattern-with-invalid-base-cloned-crash.html", + {} + ] + ], "svg/pservers/scripted/stop-color-inheritance-currentcolor.svg": [ [ "svg/pservers/scripted/stop-color-inheritance-currentcolor.svg", @@ -437453,12 +437484,30 @@ {} ] ], + "user-timing/mark-errors.html": [ + [ + "user-timing/mark-errors.html", + {} + ] + ], + "user-timing/mark-l3.html": [ + [ + "user-timing/mark-l3.html", + {} + ] + ], "user-timing/mark-measure-feature-detection.html": [ [ "user-timing/mark-measure-feature-detection.html", {} ] ], + "user-timing/mark-measure-return-objects.html": [ + [ + "user-timing/mark-measure-return-objects.html", + {} + ] + ], "user-timing/mark.any.js": [ [ "user-timing/mark.any.html", @@ -437481,6 +437530,18 @@ {} ] ], + "user-timing/measure-l3.html": [ + [ + "user-timing/measure-l3.html", + {} + ] + ], + "user-timing/measure-with-dict.html": [ + [ + "user-timing/measure-with-dict.html", + {} + ] + ], "user-timing/measure.html": [ [ "user-timing/measure.html", @@ -444056,6 +444117,14 @@ {} ] ], + "webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html": [ + [ + "webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html", + { + "timeout": "long" + } + ] + ], "webrtc/RTCPeerConnection-iceConnectionState.https.html": [ [ "webrtc/RTCPeerConnection-iceConnectionState.https.html", @@ -472946,7 +473015,6 @@ {} ] ], - "html/semantics/embedded-content/media-elements/src_object_blob.html": [], "svg/text/visualtests/text-inline-size-001-visual.svg": [ [ "svg/text/visualtests/text-inline-size-001-visual.svg", @@ -472997,7 +473065,6 @@ ] }, "wdspec": { - "html/semantics/embedded-content/media-elements/src_object_blob.html": [], "infrastructure/webdriver/tests/test_load_file.py": [ [ "infrastructure/webdriver/tests/test_load_file.py", @@ -618738,7 +618805,7 @@ "testharness" ], "css/css-variables/variable-exponential-blowup.html": [ - "513a6f1628f17d31211b75ce4351b7dc95523a87", + "36a67d343882dd59d8139dd9edc8d94a2cf44b54", "testharness" ], "css/css-variables/variable-first-letter.html": [ @@ -640366,7 +640433,7 @@ "testharness" ], "dom/events/Event-dispatch-on-disabled-elements.html": [ - "b4786ab16b5db6fc569394d806e10fd9665200dd", + "72e63c4d1e97f1113dd7db357921fd1b0ab9372b", "testharness" ], "dom/events/Event-dispatch-order.html": [ @@ -659742,7 +659809,7 @@ "testharness" ], "html/semantics/embedded-content/media-elements/track/track-element/track-cues-missed.html": [ - "043c941b123b186ee8814aa93d750403be5962e9", + "2acae212d231f6433ae4eff01039a263d9fa817b", "testharness" ], "html/semantics/embedded-content/media-elements/track/track-element/track-cues-pause-on-exit.html": [ @@ -662709,6 +662776,10 @@ "cccdc37487e38917fec3aff21ed772ce760b8f05", "testharness" ], + "html/semantics/forms/the-output-element/mutations.window.js": [ + "aedfc8a54cb499587aed4c10942f67798bcbe66f", + "testharness" + ], "html/semantics/forms/the-output-element/output-setcustomvalidity.html": [ "1166eeb610fc4a2c4b2e95c16843fbb5065354e1", "testharness" @@ -663298,11 +663369,11 @@ "support" ], "html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener.html": [ - "32bf32c30418fa32e376f6813d72d7e3a74f72d4", + "97320090cf039c7352d3f302a42c4bee8765bbd7", "testharness" ], "html/semantics/links/links-created-by-a-and-area-elements/target_blank_implicit_noopener_base.html": [ - "44b91a2ffb0c5c09cdf2ab4f2246c5f7bb28f5dc", + "8d1b54baccdfd49403c6d192d4c287d3d8818636", "testharness" ], "html/semantics/links/linktypes/alternate-css-ref.html": [ @@ -674422,7 +674493,7 @@ "support" ], "netinfo/idlharness.any.js": [ - "4610508b69b1e30db574e04f2651b40cb8b646f2", + "96b114fdb56d38935c085b8fd5f4f4689dad9858", "testharness" ], "netinfo/netinfo-basics.html": [ @@ -681793,6 +681864,10 @@ "85a44a819cd8555e032520f887cf89508bdb98b6", "manual" ], + "payment-request/payment-response/payerdetailschange-updateWith-manual.https.html": [ + "30e27088e7de1384489fcf9aa72391d353e34b36", + "manual" + ], "payment-request/payment-response/rejects_if_not_active-manual.https.html": [ "516573c581a0a047a2f9b9a89d027568f8567c05", "manual" @@ -695769,6 +695844,10 @@ "7147c33a0482443b4b332b832c6266a343aaed13", "testharness" ], + "service-workers/service-worker/data-transfer-files.https.html": [ + "cc8ab6e672726e168b44dfee5b4720012fffee0a", + "testharness" + ], "service-workers/service-worker/dedicated-worker-service-worker-interception.https.html": [ "2144f4827121b4902d8c56a61df823f04ee8801d", "testharness" @@ -696682,7 +696761,7 @@ "support" ], "service-workers/service-worker/resources/fetch-event-network-fallback-worker.js": [ - "daa200c2badb82964cc350699832a730b52c91a4", + "376bdbed05e186f7a125c2ef7ce296b6ddb8beae", "support" ], "service-workers/service-worker/resources/fetch-event-respond-with-argument-iframe.html": [ @@ -702685,6 +702764,10 @@ "73516f62c15232a2a0409e3ca75684bff3fc92d7", "testharness" ], + "svg/pservers/pattern-with-invalid-base-cloned-crash.html": [ + "04a453545f5938489eb111a23a16c8c89065ed4e", + "testharness" + ], "svg/pservers/reftests/meshgradient-basic-001-ref.png": [ "691bff6244cd0abe046536efc0a100329b62d407", "support" @@ -708430,7 +708513,7 @@ "support" ], "tools/wpt/run.py": [ - "0ffc779d9339c20d78c673b6102d35aba71ad636", + "ffdd8efa946310cb6fa1c3fe61b33546919b2176", "support" ], "tools/wpt/testfiles.py": [ @@ -708702,7 +708785,7 @@ "support" ], "tools/wptrunner/wptrunner/browsers/chrome.py": [ - "5b586bad8c2214eb55dc1c3d43119f66981d7a7f", + "71f246f4b6d8452f321517ac62dc42e0db978e42", "support" ], "tools/wptrunner/wptrunner/browsers/chrome_android.py": [ @@ -708710,7 +708793,7 @@ "support" ], "tools/wptrunner/wptrunner/browsers/edge.py": [ - "027c8f87d493c29f5c38e02d7e0540aa8cca9fcd", + "21d41d1be2f20d28d5789bb0a08cf50884fe7e1f", "support" ], "tools/wptrunner/wptrunner/browsers/edge_webdriver.py": [ @@ -709326,7 +709409,7 @@ "support" ], "tools/wptserve/tests/functional/test_handlers.py": [ - "db119616bd673e0b3fb4784fff0d603c7b6a05ab", + "8163d365c919c2f0d867f5d6026d2f8b6f1c20b9", "support" ], "tools/wptserve/tests/functional/test_input_file.py": [ @@ -709378,7 +709461,7 @@ "support" ], "tools/wptserve/wptserve/handlers.py": [ - "2dd01e29338115c1c4c6e4a35973835fe0193137", + "e846ff807a6163688473d80e9cdbaca8d13f45ff", "support" ], "tools/wptserve/wptserve/logger.py": [ @@ -709398,7 +709481,7 @@ "support" ], "tools/wptserve/wptserve/response.py": [ - "00a609b2950ddbb696bf80f2ec0038f427f8f465", + "efc65ef180133a95dd606fd9a32742faf9cae52f", "support" ], "tools/wptserve/wptserve/router.py": [ @@ -710521,10 +710604,22 @@ "e47a3ba7a981e978cdf015f8fc6bfbae6762dba9", "testharness" ], + "user-timing/mark-errors.html": [ + "c182a39c65e12a4a697e4c42fb2bd7e3aa3c874d", + "testharness" + ], + "user-timing/mark-l3.html": [ + "429768d5557dbe04d6cddc20f526ab33ae8c9b44", + "testharness" + ], "user-timing/mark-measure-feature-detection.html": [ "6f1ad489e95680fc5d1be4e25dcaa2eeee9a0aa5", "testharness" ], + "user-timing/mark-measure-return-objects.html": [ + "d2d8cc3c70ed78dd040b1ac451e36cf45731e362", + "testharness" + ], "user-timing/mark.any.js": [ "781bbcbfca6cc042b7ef4d493f46215cf7a0d7df", "testharness" @@ -710537,6 +710632,14 @@ "e1f4c4e0f49484cedd8b6025bbe854c0503c94c1", "testharness" ], + "user-timing/measure-l3.html": [ + "0e8dacfef2bb71897bb5fe6872c783d71f8c36ef", + "testharness" + ], + "user-timing/measure-with-dict.html": [ + "83990a6c33314e4a7f6b965e21f0eafe2a2d92fb", + "testharness" + ], "user-timing/measure.html": [ "40f71a3362b581f3d0b23f5c0202a5d400a499b9", "testharness" @@ -710565,6 +710668,10 @@ "d0ab11e39aeff5b51f9294396c037744682b4bf9", "testharness" ], + "user-timing/resources/user-timing-helper.js": [ + "8d43768ec2819620bf637c41918e8a6e6bc72181", + "support" + ], "user-timing/resources/webperftestharness.js": [ "4a8e2de69fc803c7fd06d7372a0de395aceec670", "support" @@ -712581,6 +712688,10 @@ "5a0e88433f23d0ca8f71df8d9fcd0c7ebe036345", "testharness" ], + "web-nfc/NFCReader_options_url-manual.https.html": [ + "882d663c65491d9182ee6c4b7c5fb55e0da8923c", + "manual" + ], "web-nfc/NFCReadingEvent_constructor.https.html": [ "6cfcc0d3bddae2430152504fce839d1b96b12ce0", "testharness" @@ -715494,9 +715605,13 @@ "testharness" ], "webrtc/RTCPeerConnection-helper.js": [ - "90867b24fdab3f3228d8d25a1685ce62d03db69d", + "efbb1a23c88b2a5f524391cbe66c8495624ceaa3", "support" ], + "webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html": [ + "dbfc41e0c375dea0711a8cf312846cbdb27c570b", + "testharness" + ], "webrtc/RTCPeerConnection-iceConnectionState.https.html": [ "8acabf49766ba08999b8857d8cb6589d1587c843", "testharness" diff --git a/tests/wpt/metadata/cors/basic.htm.ini b/tests/wpt/metadata/cors/basic.htm.ini new file mode 100644 index 00000000000..4fd11a97b09 --- /dev/null +++ b/tests/wpt/metadata/cors/basic.htm.ini @@ -0,0 +1,4 @@ +[basic.htm] + [Same domain basic usage] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini index 9c9a4ae75f9..18755420aa9 100644 --- a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini +++ b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini @@ -314,3 +314,24 @@ [Matching font-style: 'oblique 0deg' should prefer 'italic' over 'oblique -50deg -20deg'] expected: FAIL + [Matching font-style: 'oblique -20deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] + expected: FAIL + + [Matching font-weight: '400' should prefer '450 460' over '500'] + expected: FAIL + + [Matching font-weight: '399' should prefer '450 460' over '500 501'] + expected: FAIL + + [Matching font-weight: '501' should prefer '503 520' over '500'] + expected: FAIL + + [Matching font-weight: '501' should prefer '502 510' over '503 520'] + expected: FAIL + + [Matching font-style: 'oblique 20deg' should prefer 'oblique 40deg 50deg' over 'oblique 10deg'] + expected: FAIL + + [Matching font-stretch: '90%' should prefer '90% 100%' over '50% 80%'] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini b/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini index 1c8f983cd37..8850ec200da 100644 --- a/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini +++ b/tests/wpt/metadata/css/css-transitions/transitions-animatable-properties-01.html.ini @@ -74,6 +74,3 @@ [opacity end] expected: FAIL - [outline-width end] - expected: FAIL - diff --git a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini index e89282b04a1..ff5b07adb77 100644 --- a/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini +++ b/tests/wpt/metadata/css/cssom-view/elementsFromPoint-iframes.html.ini @@ -1,5 +1,5 @@ [elementsFromPoint-iframes.html] - expected: CRASH + expected: TIMEOUT [elementsFromPoint on the root document for points in iframe elements] expected: FAIL diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index b57d51b415b..e1632fe21a0 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -1,7 +1,7 @@ [response.window.html] expected: TIMEOUT [fetch(): combined response Content-Type: text/plain ] - expected: NOTRUN + expected: FAIL [Response: combined response Content-Type: text/plain;charset=gbk text/plain;charset=windows-1252] expected: NOTRUN @@ -22,7 +22,7 @@ expected: NOTRUN [ +
+ +
+ + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-network-fallback-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-network-fallback-worker.js index daa200c2bad..376bdbed05e 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-network-fallback-worker.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-network-fallback-worker.js @@ -1,3 +1,3 @@ self.addEventListener('fetch', () => { - // Do nothing. - }); + // Do nothing. +}); diff --git a/tests/wpt/web-platform-tests/svg/pservers/pattern-with-invalid-base-cloned-crash.html b/tests/wpt/web-platform-tests/svg/pservers/pattern-with-invalid-base-cloned-crash.html new file mode 100644 index 00000000000..04a453545f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/pservers/pattern-with-invalid-base-cloned-crash.html @@ -0,0 +1,23 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py index 0ffc779d933..ffdd8efa946 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/run.py +++ b/tests/wpt/web-platform-tests/tools/wpt/run.py @@ -106,7 +106,7 @@ otherwise install OpenSSL and ensure that it's on your $PATH.""") def check_environ(product): - if product not in ("firefox", "servo"): + if product not in ("chrome", "firefox", "servo"): config_builder = serve.build_config(os.path.join(wpt_root, "config.json")) # Override the ports to avoid looking for free ports config_builder.ssl = {"type": "none"} @@ -278,15 +278,6 @@ class Chrome(BrowserSetup): logger.info("Automatically turning on experimental features for Chrome Dev") kwargs["binary_args"].append("--enable-experimental-web-platform-features") - # Allow audio autoplay without a user gesture. - kwargs["binary_args"].append("--autoplay-policy=no-user-gesture-required") - - # Allow WebRTC tests to call getUserMedia. - kwargs["binary_args"] += ["--use-fake-ui-for-media-stream", "--use-fake-device-for-media-stream"] - - # Shorten delay for Reporting . - kwargs["binary_args"].append("--short-reporting-delay") - class ChromeAndroid(BrowserSetup): name = "chrome_android" 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 5b586bad8c2..71f246f4b6d 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 @@ -56,15 +56,29 @@ 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] + chrome_options = capabilities["goog:chromeOptions"] + if kwargs["binary"] is not None: + chrome_options["binary"] = kwargs["binary"] - if kwargs["headless"]: - if "args" not in capabilities["goog:chromeOptions"]: - capabilities["goog:chromeOptions"]["args"] = [] - if "--headless" not in capabilities["goog:chromeOptions"]["args"]: - capabilities["goog:chromeOptions"]["args"].append("--headless") + # Here we set a few Chrome flags that are always passed. + chrome_options["args"] = [] + # Allow audio autoplay without a user gesture. + chrome_options["args"].append("--autoplay-policy=no-user-gesture-required") + # Allow WebRTC tests to call getUserMedia. + chrome_options["args"].append("--use-fake-ui-for-media-stream") + chrome_options["args"].append("--use-fake-device-for-media-stream") + # Shorten delay for Reporting . + chrome_options["args"].append("--short-reporting-delay") + # Point all .test domains to localhost for Chrome + chrome_options["args"].append("--host-resolver-rules=MAP nonexistent.*.test ~NOTFOUND, MAP *.test 127.0.0.1") + + # Copy over any other flags that were passed in via --binary_args + if kwargs["binary_args"] is not None: + chrome_options["args"].extend(kwargs["binary_args"]) + + # Pass the --headless flag to Chrome if WPT's own --headless flag was set + if kwargs["headless"] and "--headless" not in chrome_options["args"]: + chrome_options["args"].append("--headless") executor_kwargs["capabilities"] = capabilities @@ -76,7 +90,7 @@ def env_extras(**kwargs): def env_options(): - return {} + return {"server_host": "127.0.0.1"} class ChromeBrowser(Browser): 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 027c8f87d49..21d41d1be2f 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 @@ -102,8 +102,8 @@ class EdgeBrowser(Browser): def run_info_extras(**kwargs): - osReleaseCommand = "(Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion').ReleaseId" - osBuildCommand = "(Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion').BuildLabEx" + osReleaseCommand = r"(Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion').ReleaseId" + osBuildCommand = r"(Get-ItemProperty 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion').BuildLabEx" try: os_release = subprocess.check_output(["powershell.exe", osReleaseCommand]).strip() os_build = subprocess.check_output(["powershell.exe", osBuildCommand]).strip() diff --git a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py index db119616bd6..8163d365c91 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_handlers.py @@ -20,7 +20,6 @@ class TestFileHandler(TestUsingServer): self.assertEqual("text/plain", resp.info()["Content-Type"]) self.assertEqual(open(os.path.join(doc_root, "document.txt"), 'rb').read(), resp.read()) - @pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2") def test_headers(self): resp = self.request("/with_headers.txt") self.assertEqual(200, resp.getcode()) @@ -29,7 +28,7 @@ class TestFileHandler(TestUsingServer): # This will fail if it isn't a valid uuid uuid.UUID(resp.info()["Another-Header"]) self.assertEqual(resp.info()["Same-Value-Header"], resp.info()["Another-Header"]) - self.assertEqual(resp.info()["Double-Header"], "PA, SS") + self.assert_multiple_headers(resp, "Double-Header", ["PA", "SS"]) def test_range(self): @@ -61,7 +60,6 @@ class TestFileHandler(TestUsingServer): resp.info()['Content-Range']) self.assertEqual(expected[-10:], data) - @pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2") def test_multiple_ranges(self): resp = self.request("/document.txt", headers={"Range":"bytes=1-2,5-7,6-10"}) self.assertEqual(206, resp.getcode()) @@ -69,16 +67,16 @@ class TestFileHandler(TestUsingServer): expected = open(os.path.join(doc_root, "document.txt"), 'rb').read() self.assertTrue(resp.info()["Content-Type"].startswith("multipart/byteranges; boundary=")) boundary = resp.info()["Content-Type"].split("boundary=")[1] - parts = data.split("--" + boundary) - self.assertEqual("\r\n", parts[0]) - self.assertEqual("--", parts[-1]) - expected_parts = [("1-2", expected[1:3]), ("5-10", expected[5:11])] + parts = data.split(b"--" + boundary.encode("ascii")) + self.assertEqual(b"\r\n", parts[0]) + self.assertEqual(b"--", parts[-1]) + expected_parts = [(b"1-2", expected[1:3]), (b"5-10", expected[5:11])] for expected_part, part in zip(expected_parts, parts[1:-1]): - header_string, body = part.split("\r\n\r\n") - headers = dict(item.split(": ", 1) for item in header_string.split("\r\n") if item.strip()) - self.assertEqual(headers["Content-Type"], "text/plain") - self.assertEqual(headers["Content-Range"], "bytes %s/%i" % (expected_part[0], len(expected))) - self.assertEqual(expected_part[1] + "\r\n", body) + header_string, body = part.split(b"\r\n\r\n") + headers = dict(item.split(b": ", 1) for item in header_string.split(b"\r\n") if item.strip()) + self.assertEqual(headers[b"Content-Type"], b"text/plain") + self.assertEqual(headers[b"Content-Range"], b"bytes %s/%i" % (expected_part[0], len(expected))) + self.assertEqual(expected_part[1] + b"\r\n", body) def test_range_invalid(self): with self.assertRaises(HTTPError) as cm: @@ -236,12 +234,11 @@ class TestJSONHandler(TestUsingServer): class TestPythonHandler(TestUsingServer): - @pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2") def test_string(self): resp = self.request("/test_string.py") self.assertEqual(200, resp.getcode()) self.assertEqual("text/plain", resp.info()["Content-Type"]) - self.assertEqual("PASS", resp.read()) + self.assertEqual(b"PASS", resp.read()) def test_tuple_2(self): resp = self.request("/test_tuple_2.py") diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py index 2dd01e29338..e846ff807a6 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py @@ -159,8 +159,8 @@ class FileHandler(object): rv = (self.load_headers(request, os.path.join(os.path.split(path)[0], "__dir__")) + self.load_headers(request, path)) - if not any(key.lower() == "content-type" for (key, _) in rv): - rv.insert(0, ("Content-Type", guess_content_type(path))) + if not any(key.lower() == b"content-type" for (key, _) in rv): + rv.insert(0, (b"Content-Type", guess_content_type(path).encode("ascii"))) return rv @@ -173,14 +173,14 @@ class FileHandler(object): use_sub = False try: - with open(headers_path) as headers_file: + with open(headers_path, "rb") as headers_file: data = headers_file.read() except IOError: return [] else: if use_sub: data = template(request, data, escape_type="none") - return [tuple(item.strip() for item in line.split(":", 1)) + return [tuple(item.strip() for item in line.split(b":", 1)) for line in data.splitlines() if line] def get_data(self, response, path, byte_ranges): diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py index 00a609b2950..efc65ef1801 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py @@ -8,7 +8,7 @@ from .constants import response_codes, h2_headers from .logger import get_logger from io import BytesIO -from six import binary_type, text_type, itervalues +from six import binary_type, text_type, integer_types, itervalues, PY3 from hyperframe.frame import HeadersFrame, DataFrame, ContinuationFrame from hpack.struct import HeaderTuple @@ -157,6 +157,8 @@ class Response(object): cookies = self.headers.get("Set-Cookie") parser = BaseCookie() for cookie in cookies: + if PY3: + cookie = cookie.decode("iso-8859-1") parser.load(cookie) if name in parser.keys(): @@ -237,18 +239,18 @@ class MultipartContent(object): def __init__(self, boundary=None, default_content_type=None): self.items = [] if boundary is None: - boundary = str(uuid.uuid4()) + boundary = text_type(uuid.uuid4()) self.boundary = boundary self.default_content_type = default_content_type def __call__(self): - boundary = "--" + self.boundary - rv = ["", boundary] + boundary = b"--" + self.boundary.encode("ascii") + rv = [b"", boundary] for item in self.items: - rv.append(str(item)) + rv.append(item.to_bytes()) rv.append(boundary) - rv[-1] += "--" - return "\r\n".join(rv) + rv[-1] += b"--" + return b"\r\n".join(rv) def append_part(self, data, content_type=None, headers=None): if content_type is None: @@ -265,6 +267,7 @@ class MultipartContent(object): class MultipartPart(object): def __init__(self, data, content_type=None, headers=None): + assert isinstance(data, binary_type), data self.headers = ResponseHeaders() if content_type is not None: @@ -272,7 +275,7 @@ class MultipartPart(object): if headers is not None: for name, value in headers: - if name.lower() == "content-type": + if name.lower() == b"content-type": func = self.headers.set else: func = self.headers.append @@ -280,13 +283,36 @@ class MultipartPart(object): self.data = data - def __str__(self): + def to_bytes(self): rv = [] - for item in self.headers: - rv.append("%s: %s" % item) - rv.append("") + for key, value in self.headers: + assert isinstance(key, binary_type) + assert isinstance(value, binary_type) + rv.append(b"%s: %s" % (key, value)) + rv.append(b"") rv.append(self.data) - return "\r\n".join(rv) + return b"\r\n".join(rv) + + +def _maybe_encode(s): + """Encodes a text-type string into binary data using iso-8859-1. + + Returns `str` in Python 2 and `bytes` in Python 3. The function is a no-op + if the argument already has a binary type. + """ + if isinstance(s, binary_type): + return s + + # Python 3 assumes iso-8859-1 when parsing headers, which will garble text + # with non ASCII characters. We try to encode the text back to binary. + # https://github.com/python/cpython/blob/273fc220b25933e443c82af6888eb1871d032fb8/Lib/http/client.py#L213 + if isinstance(s, text_type): + return s.encode("iso-8859-1") + + if isinstance(s, integer_types): + return b"%i" % (s,) + + raise TypeError("Unexpected value in ResponseHeaders: %r" % s) class ResponseHeaders(object): @@ -301,6 +327,8 @@ class ResponseHeaders(object): :param key: Name of the header to set :param value: Value to set the header to """ + key = _maybe_encode(key) + value = _maybe_encode(value) self.data[key.lower()] = (key, [value]) def append(self, key, value): @@ -310,6 +338,8 @@ class ResponseHeaders(object): :param key: Name of the header to add :param value: Value to set for the header """ + key = _maybe_encode(key) + value = _maybe_encode(value) if key.lower() in self.data: self.data[key.lower()][1].append(value) else: @@ -317,6 +347,7 @@ class ResponseHeaders(object): def get(self, key, default=missing): """Get the set values for a particular header.""" + key = _maybe_encode(key) try: return self[key] except KeyError: @@ -328,12 +359,15 @@ class ResponseHeaders(object): """Get a list of values for a particular header """ + key = _maybe_encode(key) return self.data[key.lower()][1] def __delitem__(self, key): + key = _maybe_encode(key) del self.data[key.lower()] def __contains__(self, key): + key = _maybe_encode(key) return key.lower() in self.data def __setitem__(self, key, value): @@ -623,6 +657,9 @@ class ResponseWriter(object): self.file_chunk_size = 32 * 1024 self.default_status = 200 + def _seen_header(self, name): + return self.encode(name.lower()) in self._headers_seen + def write_status(self, code, message=None): """Write out the status line of a response. @@ -648,19 +685,25 @@ class ResponseWriter(object): """ if not self._status_written: self.write_status(self.default_status) - self._headers_seen.add(name.lower()) - self.write("%s: %s\r\n" % (name, value)) + self._headers_seen.add(self.encode(name.lower())) + self.write(name) + self.write(b": ") + if isinstance(value, int): + self.write(text_type(value)) + else: + self.write(value) + self.write(b"\r\n") if not self._response.explicit_flush: self.flush() def write_default_headers(self): for name, f in [("Server", self._handler.version_string), ("Date", self._handler.date_time_string)]: - if name.lower() not in self._headers_seen: + if not self._seen_header(name): self.write_header(name, f()) if (isinstance(self._response.content, (binary_type, text_type)) and - "content-length" not in self._headers_seen): + not self._seen_header("content-length")): #Would be nice to avoid double-encoding here self.write_header("Content-Length", len(self.encode(self._response.content))) @@ -675,7 +718,7 @@ class ResponseWriter(object): self.write_default_headers() self.write("\r\n") - if "content-length" not in self._headers_seen: + if not self._seen_header("content-length"): self._response.close_connection = True if not self._response.explicit_flush: self.flush() @@ -735,7 +778,7 @@ class ResponseWriter(object): elif isinstance(data, text_type): return data.encode(self._response.encoding) else: - raise ValueError + raise ValueError("data %r should be text or binary, but is %s" % (data, type(data))) def flush(self): """Flush the output. Returns False if the flush failed due to diff --git a/tests/wpt/web-platform-tests/user-timing/mark-errors.html b/tests/wpt/web-platform-tests/user-timing/mark-errors.html new file mode 100644 index 00000000000..c182a39c65e --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/mark-errors.html @@ -0,0 +1,23 @@ + + +UserTimingL3: errors are thrown when mark() is called incorrectly. + + +

UserTimingL3: Mark

+ diff --git a/tests/wpt/web-platform-tests/user-timing/mark-l3.html b/tests/wpt/web-platform-tests/user-timing/mark-l3.html new file mode 100644 index 00000000000..429768d5557 --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/mark-l3.html @@ -0,0 +1,45 @@ + + +User Timing L3: mark + + + + diff --git a/tests/wpt/web-platform-tests/user-timing/mark-measure-return-objects.html b/tests/wpt/web-platform-tests/user-timing/mark-measure-return-objects.html new file mode 100644 index 00000000000..d2d8cc3c70e --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/mark-measure-return-objects.html @@ -0,0 +1,46 @@ + + +UserTiming L3: mark/measure methods return objects. + + +

Custom User Timing: L3 API returns a mark/measure object

+
+ diff --git a/tests/wpt/web-platform-tests/user-timing/measure-l3.html b/tests/wpt/web-platform-tests/user-timing/measure-l3.html new file mode 100644 index 00000000000..0e8dacfef2b --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/measure-l3.html @@ -0,0 +1,40 @@ + + +UserTiming L3: Measure basic usage + + + diff --git a/tests/wpt/web-platform-tests/user-timing/measure-with-dict.html b/tests/wpt/web-platform-tests/user-timing/measure-with-dict.html new file mode 100644 index 00000000000..83990a6c333 --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/measure-with-dict.html @@ -0,0 +1,95 @@ + + +User Timing L3: measure is customizable + + + + diff --git a/tests/wpt/web-platform-tests/user-timing/resources/user-timing-helper.js b/tests/wpt/web-platform-tests/user-timing/resources/user-timing-helper.js new file mode 100644 index 00000000000..8d43768ec28 --- /dev/null +++ b/tests/wpt/web-platform-tests/user-timing/resources/user-timing-helper.js @@ -0,0 +1,30 @@ +// Compares a list of performance entries to a predefined one. +// actualEntries is an array of performance entries from the user agent, +// and expectedEntries is an array of performance entries minted by the test. +// The comparison doesn't assert the order of the entries. +function checkEntries(actualEntries, expectedEntries) { + assert_equals(actualEntries.length, expectedEntries.length, + `The length of actual and expected entries should match. + actual: ${JSON.stringify(actualEntries)}, + expected: ${JSON.stringify(expectedEntries)}`); + const actualEntrySet = new Set(actualEntries.map(ae=>ae.name)); + assert_equals(actualEntrySet.size, actualEntries.length, `Actual entry names are not unique: ${JSON.stringify(actualEntries)}`); + const expectedEntrySet = new Set(expectedEntries.map(ee=>ee.name)); + assert_equals(expectedEntrySet.size, expectedEntries.length, `Expected entry names are not unique: ${JSON.stringify(expectedEntries)}`); + actualEntries.forEach(ae=>{ + const expectedEntry = expectedEntries.find(e=>e.name === ae.name); + assert_true(!!expectedEntry, `Entry name '${ae.name}' was not found.`); + checkEntry(ae, expectedEntry); + }); +} + +function checkEntry(entry, {name, entryType, startTime, detail, duration}) { + assert_equals(entry.name, name); + assert_equals(entry.entryType, entryType); + if (startTime !== undefined) + assert_equals(entry.startTime, startTime); + if (detail !== undefined) + assert_equals(JSON.stringify(entry.detail), JSON.stringify(detail)); + if (duration !== undefined) + assert_equals(entry.duration, duration); +} diff --git a/tests/wpt/web-platform-tests/web-nfc/NFCReader_options_url-manual.https.html b/tests/wpt/web-platform-tests/web-nfc/NFCReader_options_url-manual.https.html new file mode 100644 index 00000000000..882d663c654 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-nfc/NFCReader_options_url-manual.https.html @@ -0,0 +1,44 @@ + + +Web NFC Test: NFCReader NFCReaderOptions url test + + + + + + + +

Tap an NFC tag to the test device with NFC support.

+ +

Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.

+ +
+ + diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js index 90867b24fda..efbb1a23c88 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-helper.js @@ -224,6 +224,21 @@ function listenToIceConnected(pc) { }); } +// Returns a promise that resolves when |pc.iceConnectionState| is in one of the +// wanted states. +function waitForIceStateChange(pc, wantedStates) { + return new Promise((resolve) => { + if (wantedStates.includes(pc.iceConnectionState)) { + resolve(); + return; + } + pc.addEventListener('iceconnectionstatechange', () => { + if (wantedStates.includes(pc.iceConnectionState)) + resolve(); + }); + }); +} + // Returns a promise that resolves when |pc.connectionState| is 'connected'. function listenToConnected(pc) { return new Promise((resolve) => { diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html new file mode 100644 index 00000000000..dbfc41e0c37 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-iceConnectionState-disconnected.https.html @@ -0,0 +1,30 @@ + + + +RTCPeerConnection.prototype.iceConnectionState - disconnection + + + +