Auto merge of #27913 - servo-wpt-sync:wpt_update_04-12-2020, r=servo-wpt-sync

Sync WPT with upstream (04-12-2020)

Automated downstream sync of changes from upstream as of 04-12-2020.
[no-wpt-sync]
r? @servo-wpt-sync
This commit is contained in:
bors-servo 2020-12-04 05:54:39 -05:00 committed by GitHub
commit 2d3811c21b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
91 changed files with 1381 additions and 2477 deletions

View file

@ -4,7 +4,7 @@
expected: TIMEOUT
[Opening a blob URL in a new window immediately before revoking it works.]
expected: TIMEOUT
expected: FAIL
[Fetching a blob URL immediately before revoking it works in an iframe.]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-003.html]
[Miss float below something else]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-004.html]
[Miss float below something else]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementFromPoint-001.html]
[CSSOM View - 5 - extensions to the Document interface]
expected: FAIL

View file

@ -17,6 +17,3 @@
[test the top of layer]
expected: FAIL
[test some point of the element: top left corner]
expected: FAIL

View file

@ -2,6 +2,3 @@
[elementsFromPoint on the root document for points in iframe elements]
expected: FAIL
[elementsFromPoint on inner documents]
expected: FAIL

View file

@ -0,0 +1,57 @@
[AddEventListenerOptions-signal.any.html]
[Passing an AbortSignal to addEventListener works with the once flag]
expected: FAIL
[Adding then aborting a listener in another listener does not call it]
expected: FAIL
[Passing an AbortSignal to addEventListener works with the capture flag]
expected: FAIL
[Aborting from a listener does not call future listeners]
expected: FAIL
[Passing an AbortSignal to multiple listeners]
expected: FAIL
[Passing an AbortSignal to addEventListener does not prevent removeEventListener]
expected: FAIL
[Aborting from a nested listener should remove it]
expected: FAIL
[Removing a once listener works with a passed signal]
expected: FAIL
[Passing an AbortSignal to addEventListener options should allow removing a listener]
expected: FAIL
[AddEventListenerOptions-signal.any.worker.html]
[Passing an AbortSignal to addEventListener works with the once flag]
expected: FAIL
[Adding then aborting a listener in another listener does not call it]
expected: FAIL
[Passing an AbortSignal to addEventListener works with the capture flag]
expected: FAIL
[Aborting from a listener does not call future listeners]
expected: FAIL
[Passing an AbortSignal to multiple listeners]
expected: FAIL
[Passing an AbortSignal to addEventListener does not prevent removeEventListener]
expected: FAIL
[Aborting from a nested listener should remove it]
expected: FAIL
[Removing a once listener works with a passed signal]
expected: FAIL
[Passing an AbortSignal to addEventListener options should allow removing a listener]
expected: FAIL

View file

@ -312,15 +312,18 @@
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: FAIL

View file

@ -56,6 +56,6 @@
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript ]
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL

View file

@ -0,0 +1,4 @@
[non-secure-context.window.html]
[Public non secure page fetches local page.]
expected: FAIL

View file

@ -11,6 +11,3 @@
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL
[Content-Type-Options%3A%20nosniff]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,5 +1,4 @@
[embedded-opener-remove-frame.html]
expected: CRASH
[opener of discarded nested browsing context]
expected: FAIL

View file

@ -171,3 +171,6 @@
[XHTML img usemap="#hash-id"]
expected: FAIL
[HTML (standards) IMG usemap="no-hash-name"]
expected: FAIL

View file

@ -1,5 +1,5 @@
[iframe_sandbox_popups_escaping-2.html]
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[iframe_sandbox_popups_escaping-3.html]
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
expected: FAIL

View file

@ -1,5 +1,5 @@
[iframe_sandbox_popups_nonescaping-2.html]
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN

View file

@ -0,0 +1,4 @@
[form-double-submit-2.html]
[preventDefault should allow onclick submit() to succeed]
expected: FAIL

View file

@ -1,4 +0,0 @@
[form-double-submit-3.html]
[<button> should have the same double-submit protection as <input type=submit>]
expected: FAIL

View file

@ -1,14 +1,13 @@
[htmlanchorelement_noopener.html]
expected: TIMEOUT
[Check that targeting of rel=noopener with a given name reuses an existing window with that name]
expected: FAIL
[Check that rel=noopener with target=_top does a normal load]
expected: NOTRUN
expected: FAIL
[Check that rel=noopener with target=_parent does a normal load]
expected: NOTRUN
expected: FAIL
[Check that rel=noopener with target=_self does a normal load]
expected: NOTRUN
expected: FAIL

View file

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

View file

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

View file

@ -353,3 +353,9 @@
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t4.4505801708958657e-25\t9.3139332532882690e-1\t9.3139332532882690e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 9.3139332532882690e-1 at index of 28696.\n\tMax RelError of 1.0000000000000000e+0 at index of 28696.\n]
expected: FAIL
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t-3.5267191406250000e+4\t9.3139332532882690e-1\t3.5268122799575329e+4\t3.7865981900958948e+4\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 3.5268122799575329e+4 at index of 28696.\n\tMax RelError of 3.7865981900958948e+4 at index of 28696.\n]
expected: FAIL
[X SNR (-47.5135609418513 dB) is not greater than or equal to 65.737. Got -47.5135609418513.]
expected: FAIL

View file

@ -1,4 +1,5 @@
[audiocontext-not-fully-active.html]
expected: TIMEOUT
[frame in navigated remote-site frame]
expected: FAIL

View file

@ -1,5 +0,0 @@
[018.html]
expected: TIMEOUT
[origin of the script that invoked the method, javascript:]
expected: TIMEOUT

View file

@ -7,7 +7,7 @@
expected: FAIL
[Opening a blob URL in a new window immediately before revoking it works.]
expected: TIMEOUT
expected: FAIL
[Opening a blob URL in a noopener about:blank window immediately before revoking it works.]
expected: TIMEOUT

View file

