Update web-platform-tests to revision b8669365b81965f5400d6b13a7783415b44e679d

This commit is contained in:
WPT Sync Bot 2019-04-03 21:42:50 -04:00
parent 6fa1853bb1
commit bde105ca2e
42 changed files with 933 additions and 241 deletions

View file

@ -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"

View file

@ -0,0 +1,4 @@
[basic.htm]
[Same domain basic usage]
expected: FAIL

View file

@ -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

View file

@ -74,6 +74,3 @@
[opacity end]
expected: FAIL
[outline-width end]
expected: FAIL

View file

@ -1,5 +1,5 @@
[elementsFromPoint-iframes.html]
expected: CRASH
expected: TIMEOUT
[elementsFromPoint on the root document for points in iframe elements]
expected: FAIL

View file

@ -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
[<iframe>: combined response Content-Type: text/plain */*;charset=gbk]
expected: TIMEOUT
expected: FAIL
[fetch(): separate response Content-Type: text/html;x=" text/plain]
expected: NOTRUN
@ -64,7 +64,7 @@
expected: NOTRUN
[fetch(): combined response Content-Type: text/html text/plain]
expected: NOTRUN
expected: FAIL
[Request: combined response Content-Type: text/html;charset=gbk text/plain text/html]
expected: NOTRUN
@ -76,19 +76,19 @@
expected: NOTRUN
[Response: combined response Content-Type: text/plain ]
expected: NOTRUN
expected: FAIL
[fetch(): combined response Content-Type: text/plain;charset=gbk text/plain]
expected: NOTRUN
[Request: combined response Content-Type: text/html text/plain]
expected: NOTRUN
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*]
expected: TIMEOUT
expected: FAIL
[<iframe>: combined response Content-Type: text/plain;charset=gbk text/html;charset=windows-1254]
expected: TIMEOUT
expected: FAIL
[Request: combined response Content-Type: text/plain */*]
expected: NOTRUN
@ -118,13 +118,13 @@
expected: NOTRUN
[Response: combined response Content-Type: text/html text/plain]
expected: NOTRUN
expected: TIMEOUT
[fetch(): separate response Content-Type: text/plain ]
expected: TIMEOUT
expected: FAIL
[<iframe>: combined response Content-Type: text/plain;charset=gbk text/plain]
expected: TIMEOUT
expected: FAIL
[fetch(): combined response Content-Type: text/html;" \\" text/plain]
expected: NOTRUN
@ -142,7 +142,7 @@
expected: NOTRUN
[<iframe>: separate response Content-Type: text/plain;charset=gbk text/plain]
expected: TIMEOUT
expected: FAIL
[Response: combined response Content-Type: text/plain]
expected: FAIL
@ -163,7 +163,7 @@
expected: NOTRUN
[<iframe>: combined response Content-Type: text/html;" " text/plain]
expected: TIMEOUT
expected: FAIL
[Request: combined response Content-Type: text/plain;charset=gbk;x=foo text/plain]
expected: NOTRUN
@ -172,13 +172,13 @@
expected: NOTRUN
[<iframe>: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK]
expected: TIMEOUT
expected: FAIL
[Response: combined response Content-Type: text/html;x=" text/plain]
expected: NOTRUN
[<iframe>: combined response Content-Type: text/html;charset=gbk text/html;x=",text/plain]
expected: TIMEOUT
expected: FAIL
[fetch(): separate response Content-Type: text/plain;charset=gbk text/plain]
expected: NOTRUN
@ -202,7 +202,7 @@
expected: NOTRUN
[<iframe>: separate response Content-Type: text/html;" " text/plain]
expected: TIMEOUT
expected: FAIL
[fetch(): separate response Content-Type: text/plain */*;charset=gbk]
expected: NOTRUN
@ -214,7 +214,7 @@
expected: NOTRUN
[<iframe>: combined response Content-Type: text/plain;charset=gbk;x=foo text/plain]
expected: TIMEOUT
expected: FAIL
[Request: combined response Content-Type: text/plain;charset=gbk text/html]
expected: NOTRUN
@ -238,10 +238,10 @@
expected: NOTRUN
[<iframe>: separate response Content-Type: text/plain;charset=gbk;x=foo text/plain]
expected: TIMEOUT
expected: FAIL
[Request: combined response Content-Type: text/plain ]
expected: NOTRUN
expected: FAIL
[Response: combined response Content-Type: text/html */*;charset=gbk]
expected: NOTRUN
@ -259,7 +259,7 @@
expected: NOTRUN
[<iframe>: separate response Content-Type: text/html;charset=gbk text/html;x=",text/plain]
expected: TIMEOUT
expected: FAIL
[fetch(): separate response Content-Type: text/plain;charset=gbk text/html;charset=windows-1254]
expected: NOTRUN
@ -277,16 +277,16 @@
expected: NOTRUN
[<iframe>: combined response Content-Type: text/plain */*]
expected: TIMEOUT
expected: FAIL
[fetch(): separate response Content-Type: text/html text/plain]
expected: NOTRUN
expected: FAIL
[Request: combined response Content-Type: text/html;" text/plain]
expected: NOTRUN
[<iframe>: separate response Content-Type: text/html;" \\" text/plain ";charset=GBK]
expected: TIMEOUT
expected: FAIL
[fetch(): combined response Content-Type: text/html;" " text/plain]
expected: NOTRUN
@ -295,7 +295,7 @@
expected: NOTRUN
[<iframe>: separate response Content-Type: text/plain;charset=gbk text/plain;charset=windows-1252]
expected: TIMEOUT
expected: FAIL
[Response: combined response Content-Type: text/plain */*;charset=gbk]
expected: NOTRUN
@ -310,47 +310,11 @@
expected: NOTRUN
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: TIMEOUT
[<iframe>: separate response Content-Type: text/html;" text/plain]
expected: TIMEOUT
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: TIMEOUT
[<iframe>: combined response Content-Type: */* text/html]
expected: TIMEOUT
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
expected: TIMEOUT
[<iframe>: combined response Content-Type: text/html */*]
expected: TIMEOUT
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: TIMEOUT
[<iframe>: separate response Content-Type: text/html */*]
expected: TIMEOUT
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
expected: TIMEOUT
[<iframe>: separate response Content-Type: text/html;charset=gbk text/plain text/html]
expected: TIMEOUT
[<iframe>: separate response Content-Type: */* text/html]
expected: TIMEOUT
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
expected: TIMEOUT
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: TIMEOUT
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: TIMEOUT
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: TIMEOUT
expected: FAIL

View file

@ -0,0 +1,7 @@
[mutations.window.html]
[Descendant mutations and output.value and .defaultValue]
expected: FAIL
[output and output.form.reset()]
expected: FAIL

View file

@ -0,0 +1,4 @@
[DOMContentLoaded-defer.html]
[The end: DOMContentLoaded and defer scripts]
expected: FAIL

View file

@ -1,4 +0,0 @@
[iframe_005.html]
[document.write external script into iframe write back into parent]
expected: FAIL

View file

@ -1,5 +1,4 @@
[realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL

View file

@ -58,10 +58,10 @@
expected: NOTRUN
[new Worker() with type=module and credentials=omit should not send the credentials]
expected: FAIL
expected: NOTRUN
[new Worker() with type=module and default credentials option should behave as credentials=same-origin and send the credentials for same-origin static imports]
expected: TIMEOUT
expected: NOTRUN
[new Worker() with type=classic should always send the credentials regardless of the credentials option (same-origin).]
expected: NOTRUN
@ -93,3 +93,12 @@
[new Worker() with type=module and credentials=include should send the credentials for same-origin dynamic imports]
expected: NOTRUN
[new Worker() with type=module and credentials=same-origin should send the credentials]
expected: NOTRUN
[new Worker() with type=module and credentials=include should send the credentials]
expected: NOTRUN
[new Worker() with type=module and default credentials option should behave as credentials=same-origin and send the credentials]
expected: TIMEOUT

View file

@ -1,4 +1,5 @@
[005.html]
expected: ERROR
[dedicated worker in shared worker in dedicated worker]
expected: FAIL

View file

@ -0,0 +1,4 @@
[send-authentication-basic-setrequestheader-existing-session.htm]
[XMLHttpRequest: send() - "Basic" authenticated request using setRequestHeader() when there is an existing session]
expected: FAIL

View file

@ -0,0 +1,4 @@
[send-authentication-basic.htm]
[XMLHttpRequest: send() - "Basic" authenticated requests with user name and password passed to open()]
expected: FAIL

View file

@ -11,3 +11,30 @@
[XMLHttpRequest user/pass options: user/pass in URL; pass in open()]
expected: FAIL
[XMLHttpRequest user/pass options: user in URL]
expected: FAIL
[XMLHttpRequest user/pass options: pass in URL, user/pass in open()]
expected: FAIL
[XMLHttpRequest user/pass options: user in URL; user/pass in open()]
expected: FAIL
[XMLHttpRequest user/pass options: user/pass in open()]
expected: FAIL
[XMLHttpRequest user/pass options: user/pass in URL]
expected: FAIL
[XMLHttpRequest user/pass options: user/pass in URL and open()]
expected: FAIL
[XMLHttpRequest user/pass options: user in URL and open()]
expected: FAIL
[XMLHttpRequest user/pass options: another user/pass in open(); must override cached credentials from previous test]
expected: FAIL
[XMLHttpRequest user/pass options: user in open()]
expected: FAIL

View file

@ -0,0 +1,2 @@
[transition_calc_implicit.html]
expected: TIMEOUT

View file

@ -10,8 +10,8 @@
let css = `
--v0: "Something really really really long";
`;
for (let i = 0; i < 30; ++i)
css += `--v${i + 1}: var(--v${i}), var(--v${i});`;
for (let i = 0; i < 31; ++i)
css += `--v${i + 1}: var(--v${i}) var(--v${i});`;
let s = document.createElement("style");
s.innerHTML = `
:root { ${css}; }

View file

@ -6,6 +6,16 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
@keyframes fade {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
</style>
<body>
<script>
// HTML elements that can be disabled
@ -100,94 +110,62 @@ test(() => {
}, "Calling click() on disabled elements must not dispatch events.");
promise_test(async () => {
// Style sheet that controls transition.
const style = document.createElement("style");
style.innerText = `
${formElements.join(", ")} {
opacity: 0.1;
transition-property: opacity;
transition-duration: .1s;
}
.transition {
opacity: 1;
}
`;
document.head.appendChild(style);
// Triggers the transition in the element being tested.
const transitionTrigger = document.createElement("button");
transitionTrigger.innerText = "Trigger button";
document.body.appendChild(transitionTrigger);
// For each form element type, set up transition event handlers.
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
document.body.appendChild(elem);
const transitionPromises = [
const eventPromises = [
"transitionrun",
"transitionstart",
"transitionend",
].map(eventType => {
return new Promise(r => {
const handlerName = `on${eventType}`;
elem[handlerName] = ev => {
elem[handlerName] = null;
r();
};
elem.addEventListener(eventType, r);
});
});
// Trigger transitions specifically on this element
// it requires a trusted event.
transitionTrigger.onclick = () => {
elem.classList.toggle("transition");
};
await test_driver.click(transitionTrigger);
// Flushing style triggers transition.
getComputedStyle(elem).opacity;
elem.style.transition = "opacity .1s";
elem.style.opacity = 0;
getComputedStyle(elem).opacity;
// All the events fire...
await Promise.all(transitionPromises);
elem.classList.remove("transition");
await Promise.all(eventPromises);
elem.remove();
}
}, "CSS Transitions transitionrun, transitionstart, transitionend events fire on disabled form elements");
// Let's now test the "transitioncancel" event.
promise_test(async () => {
// For each form element type, set up transition event handlers.
for (const localName of formElements) {
const elem = document.createElement(localName);
elem.disabled = true;
document.body.appendChild(elem);
getComputedStyle(elem).opacity;
elem.style.transition = "opacity 100s";
// We use ontransitionstart to cancel the event.
elem.ontransitionstart = () => {
// Cancel the transition by hiding it.
elem.style.display = "none";
elem.classList.remove("transition");
};
// Trigger the transition again!
const promiseToCancel = new Promise(r => {
elem.ontransitioncancel = r;
});
await test_driver.click(transitionTrigger);
// Flushing style triggers the transition.
elem.style.opacity = 0;
getComputedStyle(elem).opacity;
await promiseToCancel;
// And we are done with this element.
elem.remove();
}
// And we are done with the test... clean up.
transitionTrigger.remove();
style.remove();
}, "CSS Transitions events fire on disabled form elements");
}, "CSS Transitions transitioncancel event fires on disabled form elements");
promise_test(async () => {
const style = document.createElement("style");
style.innerText = `
.animate {
animation: fade .1s 2;
}
@keyframes fade {
0% { opacity: 1; }
100% { opacity: 0.2; }
}
`;
document.head.appendChild(style);
// For each form element type, set up transition event handlers.
for (const localName of formElements) {
const elem = document.createElement(localName);
document.body.appendChild(elem);
elem.disabled = true;
const transitionPromises = [
const eventPromises = [
"animationstart",
"animationiteration",
"animationend",
@ -196,49 +174,38 @@ promise_test(async () => {
elem.addEventListener(eventType, r, { once: true });
});
});
elem.style.animation = "fade .1s 2";
elem.classList.add("animate");
// All the events fire...
await Promise.all(transitionPromises);
await Promise.all(eventPromises);
elem.remove();
}
// And we are done with the test... clean up.
style.remove();
}, "CSS Animation events fire on disabled form elements");
}, "CSS Animation animationstart, animationiteration, animationend fire on disabled form elements");
promise_test(async () => {
const style = document.createElement("style");
style.innerText = `
.animate {
animation: fade .1s 2;
}
@keyframes fade {
0% { opacity: 1; }
100% { opacity: 0.2; }
}
`;
document.head.appendChild(style);
// For each form element type, set up transition event handlers.
for (const localName of formElements) {
const elem = document.createElement(localName);
document.body.appendChild(elem);
elem.disabled = true;
// Let's now test the "animationcancel" event
const promiseToCancel = new Promise(r => {
elem.addEventListener("animationcancel", r);
});
elem.addEventListener("animationstart", () => {
// Cancel the animation by hiding it.
elem.style.display = "none";
});
// Trigger the animation
elem.style.animation = "fade 100s";
elem.classList.add("animate");
// Trigger the animation again!
await promiseToCancel;
// And we are done with this element.
elem.remove();
}
// And we are done with the test... clean up.
style.remove();
}, "CSS Animation's cancel events fire on disabled form elements");
}, "CSS Animation's animationcancel event fires on disabled form elements");
promise_test(async () => {
for (const localName of formElements) {

View file

@ -45,7 +45,7 @@
video.play();
}
function cueEnteredOrExited() {
function cueEnteredOrExited(event) {
var currentCue = event.target;
assert_equals(testTrack.track.cues.getCueById(cueCount).text, currentCue.text);
assert_equals(currentCue.id, cueCount.toString());
@ -56,4 +56,4 @@
});
</script>
</video>
</video>

View file

@ -0,0 +1,36 @@
function assert_equal_values(output, value, message) {
assert_equals(output.value, value, `.value ${message}`);
assert_equals(output.defaultValue, value, `.defaultValue ${message}`);
}
function assert_values(output, value, defaultValue, message) {
assert_equals(output.value, value, `.value ${message}`);
assert_equals(output.defaultValue, defaultValue, `.defaultValue ${message}`);
}
test(() => {
const output = document.createElement("output"),
child = output.appendChild(document.createElement("span"));
assert_equal_values(output, "", "start");
child.textContent = "x";
assert_equal_values(output, "x", "after setting textContent");
output.value = "some";
assert_values(output, "some", "x", "after setting value");
child.textContent = "y";
assert_values(output, "y", "x", "after setting textContent again");
}, "Descendant mutations and output.value and .defaultValue");
test(() => {
const form = document.createElement("form"),
output = form.appendChild(document.createElement("output"));
output.textContent = "value";
assert_equal_values(output, "value", "after setting textContent");
output.value = "heya";
assert_values(output, "heya", "value", "after setting value");
form.reset();
assert_equal_values(output, "value", "after form.reset()");
output.innerHTML = "<div>something</div>";
assert_equal_values(output, "something", "after setting innerHTML");
form.reset();
assert_equal_values(output, "something", "after form.reset() again");
}, "output and output.form.reset()");

View file

@ -2,6 +2,7 @@
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test behavior of target=_blank links</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

View file

@ -2,6 +2,7 @@
<html>
<head>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>Test behavior of base target=_blank links</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>

View file

@ -10,7 +10,7 @@ idl_test(
['html', 'dom'],
idl_array => {
idl_array.add_objects({ NetworkInformation: ['navigator.connection'] });
if (self.isWorker) {
if (self.GLOBAL.isWorker()) {
idl_array.add_objects({ WorkerNavigator: ['navigator'] });
} else {
idl_array.add_objects({ Navigator: ['navigator'] });

View file

@ -0,0 +1,56 @@
<!doctype html>
<meta charset=utf-8>
<title>Dispatching PaymentRequestUpdateEvent for "payerdetailschange"</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src="helpers.js"></script>
<script>
function runTest(button) {
button.disabled = true;
promise_test(async t => {
const response = await getPaymentResponse({ requestPayerName: true });
const eventPromise = new Promise((_, reject) => {
response.addEventListener("payerdetailchange", ev => {
// [[waitForUpdate]] becomes true...
ev.updateWith({});
// So calling it again throws "InvalidStateError".
try {
ev.updateWith({});
} catch (err) {
reject(err);
}
});
});
await response.retry({
payer: { name: "Change me!" },
});
await promise_rejects(t, "InvalidStateError", eventPromise);
await response.complete("success");
}, button.textContent.trim());
}
</script>
<h2>Handling PaymentResponse.prototype.onpayerdetailchange events</h2>
<p>
The test brings up the Payment Request UI window.
When shown the payment sheet, use any details and hit pay.
</p>
<p>
When asked to retry the payment:
</p>
<ol>
<li>
<p>
Change payer's name to anything.
</p>
<button onclick="runTest(this);">
Calling PaymentRequestUpdateEvent updateWith() twice throws an "InvalidStateError".
</button>
</li>
<li>
<button onclick="done();">DONE!</button>
</li>
</ol>
<small>
If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a>
and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/OWNERS">owners</a>.
</small>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Post a file in a navigation controlled by a service worker</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/test-helpers.sub.js"></script>
<body>
<iframe id=testframe name=testframe></iframe>
<form id=testform method=post action="/html/semantics/forms/form-submission-0/resources/file-submission.py" target=testframe enctype="multipart/form-data">
<input name=testinput id=testinput type=file>
</form>
<script>
// Test that DataTransfer with a File entry works when posted to a
// service worker that falls back to network. Regression test for
// https://crbug.com/944145.
promise_test(async (t) => {
const scope = '/html/semantics/forms/form-submission-0/resources/';
const header = `pipe=header(Service-Worker-Allowed,${scope})`;
const script = `resources/fetch-event-network-fallback-worker.js?${header}`;
const registration = await service_worker_unregister_and_register(
t, script, scope);
await wait_for_state(t, registration.installing, 'activated');
const dataTransfer = new DataTransfer();
dataTransfer.items.add(new File(['foobar'], 'name'));
assert_equals(1, dataTransfer.files.length);
testinput.files = dataTransfer.files;
testform.submit();
const data = await new Promise(resolve => {
onmessage = e => {
if (e.source !== testframe) return;
resolve(e.data);
};
});
assert_equals(data, "FieldStorage('testinput', 'name', 'foobar')");
}, 'Posting a File in a navigation handled by a service worker');
</script>
</body>

View file

@ -1,3 +1,3 @@
self.addEventListener('fetch', () => {
// Do nothing.
});
// Do nothing.
});

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<base id="base" href="invalid:">
<svg id="svg">
<pattern id="pat" xlink:href="#pat"/>
</svg>
<script>
async_test(t => {
onload = t.step_func_done(() => {
let pattern = document.getElementById("pat");
base.href = "";
document.body.insertBefore(document.getElementById("svg").cloneNode(true),
document.body.firstChild);
document.body.offsetTop;
pattern.setAttribute("clip-rule", "evenodd");
document.body.offsetTop;
pattern.setAttribute("width", "0");
document.getElementById("svg").setAttribute("systemLanguage", "x-nonexistent");
document.body.offsetTop;
});
});
</script>

View file

@ -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 <https://w3c.github.io/reporting/>.
kwargs["binary_args"].append("--short-reporting-delay")
class ChromeAndroid(BrowserSetup):
name = "chrome_android"

View file

@ -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 <https://w3c.github.io/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):

View file

@ -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()

View file

@ -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")

View file

@ -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):

View file

@ -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

View file

@ -0,0 +1,23 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>UserTimingL3: errors are thrown when mark() is called incorrectly.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<h1>UserTimingL3: Mark</h1>
<script>
test(function() {
assert_throws(new TypeError(), function() { self.performance.mark("mark1", 123); }, "Number passed as a dict argument should cause type-error.")
}, "Number should be rejected as the mark-options.")
test(function() {
assert_throws(new TypeError(), function() { self.performance.mark("mark1", NaN); }, "NaN passed as a dict argument should cause type-error.")
}, "NaN should be rejected as the mark-options.")
test(function() {
assert_throws(new TypeError(), function() { self.performance.mark("mark1", Infinity); }, "Infinity passed as a dict argument should cause type-error.")
}, "Infinity should be rejected as the mark-options.")
test(function() {
assert_throws(new TypeError(), function() { self.performance.mark("mark1", "string"); }, "String passed as a dict argument should cause type-error.")
}, "String should be rejected as the mark-options.")
</script>

View file

@ -0,0 +1,45 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>User Timing L3: mark</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/user-timing-helpers.js"></script>
<script>
async_test(function (t) {
let mark_entries = [];
const expected_entries =
[{ entryType: "mark", name: "mark1", detail: null},
{ entryType: "mark", name: "mark2", detail: null},
{ entryType: "mark", name: "mark3", detail: null},
{ entryType: "mark", name: "mark4", detail: null},
{ entryType: "mark", name: "mark5", detail: null},
{ entryType: "mark", name: "mark6", detail: {}},
{ entryType: "mark", name: "mark7", detail: {info: 'abc'}},
{ entryType: "mark", name: "mark8", detail: null, startTime: 234.56},
{ entryType: "mark", name: "mark9", detail: {count: 3}, startTime: 345.67}];
const observer = new PerformanceObserver(
t.step_func(function (entryList, obs) {
mark_entries =
mark_entries.concat(entryList.getEntries());
if (mark_entries.length >= expected_entries.length) {
checkEntries(mark_entries, expected_entries);
observer.disconnect();
t.done();
}
})
);
self.performance.clearMarks();
observer.observe({entryTypes: ["mark"]});
const returned_entries = [];
returned_entries.push(self.performance.mark("mark1"));
returned_entries.push(self.performance.mark("mark2", undefined));
returned_entries.push(self.performance.mark("mark3", null));
returned_entries.push(self.performance.mark("mark4", {}));
returned_entries.push(self.performance.mark("mark5", {detail: null}));
returned_entries.push(self.performance.mark("mark6", {detail: {}}));
returned_entries.push(self.performance.mark("mark7", {detail: {info: 'abc'}}));
returned_entries.push(self.performance.mark("mark8", {startTime: 234.56}));
returned_entries.push(self.performance.mark("mark9", {detail: {count: 3}, startTime: 345.67}));
checkEntries(returned_entries, expected_entries);
}, "mark entries' detail and startTime are customizable.");
</script>

View file

@ -0,0 +1,46 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>UserTiming L3: mark/measure methods return objects.</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<p>Custom User Timing: L3 API returns a mark/measure object</p>
<div id="log"></div>
<script>
async_test(function (t) {
self.performance.clearMeasures();
const measure = self.performance.measure("measure1");
assert_true(measure instanceof PerformanceMeasure);
t.done();
}, "L3: performance.measure(name) should return an entry.");
async_test(function (t) {
self.performance.clearMeasures();
const measure = self.performance.measure("measure2",
{ startTime: 12, endTime:23 });
assert_true(measure instanceof PerformanceMeasure);
t.done();
}, "L3: performance.measure(name, param1) should return an entry.");
async_test(function (t) {
self.performance.clearMeasures();
self.performance.mark("1");
self.performance.mark("2");
const measure = self.performance.measure("measure3", "1", "2");
assert_true(measure instanceof PerformanceMeasure);
t.done();
}, "L3: performance.measure(name, param1, param2) should return an entry.");
async_test(function (t) {
self.performance.clearMarks();
const mark = self.performance.mark("mark1");
assert_true(mark instanceof PerformanceMark);
t.done();
}, "L3: performance.mark(name) should return an entry.");
async_test(function (t) {
self.performance.clearMarks();
const mark = self.performance.mark("mark2", { startTime: 34 });
assert_true(mark instanceof PerformanceMark);
t.done();
}, "L3: performance.mark(name, param) should return an entry.");
</script>

View file

@ -0,0 +1,40 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>UserTiming L3: Measure basic usage</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
function endTime(entry) {
return entry.startTime + entry.duration;
}
test(function() {
performance.clearMarks();
performance.clearMeasures();
const markEntry = performance.mark("mark", {startTime: 123});
const measureEntry = performance.measure("A", undefined, "mark");
assert_equals(measureEntry.startTime, 0);
assert_equals(endTime(measureEntry), markEntry.startTime);
}, "When the end mark is given and the start is unprovided, the end time of the measure entry should be the end mark's time, the start time should be 0.");
test(function() {
performance.clearMarks();
performance.clearMeasures();
const markEntry = performance.mark("mark", {startTime: 123});
const endMin = performance.now();
const measureEntry = performance.measure("A", "mark", undefined);
const endMax = performance.now();
assert_equals(measureEntry.startTime, markEntry.startTime);
assert_greater_than_equal(endTime(measureEntry), endMin);
assert_greater_than_equal(endMax, endTime(measureEntry));
}, "When the start mark is given and the end is unprovided, the start time of the measure entry should be the start mark's time, the end should be now.");
test(function() {
performance.clearMarks();
performance.clearMeasures();
const markEntry = performance.mark("mark", {startTime: 123});
const measureEntry = performance.measure("A", "mark", "mark");
assert_equals(endTime(measureEntry), markEntry.startTime);
assert_equals(measureEntry.startTime, markEntry.startTime);
}, "When start and end mark are both given, the start time and end time of the measure entry should be the the marks' time, repectively");
</script>

View file

@ -0,0 +1,95 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>User Timing L3: measure is customizable</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/user-timing-helpers.js"></script>
<script>
async_test(function (t) {
let measureEntries = [];
const timeStamp1 = 784.4;
const timeStamp2 = 1234.5;
const timeStamp3 = 66.6;
const timeStamp4 = 5566;
const expectedEntries =
[{ entryType: "measure", name: "measure1", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure2", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure3", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure5", detail: null },
{ entryType: "measure", name: "measure7", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure11", detail: null, startTime: timeStamp1 },
{ entryType: "measure", name: "measure13", detail: null, startTime: timeStamp1, duration: timeStamp2 - timeStamp1 },
{ entryType: "measure", name: "measure14", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure15", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure16", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure17", detail: null, startTime: timeStamp1 },
{ entryType: "measure", name: "measure18", detail: null, startTime: timeStamp3 },
{ entryType: "measure", name: "measure19", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure20", detail: null, startTime: 0 },
{ entryType: "measure", name: "measure21", detail: null, startTime: timeStamp3, duration: timeStamp1 - timeStamp3 },
{ entryType: "measure", name: "measure22", detail: null, startTime: timeStamp1, duration: timeStamp2 - timeStamp1 },
{ entryType: "measure", name: "measure23", detail: null, startTime: timeStamp1 },
{ entryType: "measure", name: "measure24", detail: {}, startTime: 0 },
{ entryType: "measure", name: "measure25", detail: { customInfo: 159 }, startTime: timeStamp3, duration: timeStamp2 - timeStamp3 }];
const observer = new PerformanceObserver(
t.step_func(function (entryList, obs) {
measureEntries =
measureEntries.concat(entryList.getEntries());
if (measureEntries.length >= expectedEntries.length) {
checkEntries(measureEntries, expectedEntries);
observer.disconnect();
t.done();
}
})
);
self.performance.clearMarks();
self.performance.clearMeasures();
observer.observe({ entryTypes: ["measure"] });
self.performance.mark("mark1", { detail: { randomInfo: 3 }, startTime: timeStamp1 });
self.performance.mark("mark2", { startTime: timeStamp2 });
const returnedEntries = [];
returnedEntries.push(self.performance.measure("measure1"));
returnedEntries.push(self.performance.measure("measure2", undefined));
returnedEntries.push(self.performance.measure("measure3", null));
returnedEntries.push(self.performance.measure("measure5", 'mark1'));
returnedEntries.push(
self.performance.measure("measure7", null, 'mark1'));
returnedEntries.push(
self.performance.measure("measure11", 'mark1', undefined));
returnedEntries.push(
self.performance.measure("measure13", 'mark1', 'mark2'));
returnedEntries.push(
self.performance.measure("measure14", {}));
returnedEntries.push(
self.performance.measure("measure15", { startTime: null }));
returnedEntries.push(
self.performance.measure("measure16", { startTime: undefined }));
returnedEntries.push(
self.performance.measure("measure17", { startTime: 'mark1' }));
returnedEntries.push(
self.performance.measure("measure18", { startTime: timeStamp3 }));
returnedEntries.push(
self.performance.measure("measure19", { endTime: undefined }));
returnedEntries.push(
self.performance.measure("measure20", { endTime: 'mark1' }));
returnedEntries.push(
self.performance.measure("measure21", { startTime: timeStamp3, endTime: 'mark1' }));
returnedEntries.push(
self.performance.measure("measure22", { startTime: timeStamp1, endTime: timeStamp2, detail: undefined }));
returnedEntries.push(
self.performance.measure("measure23", { startTime: 'mark1', endTime: undefined, detail: null }));
returnedEntries.push(
self.performance.measure("measure24", { startTime: null, endTime: timeStamp1, detail: {} }));
returnedEntries.push(
self.performance.measure("measure25", { startTime: timeStamp3, endTime: 'mark2', detail: { customInfo: 159 }}));
checkEntries(returnedEntries, expectedEntries);
}, "measure entries' detail and start/end are customizable");
async_test(function (t) {
assert_throws("SyntaxError", function() {
self.performance.measure("wrongUsage1", {}, 12);
});
t.done();
}, "measure should throw exception when passing option object and end at the same time");
</script>

View file

@ -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);
}

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Web NFC Test: NFCReader NFCReaderOptions url test</title>
<link rel="author" title="Intel" href="http://www.intel.com"/>
<link rel="help" href="https://w3c.github.io/web-nfc/"/>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta name="flags" content="interact">
<p>Tap an NFC tag to the test device with NFC support.</p>
<p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>
<div id="log"></div>
<script>
"use strict";
setup({ explicit_timeout: true });
promise_test(async t => {
const writer = new NFCWriter();
const reader1 = new NFCReader({url: `${location.origin}/custom/invalid`});
const reader2 = new NFCReader({url: `${location.origin}/custom/path`});
await writer.push({
url: "/custom/path/update",
records: [{ recordType: "text", data: "valid" }]
});
reader1.onreading = t.unreached_func("reading event should not be fired.");
reader1.start();
const readerWatcher = new EventWatcher(t, reader2, ["reading", "error"]);
reader2.start();
const event = await readerWatcher.wait_for("reading");
const message = event.message;
assert_equals(message.records[0].recordType, "text");
assert_equals(message.records[0].data, "valid");
assert_equals(message.url, `${location.origin}/custom/path/update`);
}, "Test that the url of NFCReaderOptions filters relevant data sources correctly.");
</script>

View file

@ -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) => {

View file

@ -0,0 +1,30 @@
<!doctype html>
<meta charset=utf-8>
<meta name="timeout" content="long">
<title>RTCPeerConnection.prototype.iceConnectionState - disconnection</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="RTCPeerConnection-helper.js"></script>
<script>
'use strict';
promise_test(async t => {
const caller = new RTCPeerConnection();
t.add_cleanup(() => caller.close());
const callee = new RTCPeerConnection();
t.add_cleanup(() => callee.close());
const stream = await navigator.mediaDevices.getUserMedia({audio:true});
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
const [track] = stream.getTracks();
caller.addTrack(track, stream);
exchangeIceCandidates(caller, callee);
await doSignalingHandshake(caller, callee);
await listenToIceConnected(caller);
callee.close();
await waitForIceStateChange(caller, ['disconnected', 'failed']);
// TODO: this should eventually transition to failed but that takes
// somewhat long (15-30s) so is not testable.
}, 'ICE goes to disconnected if the other side goes away');
</script>