@ -14098,20 +14098,6 @@
{}
]
],
"focus-visible-003-manual.html": [
"ccc916a952854cc357ba7a5af73f4e1b476ef97d",
[
null,
{}
]
],
"focus-visible-004-manual.html": [
"4d7878e751ecd5487eecd9f40477fa4a7ff03484",
[
null,
{}
]
],
"focus-visible-006-manual.html": [
"974abc0024e3153008e944ff706156efcb9948e2",
[
@ -18167,13 +18153,6 @@
]
]
},
"pointerevent_capture_suppressing_mouse-manual.html": [
"127b07a9ee0c36004e2a5c1113b01c18633672d4",
[
null,
{}
]
],
"pointerevent_element_haspointercapture_release_pending_capture-manual.html": [
"17ad3e24ba4cc2bae4a58d84225c2a841fa4e867",
[
@ -18181,13 +18160,6 @@
{}
]
],
"pointerevent_fractional_coordinates-manual.html": [
"e0e2fdcd62175c325e43744e43addc5f45486159",
[
null,
{}
]
],
"pointerevent_multiple_primary_pointers_boundary_events-manual.html": [
"029aa26368413ea96b90823285a780b6798a12d9",
[
@ -18522,6 +18494,22 @@
]
]
},
"serial": {
"serialPort_disconnect-manual.https.html": [
"3a2e13400c4570cfab7826a7ec7a2972e3596103",
[
null,
{}
]
],
"serialPort_loopback-manual.https.html": [
"9e7801d8332f13aff063f6267f645be6ba837529",
[
null,
{}
]
]
},
"service-workers": {
"service-worker": {
"fetch-event-is-history-backward-navigation-manual.https.html": [
@ -24271,6 +24259,15 @@
]
]
},
"webusb": {
"usbDevice_claimInterface-manual.https.html": [
"991c1a9f31f08fce1b5d4797678a2e9917f5e7c0",
[
null,
{}
]
]
},
"xhr": {
"send-authentication-existing-session-manual.htm": [
"a80efd6e8436408db15d8019beef3abc0dfd0ab9",
@ -336064,6 +336061,30 @@
]
}
},
"cors-rfc1918": {
"resources": {
"support.js": [
"be49c515ef5422743e618e67a420bd048abce89c",
[]
],
"treat-as-public-address.html": [
"7a8f6f09a517f0db695a55436870790a7763870d",
[]
],
"treat-as-public-address.html.headers": [
"76371c6209e46f24e611a6689d26b6f1bbfaff9c",
[]
],
"treat-as-public-address.https.html": [
"7a8f6f09a517f0db695a55436870790a7763870d",
[]
],
"treat-as-public-address.https.html.headers": [
"76371c6209e46f24e611a6689d26b6f1bbfaff9c",
[]
]
}
},
"cross-origin-resource-policy": {
"resources": {
"green.png": [
@ -349797,7 +349818,7 @@
[]
],
"empty-import-map-internal.json": [
"59390c89f6b4da9ca95da0142d48022e8dc25f40",
"42033a2c07947f90ee779db5ec58d251958796ba",
[]
],
"empty-import-map.json": [
@ -349809,7 +349830,7 @@
[]
],
"packages-via-trailing-slashes.json": [
"6b8f0135f50f50cd2691b5d4ee801d9671a3a2f9",
"6ff330cc5a73c15cb9ccabe88376b811ccffff02",
[]
],
"parsing-addresses-absolute.json": [
@ -349873,15 +349894,19 @@
[]
],
"test-helper.js": [
"0f53aea5b4b0507a834c112c1a0595e112d27bbf",
"579fd52da8c1b034788ed760ab3744dae34e9fde",
[]
],
"tricky-specifiers.json": [
"d9c80c9475000587643f52d500c0c4d588640f4a",
[]
],
"url-specifiers-schemes-internal.json": [
"58a97642c2bd81690d6b9703de5688996cd306eb",
[]
],
"url-specifiers.json": [
"aff55c4d9dda05eb344af83640aaacd18fdc15dc",
"6fcf7f466356fa856d9fbef69cd943c07f942b6f",
[]
]
},
@ -350595,7 +350620,7 @@
[]
],
"dom.idl": [
"d404be2aea5fc78ffccd4533213f47f6b76cff8f",
"9d371fbe7c5f63cec026c237456d1df9beacc36f",
[]
],
"element-timing.idl": [
@ -351083,7 +351108,7 @@
[]
],
"webrtc.idl": [
"e58df13b02c3fa0072b7054df77f4e8eb498aaae",
"cd34d3f3782e9d48695296df274a80a3a3d668ce",
[]
],
"webusb.idl": [
@ -357721,6 +357746,14 @@
},
"serial": {
"resources": {
"common.js": [
"5177f83a8655f57a7b04935a136cc00bdd1b2626",
[]
],
"manual.js": [
"4ac46b6decc7b6bf42bf4491b192714c55376ada",
[]
],
"serial-allowed-by-feature-policy-worker.js": [
"46c338e9a33a9ee0148ca48d09fc9c3bec37736b",
[]
@ -363421,7 +363454,7 @@
[]
],
"PKG-INFO": [
"98927c4d99d9ca2f7ac9aadcb23b5b0922f34206",
"623171e38f68fb27c2e4a5161f06575baf7e6d6a",
[]
],
"README": [
@ -363438,21 +363471,17 @@
[]
],
"__init__.py": [
"d6ffb3a40feb07779140f43f1de11ff80e7c13d7",
"51f3cf247069fd673ea9702b80d8762431831826",
[]
],
"doc": {
"enum.pdf": [
"8c1383a495e8f924e247cdc5b2099eba2ff9d4f6",
[]
],
"enum.rst": [
"3afc238210b4f43f08bd0f0be422522242971244",
[]
]
},
"test.py": [
"d9edfaee40aff5eba7e80415bc75be03642055f5",
"c8c4b962242f4f5a2ed24855a7e5a12df3dec6e6",
[]
]
},
@ -363475,11 +363504,11 @@
]
},
"setup.cfg": [
"861a9f554263efb088d8636c4f17a30696e495ad",
"8bfd5a12f85b8fbb6c058cf67dd23da690835ea0",
[]
],
"setup.py": [
"8b284003485674597063c20b333788319e54e962",
"f54071e7f0c4c3eb9d3b68e11caa1ea72120c1a6",
[]
]
},
@ -372181,6 +372210,10 @@
"975d2242c949740217c050beea72db908ef46fc7",
[]
],
"manual.js": [
"869ac450acf19a029eb924a6b290bcabc1acff2d",
[]
],
"open-in-iframe.html": [
"730db24902964282a9ff2b87c0a1c0ec566449bb",
[]
@ -409941,7 +409974,7 @@
]
],
"list-style-type-computed.html": [
"21230f31b05058e23f004cfe1a53fa09835372af",
"1f25e52001399fd4dbb93bce1731e36b5e5398c8",
[
null,
{}
@ -409955,7 +409988,7 @@
]
],
"list-style-type-valid.html": [
"66067ca43232975409aab83684da9258f10abcea",
"dde0bee8dde7830ce592276f09e987519a6da8b2",
[
null,
{}
@ -424014,7 +424047,7 @@
]
],
"serialize-values.html": [
"7334424a0a1e638856e4bdbf5eb95f9e2cecf268",
"31f5f64c8094eb9158e27ab48f756f03c6d594b8",
[
null,
{}
@ -425880,6 +425913,24 @@
}
]
],
"focus-visible-003.html": [
"4620c1e411492069f085efc08a3647a5eaae6fa6",
[
null,
{
"testdriver": true
}
]
],
"focus-visible-004.html": [
"1c3fb3fcedd03b46da79af2aa53fc988d63ff7ca",
[
null,
{
"testdriver": true
}
]
],
"focus-visible-005.html": [
"b5d58435db1c6d37881bbcd4c856e8abab03aada",
[
@ -427745,13 +427796,6 @@
},
"dom": {
"abort": {
"addEventListenerAbortController.tentative.html": [
"d208d4b0d6c5765d73ae61432f5a440811a5e623",
[
null,
{}
]
],
"event.any.js": [
"a67e6f400fcf1dfa347390e1a76e25b573afbb9a",
[
@ -427858,6 +427902,17 @@
{}
]
],
"AddEventListenerOptions-signal.any.js": [
"42871061f3b9167cfa28e536b8608844684427d6",
[
"dom/events/AddEventListenerOptions-signal.any.html",
{}
],
[
"dom/events/AddEventListenerOptions-signal.any.worker.html",
{}
]
],
"CustomEvent.html": [
"87050943f9bffac8c17b85e1dba977eaebc78ec5",
[
@ -452330,6 +452385,34 @@
"timeout": "long"
}
]
],
"non-secure-context.window.js": [
"8f49a5cbedda7ece8a598cb1c668abd90051fe65",
[
"fetch/cors-rfc1918/non-secure-context.window.html",
{
"script_metadata": [
[
"script",
"resources/support.js"
]
]
}
]
],
"secure-context.https.window.js": [
"8ed028a390c19cddf75587910718b2d5867c318a",
[
"fetch/cors-rfc1918/secure-context.https.window.html",
{
"script_metadata": [
[
"script",
"resources/support.js"
]
]
}
]
]
},
"cross-origin-resource-policy": {
@ -485315,7 +485398,7 @@
]
],
"select-event.html": [
"2fb018f82aabdd527e8bccd59230d2acd925a04b",
"af49024aa2bdfaa45f8eb200fad201d915f831a2",
[
null,
{
@ -485366,7 +485449,7 @@
]
],
"selection.html": [
"b5cea0511d1213e804faf1295c1e236824ae2953",
"e216d953cef5ba81067b6e046c8f7ed197c0488c",
[
null,
{
@ -494676,7 +494759,7 @@
]
],
"resolving-internal.https.html": [
"887b7474d63ad4b05c7c99b2e756e01958c12c16",
"d75bebba47531c721dc6764bdb22a017120565bb",
[
null,
{
@ -508731,6 +508814,15 @@
}
]
],
"pointerevent_capture_suppressing_mouse.html": [
"080ca1520d91ecd88264f0c501998cefc410edaf",
[
null,
{
"testdriver": true
}
]
],
"pointerevent_change-touch-action-onpointerdown_touch.html": [
"40dbbed72f437172bab73fde62ee487b6150b10d",
[
@ -508801,6 +508893,15 @@
}
]
],
"pointerevent_fractional_coordinates.html": [
"b106340efd5d05ba4ab4281863a476dbe6134a64",
[
null,
{
"testdriver": true
}
]
],
"pointerevent_iframe-touch-action-none_touch.html": [
"1c9651d8c162ff1ea71677f8fd3296c5c65fcad9",
[
@ -548665,7 +548766,7 @@
]
],
"RTCDataChannel-close.html": [
"cd4ace2a836be2c9f18deca48c8c01f5e1cdff1d",
"e2a5ba77245ce4d8204f473cfed1c1223741667e",
[
null,
{

View file

@ -0,0 +1,4 @@
[hit-test-floats-003.html]
[Miss float below something else]
expected: FAIL

View file

@ -0,0 +1,4 @@
[hit-test-floats-004.html]
[Miss float below something else]
expected: FAIL

View file

@ -0,0 +1,4 @@
[elementFromPoint-001.html]
[CSSOM View - 5 - extensions to the Document interface]
expected: FAIL

View file

@ -21,6 +21,3 @@
[test the top of layer]
expected: FAIL
[test some point of the element: top left corner]
expected: FAIL

View file

@ -2,6 +2,3 @@
[elementsFromPoint on the root document for points in iframe elements]
expected: FAIL
[elementsFromPoint on inner documents]
expected: FAIL

View file

@ -1,10 +0,0 @@
[addEventListenerAbortController.tentative.html]
[Tests support for EventController to cancel event listeners in addEventListener.]
expected: FAIL
[Tests support for EventController to cancel capture event listeners in addEventListener.]
expected: FAIL
[Passing an AbortSignal to addEventListener options should allow removing a listener]
expected: FAIL

View file

@ -0,0 +1,57 @@
[AddEventListenerOptions-signal.any.html]
[Passing an AbortSignal to addEventListener works with the once flag]
expected: FAIL
[Adding then aborting a listener in another listener does not call it]
expected: FAIL
[Passing an AbortSignal to addEventListener works with the capture flag]
expected: FAIL
[Aborting from a listener does not call future listeners]
expected: FAIL
[Passing an AbortSignal to multiple listeners]
expected: FAIL
[Passing an AbortSignal to addEventListener does not prevent removeEventListener]
expected: FAIL
[Aborting from a nested listener should remove it]
expected: FAIL
[Removing a once listener works with a passed signal]
expected: FAIL
[Passing an AbortSignal to addEventListener options should allow removing a listener]
expected: FAIL
[AddEventListenerOptions-signal.any.worker.html]
[Passing an AbortSignal to addEventListener works with the once flag]
expected: FAIL
[Adding then aborting a listener in another listener does not call it]
expected: FAIL
[Passing an AbortSignal to addEventListener works with the capture flag]
expected: FAIL
[Aborting from a listener does not call future listeners]
expected: FAIL
[Passing an AbortSignal to multiple listeners]
expected: FAIL
[Passing an AbortSignal to addEventListener does not prevent removeEventListener]
expected: FAIL
[Aborting from a nested listener should remove it]
expected: FAIL
[Removing a once listener works with a passed signal]
expected: FAIL
[Passing an AbortSignal to addEventListener options should allow removing a listener]
expected: FAIL

View file

@ -312,15 +312,18 @@
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: FAIL

View file

@ -56,6 +56,6 @@
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript ]
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL

View file

@ -0,0 +1,4 @@
[non-secure-context.window.html]
[Public non secure page fetches local page.]
expected: FAIL

View file

@ -11,6 +11,3 @@
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
expected: FAIL
[Content-Type-Options%3A%20nosniff]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_5.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,5 +1,4 @@
[embedded-opener-remove-frame.html]
expected: CRASH
[opener and "removed" embedded documents]
expected: FAIL

View file

@ -172,3 +172,6 @@
[XHTML img usemap="http://example.org/#garbage-before-hash-id"]
expected: FAIL
[HTML (standards) IMG usemap="no-hash-name"]
expected: FAIL

View file

@ -1,5 +1,5 @@
[iframe_sandbox_popups_escaping-2.html]
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT

View file

@ -1,6 +1,5 @@
[iframe_sandbox_popups_escaping-3.html]
type: testharness
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +1,6 @@
[iframe_sandbox_popups_nonescaping-2.html]
type: testharness
expected: CRASH
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: FAIL
expected: NOTRUN

View file

@ -0,0 +1,4 @@
[form-double-submit-2.html]
[preventDefault should allow onclick submit() to succeed]
expected: FAIL

View file

@ -1,4 +0,0 @@
[form-double-submit-3.html]
[<button> should have the same double-submit protection as <input type=submit>]
expected: FAIL

View file

@ -1,6 +1,5 @@
[htmlanchorelement_noopener.html]
type: testharness
expected: TIMEOUT
[Check that targeting of rel=noopener with a given name ignores an existing window with that name]
expected: NOTRUN
@ -8,11 +7,11 @@
expected: FAIL
[Check that rel=noopener with target=_top does a normal load]
expected: NOTRUN
expected: FAIL
[Check that rel=noopener with target=_parent does a normal load]
expected: NOTRUN
expected: FAIL
[Check that rel=noopener with target=_self does a normal load]
expected: NOTRUN
expected: FAIL

View file

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

View file

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

View file

@ -581,3 +581,9 @@
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t4.4505801708958657e-25\t9.3139332532882690e-1\t9.3139332532882690e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 9.3139332532882690e-1 at index of 28696.\n\tMax RelError of 1.0000000000000000e+0 at index of 28696.\n]
expected: FAIL
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t-3.5267191406250000e+4\t9.3139332532882690e-1\t3.5268122799575329e+4\t3.7865981900958948e+4\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 3.5268122799575329e+4 at index of 28696.\n\tMax RelError of 3.7865981900958948e+4 at index of 28696.\n]
expected: FAIL
[X SNR (-47.5135609418513 dB) is not greater than or equal to 65.737. Got -47.5135609418513.]
expected: FAIL

View file

@ -1,4 +1,5 @@
[audiocontext-not-fully-active.html]
expected: TIMEOUT
[frame in navigated remote-site frame]
expected: FAIL

View file

@ -1,5 +0,0 @@
[018.html]
expected: TIMEOUT
[origin of the script that invoked the method, javascript:]
expected: TIMEOUT

View file

@ -17,6 +17,8 @@ test_computed_value('list-style-type', 'none');
test_computed_value('list-style-type', 'disc');
test_computed_value('list-style-type', 'circle');
test_computed_value('list-style-type', 'square');
test_computed_value('list-style-type', 'disclosure-open');
test_computed_value('list-style-type', 'disclosure-closed');
test_computed_value('list-style-type', 'decimal');
test_computed_value('list-style-type', 'decimal-leading-zero');
test_computed_value('list-style-type', 'lower-roman');

View file

@ -17,6 +17,8 @@ test_valid_value('list-style-type', 'none');
test_valid_value('list-style-type', 'disc');
test_valid_value('list-style-type', 'circle');
test_valid_value('list-style-type', 'square');
test_valid_value('list-style-type', 'disclosure-open');
test_valid_value('list-style-type', 'disclosure-closed');
test_valid_value('list-style-type', 'decimal');
test_valid_value('list-style-type', 'decimal-leading-zero');
test_valid_value('list-style-type', 'lower-roman');

View file

@ -433,7 +433,8 @@
'initial': 'outside',
}],
['list-style-type', {
'values': ['disc', 'circle', 'square', 'decimal', 'decimal-leading-zero', 'lower-roman',
'values': ['disc', 'circle', 'square', 'disclosure-open', 'disclosure-closed',
'decimal', 'decimal-leading-zero', 'lower-roman',
'upper-roman', 'lower-greek', 'lower-latin', 'upper-latin', 'armenian', 'georgian',
'lower-alpha', 'upper-alpha', 'none', 'inherit'],
'initial': 'disc',

View file

@ -7,6 +7,9 @@
<link rel="help" href="https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
:focus-visible {
outline: red dotted 1px; /* fallback for Edge */
@ -40,7 +43,7 @@
<button data-tested="false" id="el-4">Focus me</span>
</div>
<div>
<input data-tested="false" id="el-5" type="button" value="Focus me"</input>
<input data-tested="false" id="el-5" type="button" value="Focus me"></input>
</div>
<div>
<input data-tested="false" id="el-6" type="image" alt="Focus me."></input>
@ -69,6 +72,11 @@
<label><input data-tested="false" id="el-11" type="color"></input> Focus me.</label>
</div>
<script>
function mouseClickInTarget(selector) {
let target = document.querySelector(selector);
return test_driver.click(target);
}
async_test(function(t) {
document.querySelectorAll("[data-tested]").forEach((el) => {
el.addEventListener("click", t.step_func((e) => {
@ -82,6 +90,8 @@
}
}));
});
mouseClickInTarget("[data-tested=false]");
}, "Mouse focus on input elements which do not show a virtual keyboard should NOT match :focus-visible");
</script>
</body>

View file

@ -7,6 +7,9 @@
<link rel="help" href="https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
:focus-visible {
outline: red dotted 1px; /* fallback for Edge */
@ -40,7 +43,7 @@
<button data-tested="false" id="el-4">Focus me</span>
</div>
<div>
<input data-tested="false" id="el-5" type="button" value="Focus me"</input>
<input data-tested="false" id="el-5" type="button" value="Focus me"></input>
</div>
<div>
<input data-tested="false" id="el-6" type="image" alt="Focus me."></input>
@ -71,6 +74,11 @@
<label><input data-tested="false" id="el-11" type="color"></input> Focus me.</label>
</div>
<script>
function mouseClickInTarget(selector) {
let target = document.querySelector(selector);
return test_driver.click(target);
}
async_test(function(t) {
document.querySelectorAll("[data-tested]").forEach((el) => {
el.addEventListener("click", t.step_func((e) => {
@ -84,6 +92,8 @@
}
}));
});
mouseClickInTarget("[data-tested=false]");
}, "Mouse focus on input elements which do not show a virtual keyboard should NOT match :focus-visible - not affected by -webkit-appearance");
</script>
</body>

View file

@ -1,56 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
<!-- This behavior has not been specified yet. See https://github.com/whatwg/dom/issues/911 -->
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(t => {
const target = new EventTarget();
const controller = new AbortController();
target.addEventListener('testevent', t.step_func(() => {
assert_unreached('testevent should have been canceled by AbortController');
}), {signal: controller.signal});
controller.abort();
target.dispatchEvent(new Event('testevent'));
}, 'Tests support for EventController to cancel event listeners in addEventListener.');
test(t => {
const target = new EventTarget();
const controller = new AbortController();
target.addEventListener('testevent', t.step_func(() => {
assert_unreached('testevent should have been canceled by AbortController');
}), {signal: controller.signal, capture: true});
controller.abort();
target.dispatchEvent(new Event('testevent'));
}, 'Tests support for EventController to cancel capture event listeners in addEventListener.');
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', handler, { signal: controller.signal });
et.dispatchEvent(new Event('test'));
assert_equals(count, 1, "Adding a signal still adds a listener");
et.dispatchEvent(new Event('test'));
assert_equals(count, 2, "The listener was not added with the once flag");
controller.abort();
et.dispatchEvent(new Event('test'));
assert_equals(count, 2, "Aborting on the controller removes the listener");
et.addEventListener('test', handler, { signal: controller.signal });
et.dispatchEvent(new Event('test'));
assert_equals(count, 2, "Passing an aborted signal never adds the handler");
}, "Passing an AbortSignal to addEventListener options should allow removing a listener");
</script>

View file

@ -0,0 +1,133 @@
'use strict';
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', handler, { signal: controller.signal });
et.dispatchEvent(new Event('test'));
assert_equals(count, 1, "Adding a signal still adds a listener");
et.dispatchEvent(new Event('test'));
assert_equals(count, 2, "The listener was not added with the once flag");
controller.abort();
et.dispatchEvent(new Event('test'));
assert_equals(count, 2, "Aborting on the controller removes the listener");
et.addEventListener('test', handler, { signal: controller.signal });
et.dispatchEvent(new Event('test'));
assert_equals(count, 2, "Passing an aborted signal never adds the handler");
}, "Passing an AbortSignal to addEventListener options should allow removing a listener");
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', handler, { signal: controller.signal });
et.removeEventListener('test', handler);
et.dispatchEvent(new Event('test'));
assert_equals(count, 0, "The listener was still removed");
}, "Passing an AbortSignal to addEventListener does not prevent removeEventListener");
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', handler, { signal: controller.signal, once: true });
controller.abort();
et.dispatchEvent(new Event('test'));
assert_equals(count, 0, "The listener was still removed");
}, "Passing an AbortSignal to addEventListener works with the once flag");
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', handler, { signal: controller.signal, once: true });
et.removeEventListener('test', handler);
et.dispatchEvent(new Event('test'));
assert_equals(count, 0, "The listener was still removed");
}, "Removing a once listener works with a passed signal");
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('first', handler, { signal: controller.signal, once: true });
et.addEventListener('second', handler, { signal: controller.signal, once: true });
controller.abort();
et.dispatchEvent(new Event('first'));
et.dispatchEvent(new Event('second'));
assert_equals(count, 0, "The listener was still removed");
}, "Passing an AbortSignal to multiple listeners");
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', handler, { signal: controller.signal, capture: true });
controller.abort();
et.dispatchEvent(new Event('test'));
assert_equals(count, 0, "The listener was still removed");
}, "Passing an AbortSignal to addEventListener works with the capture flag");
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', () => {
controller.abort();
}, { signal: controller.signal });
et.addEventListener('test', handler, { signal: controller.signal });
et.dispatchEvent(new Event('test'));
assert_equals(count, 0, "The listener was still removed");
}, "Aborting from a listener does not call future listeners");
test(function() {
let count = 0;
function handler() {
count++;
}
const et = new EventTarget();
const controller = new AbortController();
et.addEventListener('test', () => {
et.addEventListener('test', handler, { signal: controller.signal });
controller.abort();
}, { signal: controller.signal });
et.dispatchEvent(new Event('test'));
assert_equals(count, 0, "The listener was still removed");
}, "Adding then aborting a listener in another listener does not call it");
test(function() {
const et = new EventTarget();
const ac = new AbortController();
let count = 0;
et.addEventListener('foo', () => {
et.addEventListener('foo', () => {
count++;
if (count > 5) ac.abort();
et.dispatchEvent(new Event('foo'));
}, { signal: ac.signal });
et.dispatchEvent(new Event('foo'));
}, { once: true });
et.dispatchEvent(new Event('foo'));
}, "Aborting from a nested listener should remove it");

View file

@ -0,0 +1,31 @@
// META: script=resources/support.js
//
// Spec: https://wicg.github.io/cors-rfc1918/#integration-fetch
//
// This file covers only those tests that must execute in a non secure context.
// Other tests are defined in: secure-context.window.js
setup(() => {
// Making sure we are in a non secure context, as expected.
assert_false(window.isSecureContext);
});
promise_test(async t => {
return fetch("/common/blank.html")
.catch(reason => {unreached_func(reason)});
}, "Local non secure page fetches local page.");
// For the following tests, we go through an iframe, because it is not possible
// to directly import the test harness from a secured public page.
promise_test(async t => {
let iframe = await appendIframe(t, document,
"resources/treat-as-public-address.html");
let reply = futureMessage();
iframe.contentWindow.postMessage("/common/blank.html", "*");
assert_equals(await reply, "failure");
}, "Public non secure page fetches local page.");
// TODO(https://github.com/web-platform-tests/wpt/issues/26166):
// Add tests for public variations when we are able to fetch resources using a
// mechanism compatible with WPT guidelines regarding being self-contained.

View file

@ -0,0 +1,34 @@
// Creates a new iframe in |doc|, calls |func| on it and appends it as a child
// of |doc|.
// Returns a promise that resolves to the iframe once loaded (successfully or
// not).
// The iframe is removed from |doc| once test |t| is done running.
//
// NOTE: Because iframe elements always invoke the onload event handler, even
// in case of error, we cannot wire onerror to a promise rejection. The Promise
// constructor requires users to resolve XOR reject the promise.
function appendIframeWith(t, doc, func) {
return new Promise(resolve => {
const child = doc.createElement("iframe");
func(child);
child.onload = () => { resolve(child); };
doc.body.appendChild(child);
t.add_cleanup(() => { doc.body.removeChild(child); });
});
}
// Appends a child iframe to |doc| sourced from |src|.
//
// See append_child_frame_with() for more details.
function appendIframe(t, doc, src) {
return appendIframeWith(t, doc, child => { child.src = src; });
}
// Register an event listener that will resolve this promise when this
// window receives a message posted to it.
function futureMessage() {
return new Promise(resolve => {
window.addEventListener("message", e => resolve(e.data));
});
};

View file

@ -0,0 +1,8 @@
<script>
window.addEventListener("message", function (event) {
fetch(event.data)
.then(response => {parent.postMessage("success", "*")})
.catch(error => {parent.postMessage("failure", "*")});
});
</script>

View file

@ -0,0 +1 @@
Content-Security-Policy: treat-as-public-address;

View file

@ -0,0 +1,8 @@
<script>
window.addEventListener("message", function (event) {
fetch(event.data)
.then(response => {parent.postMessage("success", "*")})
.catch(error => {parent.postMessage("failure", "*")});
});
</script>

View file

@ -0,0 +1 @@
Content-Security-Policy: treat-as-public-address;

View file

@ -0,0 +1,31 @@
// META: script=resources/support.js
//
// Spec: https://wicg.github.io/cors-rfc1918/#integration-fetch
//
// This file covers only those tests that must execute in a secure context.
// Other tests are defined in: non-secure-context.window.js
setup(() => {
// Making sure we are in a secure context, as expected.
assert_true(window.isSecureContext);
});
promise_test(async t => {
return fetch("/common/blank.html")
.catch(reason => {unreached_func(reason)});
}, "Local secure page fetches local page.");
// For the following tests, we go through an iframe, because it is not possible
// to directly import the test harness from a secured public page.
promise_test(async t => {
let iframe = await appendIframe(t, document,
"resources/treat-as-public-address.https.html");
let reply = futureMessage();
iframe.contentWindow.postMessage("/common/blank.html", "*");
assert_equals(await reply, "success");
}, "Public secure page fetches local page.");
// TODO(https://github.com/web-platform-tests/wpt/issues/26166):
// Add tests for public variations when we are able to fetch resources using a
// mechanism compatible with WPT guidelines regarding being self-contained.

View file

@ -43,7 +43,7 @@ const actions = [
},
{
label: "setRangeText()",
action: el => el.setRangeText("newmiddle")
action: el => el.setRangeText("newmiddle", el.selectionStart, el.selectionEnd, "select")
}
];
@ -79,6 +79,19 @@ els.forEach((el) => {
}, 200);
});
}, `${elLabel}: ${action.label} a second time (must not fire select)`);
promise_test(async t => {
const element = el.cloneNode(true);
element.onselect = e => {
element.onselect = null;
};
action.action(element);
// step_wait properly timeouts before the whole test collapses
await t.step_wait(() => !element.onselect, "event didn't fire", 200, 10);
}, `${elLabel}: ${action.label} disconnected node`);
});
});
</script>

View file

@ -95,12 +95,9 @@
// to the character that immediately follows the text entry cursor.
assert_equals(el.selectionStart, el.value.length,
"SelectionStart offset without selection in " + el.id);
if (!el.parentNode) {
return;
}
el.select();
assert_equals(el.selectionStart, 0, "SelectionStart offset");
el.parentNode.removeChild(el);
el.remove();
}, "test SelectionStart offset for input that is " +
(append ? "appended" : " not appended"));
}
@ -112,12 +109,9 @@
// to the character that immediately follows the text entry cursor.
assert_equals(el.selectionStart, el.value.length,
"SelectionStart offset without selection in " + el.id);
if (!el.parentNode) {
return;
}
el.select();
assert_equals(el.selectionStart, 0, "SelectionStart offset");
el.parentNode.removeChild(el);
el.remove();
}, "test SelectionStart offset for textarea that is " +
(append ? "appended" : " not appended"));
}
@ -129,12 +123,9 @@
// to the character that immediately follows the text entry cursor.
assert_equals(el.selectionEnd, el.value.length,
"SelectionEnd offset without selection in " + el.id);
if (!el.parentNode) {
return;
}
el.select();
assert_equals(el.selectionEnd, el.value.length, "SelectionEnd offset");
el.parentNode.removeChild(el);
el.remove();
}, "test SelectionEnd offset for input that is " +
(append ? "appended" : " not appended"));
}
@ -147,12 +138,9 @@
// to the character that immediately follows the text entry cursor.
assert_equals(el.selectionEnd, el.value.length,
"SelectionEnd offset without selection in " + el.id);
if (!el.parentNode) {
return;
}
el.select();
assert_equals(el.selectionEnd, el.value.length, "SelectionEnd offset");
el.parentNode.removeChild(el);
el.remove();
}, "test SelectionEnd offset for textarea that is " +
(append ? "appended" : " not appended"));
}

View file

@ -18,6 +18,7 @@ const promises = [];
for (const json of [
'resources/empty-import-map-internal.json',
'resources/url-specifiers-schemes-internal.json'
]) {
promise_test(() => {
const promise = runTestsFromJSON(json);

View file

@ -10,6 +10,7 @@
},
"non-fetch scheme absolute URLs": {
"expectedResults": {
"about:fetch-scheme": "about:fetch-scheme",
"mailto:non-fetch-scheme": "mailto:non-fetch-scheme",
"import:non-fetch-scheme": "import:non-fetch-scheme",
"javascript:non-fetch-scheme": "javascript:non-fetch-scheme",

View file

@ -6,7 +6,9 @@
"lodash-dot": "./node_modules/lodash-es/lodash.js",
"lodash-dot/": "./node_modules/lodash-es/",
"lodash-dotdot": "../node_modules/lodash-es/lodash.js",
"lodash-dotdot/": "../node_modules/lodash-es/"
"lodash-dotdot/": "../node_modules/lodash-es/",
"mapped/": "https://example.com/",
"mapped/path/": "https://github.com/WICG/import-maps/issues/207/"
}
},
"importMapBaseURL": "https://example.com/app/index.html",
@ -38,6 +40,18 @@
"underscore/": null,
"underscore/foo": null
}
},
"backtracking via ..": {
"expectedResults": {
"mapped/path": "https://example.com/path",
"mapped/path/": "https://github.com/WICG/import-maps/issues/207/",
"mapped/path/..": null,
"mapped/path/../backtrack": null,
"mapped/path/../../backtrack": null,
"mapped/path/../../../backtrack": null,
"moment/../backtrack": null,
"moment/..": null
}
}
}
}

View file

@ -83,7 +83,7 @@ function resolve(specifier, parsedImportMap, baseURL, expectedURL) {
if (event.data.result === 'TypeError') {
reject(new TypeError(event.data.message));
} else {
reject(new Error(event.data.result));
reject(new Error(event.data.message));
}
} else {
assert_unreached('Invalid message: ' + event.data.type);

View file

@ -0,0 +1,45 @@
{
"importMap": {
"imports": {
"data:text/": "/lib/test-data/",
"about:text/": "/lib/test-about/",
"blob:text/": "/lib/test-blob/",
"blah:text/": "/lib/test-blah/",
"http:text/": "/lib/test-http/",
"https:text/": "/lib/test-https/",
"file:text/": "/lib/test-file/",
"ftp:text/": "/lib/test-ftp/",
"ws:text/": "/lib/test-ws/",
"wss:text/": "/lib/test-wss/"
}
},
"importMapBaseURL": "https://example.com/app/index.html",
"baseURL": "https://example.com/js/app.mjs",
"name": "URL-like specifiers",
"tests": {
"Non-special vs. special schemes": {
"expectedResults": {
"data:text/javascript,console.log('foo')": "data:text/javascript,console.log('foo')",
"data:text/": "https://example.com/lib/test-data/",
"about:text/foo": "about:text/foo",
"about:text/": "https://example.com/lib/test-about/",
"blob:text/foo": "blob:text/foo",
"blob:text/": "https://example.com/lib/test-blob/",
"blah:text/foo": "blah:text/foo",
"blah:text/": "https://example.com/lib/test-blah/",
"http:text/foo": "https://example.com/lib/test-http/foo",
"http:text/": "https://example.com/lib/test-http/",
"https:text/foo": "https://example.com/lib/test-https/foo",
"https:text/": "https://example.com/lib/test-https/",
"ftp:text/foo": "https://example.com/lib/test-ftp/foo",
"ftp:text/": "https://example.com/lib/test-ftp/",
"file:text/foo": "https://example.com/lib/test-file/foo",
"file:text/": "https://example.com/lib/test-file/",
"ws:text/foo": "https://example.com/lib/test-ws/foo",
"ws:text/": "https://example.com/lib/test-ws/",
"wss:text/foo": "https://example.com/lib/test-wss/foo",
"wss:text/": "https://example.com/lib/test-wss/"
}
}
}
}

View file

@ -16,7 +16,7 @@
"baseURL": "https://example.com/js/app.mjs",
"name": "URL-like specifiers",
"tests": {
"Ordinal URL-like specifiers": {
"Ordinary URL-like specifiers": {
"expectedResults": {
"https://example.com/lib/foo.mjs": "https://example.com/app/more/bar.mjs",
"https://///example.com/lib/foo.mjs": "https://example.com/app/more/bar.mjs",
@ -47,6 +47,22 @@
"expectedResults": {
"/test": "https://example.com/lib/test2.mjs"
}
},
"backtracking (relative URLs)": {
"expectedResults": {
"/test/..": "https://example.com/lib/slash-only/",
"/test/../backtrack": "https://example.com/lib/slash-only/backtrack",
"/test/../../backtrack": "https://example.com/lib/slash-only/backtrack",
"/test/../../../backtrack": "https://example.com/lib/slash-only/backtrack"
}
},
"backtracking (absolute URLs)": {
"expectedResults": {
"https://example.com/test/..": "https://example.com/lib/slash-only/",
"https://example.com/test/../backtrack": "https://example.com/lib/slash-only/backtrack",
"https://example.com/test/../../backtrack": "https://example.com/lib/slash-only/backtrack",
"https://example.com/test/../../../backtrack": "https://example.com/lib/slash-only/backtrack"
}
}
}
}

View file

@ -79,6 +79,7 @@ dictionary EventListenerOptions {
dictionary AddEventListenerOptions : EventListenerOptions {
boolean passive = false;
boolean once = false;
AbortSignal signal;
};
[Exposed=(Window,Worker)]

View file

@ -373,7 +373,6 @@ dictionary RTCRtpContributingSource {
};
dictionary RTCRtpSynchronizationSource : RTCRtpContributingSource {
boolean voiceActivityFlag;
};
[Exposed=Window]

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<!-- Additional helper script for common checks across event types -->
<script type="text/javascript" src="pointerevent_support.js"></script>
</head>
@ -53,6 +56,7 @@
var test_lostpointercapture = async_test("lostpointercapture event received");
var test_pointerover_no_capture = async_test("pointerover event without capture received");
var test_pointerover_capture = async_test("pointerover event with capture received");
var test_pointerout_no_capture = async_test("pointerout event without capture received");
@ -64,6 +68,8 @@
var test_pointerleave_no_capture = async_test("pointerleave event without capture received");
var test_pointerleave_after_capture = async_test("pointerleave event after lostpointercapture received");
var actions_promise;
window.onload = function() {
on_event(captureButton, 'pointerdown', function(e) {
if(isPointerCapture == false) {
@ -147,7 +153,10 @@
}
else {
if (lostPointerCaptureReceived) {
// Make sure the test finishes after all the input actions are completed.
actions_promise.then( () => {
test_pointerleave_after_capture.done();
});
} else {
test_pointerleave_no_capture.done();
}
@ -190,6 +199,20 @@
}, "pointerleave shouldn't trigger for the purple rectangle while the black rectangle has capture");
}
});
actions_promise = new test_driver.Actions()
.pointerMove(0, 0, {origin: target0})
.pointerMove(0, 0, {origin: target1})
.pointerMove(0, 0, {origin: btnCapture})
.pointerDown()
.pointerMove(0, 0, {origin: btnCapture})
.pointerMove(10, 0, {origin: btnCapture})
.pointerMove(0, 0, {origin: target1})
.pointerMove(0, 0, {origin: target0})
.pointerMove(0, 0, {origin: target1})
.pointerUp()
.pointerMove(0, 0, {origin: target1})
.send();
}
</script>
<h1>Pointer Events Capture Test</h1>

View file

@ -6,6 +6,9 @@
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script type="text/javascript" src="pointerevent_support.js"></script>
<style>
#innerFrame {
@ -43,6 +46,48 @@
eventsRecieved[event.type] = true;
}
function testInputType(inputSource) {
const scale = 5;
const width = 3;
const height = 3;
var targetFrame = document.querySelector('#innerFrame');
var frameRect = targetFrame.getBoundingClientRect();
frameLeft = frameRect.left;
frameTop = frameRect.top;
target = [{x: 10, y: 10}, {x: 30, y: 50}, {x: 50, y: 30}]
xPosition = []
yPosition = []
for (var i = 0; i < target.length; i++) {
xPosition.push((target[i].x + width / 2.0) * scale + frameLeft);
yPosition.push((target[i].y + height / 2.0) * scale + frameTop);
}
return sendInputAt(inputSource, xPosition[0], yPosition[0]).then(function() {
return sendInputAt(inputSource, xPosition[1], yPosition[1]);
}).then(function() {
return sendInputAt(inputSource, xPosition[2], yPosition[2]);
});
}
function sendInputAt(inputSource, xPosition, yPosition) {
if (inputSource == "touch") {
return new test_driver.Actions()
.addPointer("touchPointer1", "touch")
.pointerMove(Math.ceil(xPosition), Math.ceil(yPosition))
.pointerDown()
.pointerMove(Math.ceil(xPosition + 1), Math.ceil(yPosition + 1))
.pointerUp()
.send();
} else {
return new test_driver.Actions()
.pointerMove(Math.ceil(xPosition), Math.ceil(yPosition))
.pointerDown()
.pointerUp()
.send();
}
}
function run() {
var test_pointerEvent = setup_pointerevent_test("pointerevent events in capturing", ALL_POINTERS);
var innerFrame = document.getElementById('innerFrame');
@ -70,6 +115,12 @@
}
});
});
testInputType("mouse").then(function() {
return testInputType("touch");
}).then(function() {
return testInputType("pen");
});
}
</script>
</head>

View file

@ -0,0 +1,33 @@
// Compare two Uint8Arrays.
function compareArrays(actual, expected) {
assert_true(actual instanceof Uint8Array, 'actual is Uint8Array');
assert_true(expected instanceof Uint8Array, 'expected is Uint8Array');
assert_equals(actual.byteLength, expected.byteLength, 'lengths equal');
for (let i = 0; i < expected.byteLength; ++i)
assert_equals(actual[i], expected[i], `Mismatch at position ${i}.`);
}
// Reads from |reader| until at least |targetLength| is read or the stream is
// closed. The data is returned as a combined Uint8Array.
async function readWithLength(reader, targetLength) {
const chunks = [];
let actualLength = 0;
while (true) {
let {value, done} = await reader.read();
chunks.push(value);
actualLength += value.byteLength;
if (actualLength >= targetLength || done) {
// It would be better to allocate |buffer| up front with the number of
// of bytes expected but this is the best that can be done without a
// BYOB reader to control the amount of data read.
const buffer = new Uint8Array(actualLength);
chunks.reduce((offset, chunk) => {
buffer.set(chunk, offset);
return offset + chunk.byteLength;
}, 0);
return buffer;
}
}
}

View file

@ -0,0 +1,38 @@
let manualTestPort = null;
navigator.serial.addEventListener('disconnect', (e) => {
if (e.port === manualTestPort) {
manualTestPort = null;
}
})
async function getPortForManualTest() {
if (manualTestPort) {
return manualTestPort;
}
const button = document.createElement('button');
button.textContent = 'Click to select a device';
button.style.display = 'block';
button.style.fontSize = '20px';
button.style.padding = '10px';
await new Promise((resolve) => {
button.onclick = () => {
document.body.removeChild(button);
resolve();
};
document.body.appendChild(button);
});
manualTestPort = await navigator.serial.requestPort({filters: []});
assert_true(manualTestPort instanceof SerialPort);
return manualTestPort;
}
function manual_loopback_serial_test(func, name, properties) {
promise_test(async (test) => {
await func(test, await getPortForManualTest());
}, name, properties);
}

View file

@ -0,0 +1,83 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/common.js"></script>
<script src="resources/manual.js"></script>
</head>
<body>
<p>
These tests require a serial device to be connected and disconnected.
</p>
<script>
manual_loopback_serial_test(async (t, port) => {
const watcher = new EventWatcher(t, navigator.serial, ['disconnect']);
await port.open({baudRate: 115200, bufferSize: 1024});
const disconnectPromise = watcher.wait_for(['disconnect'])
const reader = port.readable.getReader();
const disconnectMessage = document.createElement('div');
disconnectMessage.textContent = 'Disconnect the device now.';
document.body.appendChild(disconnectMessage);
try {
while (true) {
const {value, done} = await reader.read();
// Ignore |value| in case the device happens to produce data. It is
// not important for this test.
assert_false(done);
}
} catch (e) {
assert_equals(e.constructor, DOMException);
assert_equals(e.name, 'NetworkError');
}
reader.releaseLock();
assert_equals(port.readable, null);
let event = await disconnectPromise;
assert_equals(event.target, port);
disconnectMessage.remove();
await port.close();
}, 'Disconnect during read is detected.');
manual_loopback_serial_test(async (t, port) => {
const watcher = new EventWatcher(t, navigator.serial, ['disconnect']);
await port.open({baudRate: 115200, bufferSize: 1024});
const disconnectPromise = watcher.wait_for(['disconnect'])
const writer = port.writable.getWriter();
const disconnectMessage = document.createElement('div');
disconnectMessage.textContent = 'Disconnect the device now.';
document.body.appendChild(disconnectMessage);
const data = new Uint8Array(4096);
try {
while (true) {
await writer.write(data);
}
} catch (e) {
assert_equals(e.constructor, DOMException);
assert_equals(e.name, 'NetworkError');
}
writer.releaseLock();
assert_equals(port.writable, null);
let event = await disconnectPromise;
assert_equals(event.target, port);
disconnectMessage.remove();
await port.close();
}, 'Disconnect during write is detected.');
</script>
</body>
</html>

View file

@ -0,0 +1,181 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/common.js"></script>
<script src="resources/manual.js"></script>
</head>
<body>
<p>
These tests require a connected serial device configured to act as a
"loopback" device, with the transmit and receive pins wired together.
</p>
<script>
manual_loopback_serial_test(async (t, port) => {
await port.open({baudRate: 115200, bufferSize: 1024});
// Create something much smaller than bufferSize above.
const data = new Uint8Array(64);
for (let i = 0; i < data.byteLength; ++i)
data[i] = i & 0xff;
const reader = port.readable.getReader();
for (let i = 0; i < 10; ++i) {
const writer = port.writable.getWriter();
writer.write(data);
const writePromise = writer.close();
const value = await readWithLength(reader, data.byteLength);
await writePromise;
compareArrays(value, data);
}
reader.releaseLock();
await port.close();
}, 'Can perform a series of small writes.');
manual_loopback_serial_test(async (t, port) => {
await port.open({baudRate: 115200, bufferSize: 1024});
// Create something much larger than bufferSize above.
const data = new Uint8Array(10 * 1024);
for (let i = 0; i < data.byteLength; ++i)
data[i] = (i / 1024) & 0xff;
const reader = port.readable.getReader();
for (let i = 0; i < 10; ++i) {
const writer = port.writable.getWriter();
writer.write(data);
const writePromise = writer.close();
const value = await readWithLength(reader, data.byteLength);
await writePromise;
compareArrays(value, data);
}
reader.releaseLock();
await port.close();
}, 'Can perform a series of large writes.');
manual_loopback_serial_test(async (t, port) => {
await port.open({baudRate: 115200, bufferSize: 64});
const writer = port.writable.getWriter();
// |data| is small enough to be completely transmitted.
let data = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]);
await writer.write(data);
// Wait a little bit for the device to process the incoming data.
await new Promise((resolve) => setTimeout(resolve, 100));
// ...before discarding the receive buffers.
await port.readable.cancel();
data = new Uint8Array([9, 10, 11, 12, 13, 14, 15, 16]);
const reader = port.readable.getReader();
const readPromise = readWithLength(reader, data.byteLength);
// The next block of data should be received successfully.
await writer.write(data);
writer.releaseLock();
const value = await readPromise;
reader.releaseLock();
compareArrays(value, data);
await port.close();
}, 'Canceling the reader discards buffered data.');
manual_loopback_serial_test(async (t, port) => {
await port.open({baudRate: 115200, bufferSize: 1024});
// Create something much larger than bufferSize above.
const data = new Uint8Array(16 * 1024);
for (let i = 0; i < data.byteLength; ++i)
data[i] = (i / 1024) & 0xff;
// Completely write |data| to the port without waiting for it to be
// received.
const writer = port.writable.getWriter();
writer.write(data);
await writer.close();
const reader = port.readable.getReader();
const chunks = [];
let actualLength = 0;
while (true) {
try {
const {value, done} = await reader.read();
if (value) {
actualLength += value.byteLength;
chunks.push(value);
}
if (done) {
assert_unreached("Unexpected end of stream.");
break;
}
} catch (e) {
assert_equals(e.name, 'BufferOverrunError');
break;
}
}
reader.releaseLock();
const buffer = new Uint8Array(actualLength);
chunks.reduce((offset, chunk) => {
buffer.set(chunk, offset);
return offset + chunk.byteLength;
}, 0);
assert_greater_than(actualLength, 0);
compareArrays(buffer, data.slice(0, actualLength));
await port.close();
}, 'Overflowing the receive buffer triggers an error.');
manual_loopback_serial_test(async (t, port) => {
await port.open({baudRate: 115200, bufferSize: 1024});
let reader = port.readable.getReader();
let readPromise = (async () => {
// A single zero byte will be read before the break is detected.
const {value, done} = await reader.read();
compareArrays(value, new Uint8Array([0]));
assert_false(done);
try {
const {value, done} = await reader.read();
assert_unreached(`Expected break, got ${value.byteLength} bytes`);
} catch (e) {
assert_equals(e.constructor, DOMException);
assert_equals(e.name, 'BreakError');
}
})();
await port.setSignals({break: true});
await readPromise;
await port.setSignals({break: false});
const writer = port.writable.getWriter();
// |data| is small enough to be completely transmitted.
let data = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]);
await writer.write(data);
writer.releaseLock();
reader = port.readable.getReader();
const buffer = await readWithLength(reader, data.byteLength);;
compareArrays(buffer, data);
reader.releaseLock();
await port.close();
}, 'Break is detected.');
</script>
</body>
</html>

View file

@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: enum34
Version: 1.1.6
Version: 1.1.10
Summary: Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4
Home-page: https://bitbucket.org/stoneleaf/enum34
Author: Ethan Furman
@ -57,6 +57,4 @@ Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Provides: enum

View file

@ -4,7 +4,7 @@ import sys as _sys
__all__ = ['Enum', 'IntEnum', 'unique']
version = 1, 1, 6
version = 1, 1, 10
pyver = float('%s.%s' % _sys.version_info[:2])
@ -183,6 +183,7 @@ class EnumMeta(type):
else:
del classdict['_order_']
if pyver < 3.0:
if isinstance(_order_, basestring):
_order_ = _order_.replace(',', ' ').split()
aliases = [name for name in members if name not in _order_]
_order_ += aliases
@ -463,7 +464,7 @@ class EnumMeta(type):
_order_.append(member_name)
# only set _order_ in classdict if name/value was not from a mapping
if not isinstance(item, basestring):
classdict['_order_'] = ' '.join(_order_)
classdict['_order_'] = _order_
enum_class = metacls.__new__(metacls, class_name, bases, classdict)
# TODO: replace the frame hack if a blessed way to know the calling

File diff suppressed because it is too large Load diff

View file

@ -452,8 +452,8 @@ class TestEnum(unittest.TestCase):
self.assertEqual(dates[Season.AUTUMN], '1031')
def test_enum_duplicates(self):
_order_ = "SPRING SUMMER AUTUMN WINTER"
class Season(Enum):
_order_ = "SPRING SUMMER AUTUMN WINTER"
SPRING = 1
SUMMER = 2
AUTUMN = FALL = 3
@ -665,7 +665,7 @@ class TestEnum(unittest.TestCase):
protocol=(0, HIGHEST_PROTOCOL))
def test_exploding_pickle(self):
BadPickle = Enum('BadPickle', 'dill sweet bread-n-butter')
BadPickle = Enum('BadPickle', 'dill sweet bread_n_butter')
enum._make_class_unpicklable(BadPickle)
globals()['BadPickle'] = BadPickle
test_pickle_exception(self.assertRaises, TypeError, BadPickle.dill)
@ -813,6 +813,27 @@ class TestEnum(unittest.TestCase):
self.assertTrue(e in SummerMonth)
self.assertTrue(type(e) is SummerMonth)
def test_programatic_function_iterable_with_weird_names(self):
SummerMonth = Enum(
'SummerMonth',
(('june', 1), ('july', 2), ('august', 3), ('fabulous september', 4))
)
lst = list(SummerMonth)
self.assertEqual(len(lst), len(SummerMonth))
self.assertEqual(len(SummerMonth), 4, SummerMonth)
self.assertEqual(
[SummerMonth.june, SummerMonth.july, SummerMonth.august, SummerMonth['fabulous september']],
lst,
)
for i, month in enumerate('june july august'.split() + ['fabulous september']):
i += 1
e = SummerMonth(i)
self.assertEqual(int(e.value), i)
self.assertNotEqual(e, i)
self.assertEqual(e.name, month)
self.assertTrue(e in SummerMonth)
self.assertTrue(type(e) is SummerMonth)
def test_programatic_function_from_dict(self):
SummerMonth = Enum(
'SummerMonth',

View file

@ -1,5 +1,4 @@
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0

View file

@ -9,6 +9,14 @@ if sys.version_info[:2] < (2, 7):
else:
required = []
# Don't shadow builtin enum package if we are being installed on a
# recent Python. This causes conflicts since at least 3.6:
# https://bitbucket.org/stoneleaf/enum34/issues/19/enum34-isnt-compatible-with-python-36
if sys.version_info[:2] < (3, 4):
packages = ['enum']
else:
packages = []
long_desc = '''\
enum --- support for enumerations
========================================
@ -54,15 +62,15 @@ Repository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.
py2_only = ()
py3_only = ()
make = [
'rst2pdf enum/doc/enum.rst --output=enum/doc/enum.pdf',
# 'rst2pdf enum/doc/enum.rst --output=enum/doc/enum.pdf',
]
data = dict(
name='enum34',
version='1.1.6',
version='1.1.10',
url='https://bitbucket.org/stoneleaf/enum34',
packages=['enum'],
packages=packages,
package_data={
'enum' : [
'LICENSE',
@ -90,8 +98,6 @@ data = dict(
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
)

View file

@ -100,5 +100,81 @@ for (const options of [{}, {negotiated: true, id: 0}]) {
pc1.close();
await new Promise(resolve => t.step_timeout(resolve, 10));
}, `Close peerconnection after ${mode} close causes no events`);
promise_test(async t => {
const pc1 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close());
const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc2.close());
pc1.createDataChannel('not-counted', options);
const tokenDataChannel = new Promise(resolve => {
pc2.ondatachannel = resolve;
});
exchangeIceCandidates(pc1, pc2);
await exchangeOfferAnswer(pc1, pc2);
if (!options.negotiated) {
await tokenDataChannel;
}
let closeExpectedCount = 0;
let errorExpectedCount = 0;
let resolveCountIsZero;
let waitForCountIsZero = new Promise(resolve => {
resolveCountIsZero = resolve;
});
for (let i = 1; i <= 10; i++) {
if ('id' in options) {
options.id = i;
}
pc1.createDataChannel('', options);
if (options.negotiated) {
const channel = pc2.createDataChannel('', options);
channel.addEventListener('error', t.step_func(event => {
assert_true(event instanceof RTCErrorEvent, 'error event ' + event);
errorExpectedCount -= 1;
}));
channel.addEventListener('close', t.step_func(event => {
closeExpectedCount -= 1;
if (closeExpectedCount == 0) {
resolveCountIsZero();
}
}));
} else {
await new Promise(resolve => {
pc2.ondatachannel = ({channel}) => {
channel.addEventListener('error', t.step_func(event => {
assert_true(event instanceof RTCErrorEvent);
errorExpectedCount -= 1;
}));
channel.addEventListener('close', t.step_func(event => {
closeExpectedCount -= 1;
if (closeExpectedCount == 0) {
resolveCountIsZero();
}
}));
resolve();
}
});
}
++closeExpectedCount;
++errorExpectedCount;
}
assert_equals(closeExpectedCount, 10);
// We have to wait until SCTP is connected before we close, otherwise
// there will be no signal.
// The state is not available under Plan B, and unreliable on negotiated
// channels.
// TODO(bugs.webrtc.org/12259): Remove dependency on "negotiated"
if (pc1.sctp && !options.negotiated) {
waitForState(pc1.sctp, 'connected');
} else {
// Under plan B, we don't have a dtls transport to wait on, so just
// wait a bit.
await new Promise(resolve => t.step_timeout(resolve, 100));
}
pc1.close();
await waitForCountIsZero;
assert_equals(closeExpectedCount, 0);
assert_equals(errorExpectedCount, 0);
}, `Close peerconnection causes close event and error on many channels, ${mode}`);
}
</script>

View file

@ -0,0 +1,38 @@
let manualTestDevice = null;
navigator.usb.addEventListener('disconnect', (e) => {
if (e.device === manualTestDevice) {
manualTestDevice = null;
}
})
async function getDeviceForManualTest() {
if (manualTestDevice) {
return manualTestDevice;
}
const button = document.createElement('button');
button.textContent = 'Click to select a device';
button.style.display = 'block';
button.style.fontSize = '20px';
button.style.padding = '10px';
await new Promise((resolve) => {
button.onclick = () => {
document.body.removeChild(button);
resolve();
};
document.body.appendChild(button);
});
manualTestDevice = await navigator.usb.requestDevice({filters: []});
assert_true(manualTestDevice instanceof USBDevice);
return manualTestDevice;
}
function manual_usb_test(func, name, properties) {
promise_test(async (test) => {
await func(test, await getDeviceForManualTest());
}, name, properties);
}

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/manual.js"></script>
</head>
<body>
<p>
These tests require a USB device to be connected.
</p>
<script>
manual_usb_test(async (t, device) => {
await device.open();
const interfacesClaimed = [];
t.add_cleanup(async () => {
for (const iface of interfacesClaimed) {
await device.releaseInterface(iface.interfaceNumber);
}
await device.close();
});
await device.selectConfiguration(1);
const promises = [];
for (const iface of device.configuration.interfaces) {
const promise = device.claimInterface(iface.interfaceNumber);
promises.push(promise);
// Create a subtest for each interface so that success or failure to
// claim the interface is visible but does not affect the result of
// the overall test.
promise_test(async (t) => {
await promise;
interfacesClaimed.push(iface);
}, `Can claim interface ${iface.interfaceNumber}`);
}
await Promise.allSettled(promises);
}, 'claimInterface() resolves or rejects for all interfaces');
</script>
</body>
</html>