Auto merge of #27722 - servo-wpt-sync:wpt_update_27-10-2020, r=servo-wpt-sync

Sync WPT with upstream (27-10-2020)

Automated downstream sync of changes from upstream as of 27-10-2020.
[no-wpt-sync]
r? @servo-wpt-sync
This commit is contained in:
bors-servo 2020-10-27 09:19:31 -04:00 committed by GitHub
commit 80570dafdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 968 additions and 189 deletions

View file

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

View file

@ -0,0 +1,4 @@
[hit-test-floats-002.html]
[Hit test float]
expected: FAIL

View file

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

View file

@ -1,4 +0,0 @@
[hit-test-floats-005.html]
[Miss clipped float]
expected: FAIL

View file

@ -0,0 +1,4 @@
[CaretPosition-001.html]
[Element at (400, 100)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[scroll-overflow-clip-quirks-001.html]
[CSSOM scrollingElement reflects the propagated scroll to viewport correctly]
expected: FAIL

View file

@ -0,0 +1,4 @@
[scroll-overflow-clip-quirks-002.html]
[CSSOM scrollingElement reflects the propagated scroll to viewport correctly]
expected: FAIL

View file

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

View file

@ -56,3 +56,6 @@
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript ]
expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[traverse_the_history_3.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

@ -1,16 +1,17 @@
[supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus]
expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped]
expected: FAIL
expected: NOTRUN
[Element with tabindex should support autofocus]
expected: FAIL
[Area element should support autofocus]
expected: FAIL
expected: NOTRUN
[Host element with delegatesFocus should support autofocus]
expected: FAIL
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[iframe_sandbox_popups_escaping-2.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: TIMEOUT
expected: CRASH
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[module-delayed.html]
[async document.write in a module]
expected: FAIL

View file

@ -0,0 +1,4 @@
[module-static-import-delayed.html]
[document.write in an imported module]
expected: FAIL

View file

@ -3,6 +3,3 @@
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: TIMEOUT
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: FAIL

View file

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

View file

@ -197,3 +197,9 @@
[X SNR (-529.35563055275 dB) is not greater than or equal to 65.737. Got -529.35563055275.]
expected: FAIL
[X SNR (-481.3741499669012 dB) is not greater than or equal to 65.737. Got -481.3741499669012.]
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\]\t1.7394493830210567e+26\t9.3139332532882690e-1\t1.7394493830210567e+26\t1.8675776771397270e+26\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 1.7394493830210567e+26 at index of 28696.\n\tMax RelError of 1.8675776771397270e+26 at index of 28696.\n]
expected: FAIL

View file

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

View file

@ -1,4 +0,0 @@
[WorkerGlobalScope-close.html]
[Test sending a message after closing.]
expected: FAIL

View file

@ -0,0 +1,2 @@
[Worker-constructor.html]
expected: ERROR

View file

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

View file

@ -127979,6 +127979,19 @@
{}
]
],
"out-of-flow-in-multicolumn-002.html": [
"bc91fe11c6975eb6ea9fbe274a0a93d596efff5f",
[
null,
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"overflowed-block-with-no-room-after-000.html": [
"084e16fb38de072fb83f92ba01302a2e404cdd97",
[
@ -128070,6 +128083,19 @@
{}
]
],
"relpos-inline.html": [
"a296f0ae7eb04e0b7fee52f9da9da84ff9ddd884",
[
null,
[
[
"/css/css-break/relpos-inline-ref.html",
"=="
]
],
{}
]
],
"tall-break-inside-avoid-at-start.html": [
"6e9ab8bd9f56502247a6d8c2c2045b8f3af3605d",
[
@ -250040,7 +250066,7 @@
],
"reftests": {
"display-none-mask.html": [
"5a746c9fdaec71c5c530e393aaa1f641f55c89b8",
"a6aa6007574ff6c3b2930fd15b6e51d65a633c7e",
[
null,
[
@ -299958,7 +299984,11 @@
"06108ac800c19c68841f2a0e8867fb05e868c1ab",
[]
]
}
},
"relpos-inline-ref.html": [
"8c19f1cf4c6c0173b45face28d624368d365ec70",
[]
]
},
"css-cascade": {
"META.yml": [
@ -345015,6 +345045,10 @@
"62c141d960d27dc59666538b2ec0f185f59c9468",
[]
],
"input-types.js": [
"44567510523622ff06f3ffccdd26cd44f864f372",
[]
],
"multiline-placeholder-ref.html": [
"2812f86e1e6c8e240f60ff313e856b6733e54b5e",
[]
@ -358879,7 +358913,7 @@
],
"reftests": {
"display-none-mask-ref.html": [
"7835597d961a9c9feb0fff92b0f651e164456c12",
"3739265b23d22e39f2e2acdc90d94c583b36f4f9",
[]
],
"marker-path-001-ref.svg": [
@ -366154,7 +366188,7 @@
]
},
"requirements.txt": [
"1eba114a31c21f3e48aafae5e9466cefbe741288",
"7567e81ada590486bda300e484564700c373d11a",
[]
],
"requirements_android_webview.txt": [
@ -368773,7 +368807,7 @@
[]
],
"helpers.js": [
"c355d0586257b802c3f4a401c7ddedad16c860f9",
"620feebd2999ac71fe06d73e7b0cda4ec5d855fe",
[]
],
"resources": {
@ -400381,6 +400415,13 @@
]
]
},
"relpos-inline-hit-testing.html": [
"ca0c961ca22b3ac7fac7f25f21085ceb220dfddc",
[
null,
{}
]
],
"remove-inline-child.html": [
"64f4d0b1ac224b3386e915f31bedd70d718a5528",
[
@ -422095,6 +422136,20 @@
{}
]
],
"scroll-overflow-clip-quirks-001.html": [
"ae70083ac32af4e89dc15d6dca9192c827f36ac3",
[
null,
{}
]
],
"scroll-overflow-clip-quirks-002.html": [
"8909125649a0f8731898d203593d591f8b2da41b",
[
null,
{}
]
],
"scrollIntoView-horizontal-partially-visible.html": [
"1e8bc50071f080a89b9e19bbad9f6c4fbda1cc29",
[
@ -422243,7 +422298,7 @@
]
],
"scrollingElement.html": [
"84d313741ce88f5e3ae77e5c85f79a88348caddc",
"408fa47be9a3330aff88ef01e9b8be90fd4008ce",
[
null,
{}
@ -470864,6 +470919,13 @@
{}
]
],
"fieldset-content-percentage-size.html": [
"6195d8bb0527b5d3e72e57c41da32bfe2aa4bb50",
[
null,
{}
]
],
"fieldset-default-style.html": [
"f07c84f406cefc7054e8a13c2796d3d82673bdf7",
[
@ -477481,6 +477543,15 @@
{}
]
],
"selection-pointer.html": [
"8ad1f578215773a072304108e528c96afafd2797",
[
null,
{
"testdriver": true
}
]
],
"selection.html": [
"42c40108d92716ca263323389d05c5480703b393",
[
@ -489560,7 +489631,7 @@
]
],
"attribute-mapping-002.html": [
"e4532321e4a5b20944ff4181b2ad9b967ee31213",
"1fe9b34f98189c12683e13df931f63c572e00fdf",
[
null,
{}
@ -518868,7 +518939,7 @@
]
],
"general.any.js": [
"bd18973b41315d1bdbf3f242d6c09f821c867f3f",
"2e02dfad78a0fa0f74d916075a2d87bf8430e2f5",
[
null,
{
@ -536313,7 +536384,7 @@
]
],
"createcredential-extensions.https.html": [
"46cab3051b4924a2cb9cf1d7a2df46046b7b2f23",
"64690e7c506bb77ad260fe8606d499e2e1fb9b23",
[
null,
{
@ -536332,6 +536403,26 @@
}
]
],
"createcredential-large-blob-not-supported.https.html": [
"1a320d54d156baf0cd55f32c3154331f6ce958e3",
[
null,
{
"testdriver": true,
"timeout": "long"
}
]
],
"createcredential-large-blob-supported.https.html": [
"46623de77476141fb4adf72e3b63ddc62d34489b",
[
null,
{
"testdriver": true,
"timeout": "long"
}
]
],
"createcredential-passing.https.html": [
"30fef13bbdc9efb5659460652054d119399ce819",
[
@ -536392,6 +536483,26 @@
}
]
],
"getcredential-large-blob-not-supported.https.html": [
"26e91d8f4f632fe9f396e9758421f3131b4e8633",
[
null,
{
"testdriver": true,
"timeout": "long"
}
]
],
"getcredential-large-blob-supported.https.html": [
"02aea568173a317e76ce0516f06d2a5d675a7252",
[
null,
{
"testdriver": true,
"timeout": "long"
}
]
],
"getcredential-passing.https.html": [
"1af35aa9cb14327d3d1d4ea660b7380d6b0f65bd",
[
@ -536482,7 +536593,7 @@
]
],
"video-decoder.html": [
"33c478d0090775bee319c6f30710bfdedad7bc86",
"f653ba03b09a51b9e25b90173b4d7002242e05e7",
[
null,
{}
@ -538724,7 +538835,7 @@
]
],
"RTCPeerConnection-insertable-streams-audio.https.html": [
"3d419b2b9a792fe7e732309f81e64716146cd683",
"04282d0942cc1f8b733d9a48cab3a77a264b7f34",
[
null,
{}
@ -538766,7 +538877,7 @@
]
],
"RTCPeerConnection-insertable-streams-worker.https.html": [
"a21a0d90e55cbcc1ca912b88cfa61d038688e1fc",
"04c9c106b873058176298d8deca1cad06ffc8049",
[
null,
{}

View file

@ -0,0 +1,4 @@
[hit-test-floats-002.html]
[Hit test float]
expected: FAIL

View file

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

View file

@ -1,4 +0,0 @@
[hit-test-floats-005.html]
[Miss clipped float]
expected: FAIL

View file

@ -0,0 +1,4 @@
[CaretPosition-001.html]
[Element at (400, 100)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[scroll-overflow-clip-quirks-001.html]
[CSSOM scrollingElement reflects the propagated scroll to viewport correctly]
expected: FAIL

View file

@ -0,0 +1,4 @@
[scroll-overflow-clip-quirks-002.html]
[CSSOM scrollingElement reflects the propagated scroll to viewport correctly]
expected: FAIL

View file

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

View file

@ -56,3 +56,6 @@
[separate text/javascript x/x]
expected: FAIL
[separate text/javascript ]
expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[traverse_the_history_3.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

@ -1,4 +1,5 @@
[supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus]
expected: FAIL
@ -6,11 +7,11 @@
expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped]
expected: FAIL
expected: NOTRUN
[Area element should support autofocus]
expected: FAIL
expected: NOTRUN
[Host element with delegatesFocus should support autofocus]
expected: FAIL
expected: TIMEOUT

View file

@ -1,5 +1,4 @@
[iframe_sandbox_popups_escaping-2.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,6 +1,6 @@
[iframe_sandbox_popups_nonescaping-2.html]
type: testharness
expected: TIMEOUT
expected: CRASH
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN

View file

@ -1,4 +0,0 @@
[module-delayed.html]
[async document.write in a module]
expected: FAIL

View file

@ -0,0 +1,4 @@
[module-static-import-delayed.html]
[document.write in an imported module]
expected: FAIL

View file

@ -4,6 +4,3 @@
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: TIMEOUT
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
expected: FAIL

View file

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

View file

@ -425,3 +425,9 @@
[X SNR (-529.35563055275 dB) is not greater than or equal to 65.737. Got -529.35563055275.]
expected: FAIL
[X SNR (-481.3741499669012 dB) is not greater than or equal to 65.737. Got -481.3741499669012.]
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\]\t1.7394493830210567e+26\t9.3139332532882690e-1\t1.7394493830210567e+26\t1.8675776771397270e+26\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 1.7394493830210567e+26 at index of 28696.\n\tMax RelError of 1.8675776771397270e+26 at index of 28696.\n]
expected: FAIL

View file

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

View file

@ -1,4 +0,0 @@
[WorkerGlobalScope-close.html]
[Test sending a message after closing.]
expected: FAIL

View file

@ -0,0 +1,2 @@
[Worker-constructor.html]
expected: ERROR

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<link rel="help" href="href=https://www.w3.org/TR/css-break-3/#break-decoration">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
<!-- Tests fragmentation when a positioned node's child overflows. -->
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<style>
#multicol {
column-count: 2;
column-fill: auto;
column-gap: 0px;
height: 100px;
width: 50px;
}
.rel {
position: relative;
width: 30px;
}
.abs {
position: absolute;
top: 0px;
width: 5px;
height: 10px;
background: green;
}
</style>
<div id="multicol">
<div class="rel">
<div class="abs">
<div style="background: green; width: 25px; height: 400px;"></div>
</div>
</div>
<div style="background-color: red; width: 20px; height: 140px;"></div>
</div>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-break-3/#transforms">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#relative-positioning">
<link rel="match" href="relpos-inline-ref.html">
<style>
body {
margin: 8px;
}
#target {
position: relative;
left: -100px;
top: 100px;
border: 1px solid;
background: hotpink;
}
</style>
<div style="columns:4; column-gap:0; column-fill:auto; line-height:30px; width:600px; height:60px; orphans:1; widows:1;">
<br><br><br>
<span id="target">
line1<br>
line2<br>
line3<br>
line4<br>
</span>
</div>
<div id="log" style="margin-top:100px;"></div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(()=> { assert_equals(document.elementFromPoint(58, 153), target); }, "line1");
test(()=> { assert_equals(document.elementFromPoint(208, 123), target); }, "line2");
test(()=> { assert_equals(document.elementFromPoint(208, 153), target); }, "line3");
test(()=> { assert_equals(document.elementFromPoint(358, 123), target); }, "line4");
test(()=> { assert_not_equals(document.elementFromPoint(58, 123), target); }, "Above line1");
test(()=> { assert_not_equals(document.elementFromPoint(358, 153), target); }, "Below line4");
test(()=> { assert_not_equals(document.elementFromPoint(158, 48), target); }, "line1 before offsetting");
</script>

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<style>
span {
position: relative;
left: -100px;
top: 100px;
border: 1px solid;
background:hotpink;
}
.fakecol {
float: left;
width: 150px;
height: 100%;
}
</style>
<div style="line-height:30px; height:60px;">
<div class="fakecol"></div>
<div class="fakecol">
<br>
<span style="border-right:none;">
line1<br>
</span>
</div>
<div class="fakecol">
<span style="border-left:none; border-right:none;">
line2<br>
line3<br>
</span>
</div>
<div class="fakecol">
<span style="border-left:none;">
line4<br>
</span>
</div>
</div>

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-break-3/#transforms">
<link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#relative-positioning">
<link rel="match" href="relpos-inline-ref.html">
<div style="columns:4; column-gap:0; column-fill:auto; line-height:30px; width:600px; height:60px; orphans:1; widows:1;">
<br><br><br>
<span style="position:relative; left:-100px; top:100px; border:1px solid; background:hotpink;">
line1<br>
line2<br>
line3<br>
line4<br>
</span>
</div>

View file

@ -0,0 +1,23 @@
<!-- quirks -->
<title>CSSOM scrollingElement reflects the propagated scroll to viewport correctly</title>
<meta charset="utf-8">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#overflow-propagation">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5601">
<style>
:root {
overflow: clip;
}
body {
overflow: scroll;
}
</style>
<script>
test(function() {
assert_equals(document.scrollingElement, null);
});
</script>

View file

@ -0,0 +1,20 @@
<!-- quirks -->
<title>CSSOM scrollingElement reflects the propagated scroll to viewport correctly</title>
<meta charset="utf-8">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#overflow-propagation">
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/5601">
<style>
body {
overflow: clip;
}
</style>
<script>
test(function() {
assert_equals(document.scrollingElement, document.body);
});
</script>

View file

@ -93,12 +93,16 @@ function nonQuirksTest(rootDisplay, bodyDisplay) {
nonQuirksDoc.documentElement.style.display = rootDisplay;
nonQuirksDoc.body.style.display = bodyDisplay;
// Tests for non-quirks mode document.
assert_equals(nonQuirksDoc.scrollingElement, nonQuirksDoc.documentElement,
"scrollingElement in standards mode should be the document element.");
nonQuirksDoc.documentElement.style.overflow = "scroll";
nonQuirksDoc.body.style.overflow = "scroll";
assert_equals(nonQuirksDoc.scrollingElement, nonQuirksDoc.documentElement);
for (let rootOverflow of ["", "clip", "scroll", "hidden", "visible"]) {
for (let bodyOverflow of ["", "clip", "scroll", "hidden", "visible"]) {
nonQuirksDoc.documentElement.style.overflow = rootOverflow;
nonQuirksDoc.body.style.overflow = bodyOverflow;
assert_equals(nonQuirksDoc.scrollingElement, nonQuirksDoc.documentElement);
}
}
nonQuirksDoc.removeChild(nonQuirksDoc.documentElement);
assert_equals(nonQuirksDoc.scrollingElement, null);

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<link rel="help" href="https://crbug.com/1140595">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div style="height:100px;">
<fieldset style="margin:0; padding:0; border:none;">
<div id="inner" style="height:59%;"></div>
</fieldset>
</div>
<script>
test(() => {
let innerDiv = document.querySelector('#inner');
assert_equals(innerDiv.clientHeight, 0);
}, 'A percentage height for an element in an auto-height fieldset should be ignored');
</script>

View file

@ -0,0 +1,24 @@
export default [
"button",
"checkbox",
"color",
"date",
"datetime-local",
"email",
"file",
"hidden",
"image",
"month",
"number",
"password",
"radio",
"range",
"reset",
"search",
"submit",
"tel",
"text",
"time",
"url",
"week",
];

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Selecting texts across input element</title>
<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>
<link rel="stylesheet" href="/fonts/ahem.css" />
<style>
.test {
font: 16px/1 Ahem;
padding-bottom: 16px;
}
</style>
<div class="test">
<span id="foo">foo</span><br>
<input id="input"><br>
<span id="bar">bar</span>
</div>
<script type="module">
import inputTypes from "./input-types.js";
const selection = getSelection();
const inputVisibleTypes = inputTypes.filter(t => t !== "hidden");
for (const inputType of inputVisibleTypes) {
promise_test(async () => {
input.type = inputType;
selection.collapse(foo);
await new test_driver.Actions()
.pointerMove(0, 0, {origin: foo})
.pointerDown()
.pointerMove(0, 0, {origin: input})
.pointerMove(0, 0, {origin: bar})
.pointerUp()
.send();
assert_equals(selection.anchorNode, foo.childNodes[0], "anchorNode");
assert_equals(selection.focusNode, bar.childNodes[0], "focusNode");
}, `Selecting texts across <input type=${inputType}> should not cancel selection`);
}
</script>

View file

@ -44,26 +44,52 @@
test(function() {
// none and mprescripts appear as scripts
assert_equals(style.getPropertyValue("math-depth"), tag === "none" || tag === "mprescripts" ? 1 : 0, "no attribute");
assert_equals(style.getPropertyValue("math-depth"), tag === "none" || tag === "mprescripts" ? "1" : "0", "no attribute");
var absoluteScriptlevel = 2;
element.setAttribute("scriptlevel", absoluteScriptlevel);
assert_equals(style.getPropertyValue("math-depth"), absoluteScriptlevel, "attribute specified (<U>)");
assert_equals(style.getPropertyValue("math-depth"), "" + absoluteScriptlevel, "attribute specified <U>");
var positiveScriptlevelDelta = 1;
element.setAttribute("scriptlevel", `+${positiveScriptlevelDelta}`);
assert_equals(style.getPropertyValue("math-depth"), positiveScriptlevelDelta, epsilon, "attribute specified (+<U>)");
assert_equals(style.getPropertyValue("math-depth"), "" + positiveScriptlevelDelta, "attribute specified +<U>");
var negativeScriptlevelDelta = -3;
element.setAttribute("scriptlevel", negativeScriptlevelDelta);
assert_approx_equals(style.getPropertyValue("math-depth"), negativeScriptlevelDelta, "attribute specified (-<U>)");
element.setAttribute("scriptlevel", `${negativeScriptlevelDelta}`);
assert_equals(style.getPropertyValue("math-depth"), "" + negativeScriptlevelDelta, "attribute specified -<U>");
element.setAttribute("scriptlevel", absoluteScriptlevel);
element.setAttribute("mathsize", "42px");
assert_approx_equals(fontSize(style), 42, epsilon, "mathsize wins over scriptlevel");
assert_approx_equals(fontSize(style), 42, 1, "mathsize wins over scriptlevel");
}, `scriptlevel on the ${tag} element is mapped to math-depth(...)`);
test(function() {
// none and mprescripts appear as scripts
let expected = 0;
element.setAttribute("scriptlevel", "" + expected);
assert_equals(style.getPropertyValue("math-depth"), "" + expected, "no attribute");
element.setAttribute("scriptlevel", " +1");
assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value");
element.setAttribute("scriptlevel", " + 1");
assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value");
element.setAttribute("scriptlevel", "2.0");
assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value");
element.setAttribute("scriptlevel", "-3\"");
assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value");
element.setAttribute("scriptlevel", "200px");
assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value");
element.setAttribute("scriptlevel", "add(2)");
assert_equals(style.getPropertyValue("math-depth"), "" + expected, "invalid scriptlevel value");
}, `invalid scriptlevel values on the ${tag} element are not mapped to math-depth(...)`);
test(function() {
assert_equals(style.getPropertyValue("math-style"), "compact", "no attribute");
element.setAttribute("displaystyle", "true");

View file

@ -198,3 +198,14 @@ promise_test(t => {
}
}), 'pipeTo should reject');
}, 'pipeTo() should reject if an option getter grabs a writer');
promise_test(t => {
const rs = new ReadableStream({
start(controller) {
controller.close();
}
});
const ws = new WritableStream();
return rs.pipeTo(ws, null);
}, 'pipeTo() promise should resolve if null is passed');

View file

@ -8,12 +8,12 @@
<body>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red"></div>
<div style="width: 200px; height: 200px;"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red"></div>
<div style="width: 200px; height: 200px; background: green"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
@ -23,28 +23,28 @@
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px;"></div>
<div style="width: 200px; height: 200px; background: green"></div>
</foreignObject>
</svg>
<!-- make sure masking actually works -->
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
<!-- make sure masking works on active content -->
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
<svg width="200" height="200">
<rect x="0" y="0" width="100" height="50" fill="red"></rect>
<rect x="0" y="100" width="100" height="50" fill="red"></rect>
<rect x="0" y="0" width="100" height="50" fill="green"></rect>
<rect x="0" y="100" width="100" height="50" fill="green"></rect>
</svg>
</body>
</html>

View file

@ -3,28 +3,39 @@
<head>
<meta charset="UTF-8">
<link rel="match" href="display-none-mask-ref.html" />
<title>Mask behaviour when mask image is missing or display:none</title>
<link rel="match" href="display-none-mask-ref.html">
<link name="author" title="Timothy Nikkel" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1624532">
<link name="author" title="Mike Bremford" href="http://bfo.com"> <!-- edited 202010 -->
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-mask-image">
<link rel="help" href="https://drafts.fxtf.org/css-masking-1/#MaskElement">
<link rel="help" href="https://github.com/w3c/fxtf-drafts/issues/245">
<meta name="assert" content="A missing or invalid mask image is equivalent to transparent black (i.e. nothing is displayed). A mask with display:none is disabled (which is a change to the specified behaviour as of issue 245)">
</head>
<body>
<svg width="200" height="200">
<!-- missing/invalid mask is equivalent to transparent black - nothing displayed -->
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#notfound');">
<div style="width: 200px; height: 200px; background: red"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<!-- display:none on mask means mask is not applied (new in https://github.com/w3c/fxtf-drafts/issues/245) -->
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#noneMask');">
<div style="width: 200px; height: 200px; background: red"></div>
<div style="width: 200px; height: 200px; background: green"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<!-- missing/invalid mask is equivalent to transparent black - nothing displayed -->
<div style="width: 200px; height: 200px; background: red; mask: url('#notfound');"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red; mask: url('#noneMask');"></div>
<!-- display:none on mask means mask is not applied (new in https://github.com/w3c/fxtf-drafts/issues/245) -->
<div style="width: 200px; height: 200px; background: green; mask: url('#noneMask');"></div>
</foreignObject>
</svg>
@ -45,24 +56,24 @@
</mask>
</defs>
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#aMask');">
<div style="width: 200px; height: 200px; background: red;"></div>
<div style="width: 200px; height: 200px; background: green;"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red; mask: url('#aMask');"></div>
<div style="width: 200px; height: 200px; background: green; mask: url('#aMask');"></div>
</foreignObject>
</svg>
<!-- make sure masking works on active content -->
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200" style="mask: url('#aMask');">
<div style="width: 200px; height: 200px; background: red; will-change: transform"></div>
<div style="width: 200px; height: 200px; background: green; will-change: transform"></div>
</foreignObject>
</svg>
<svg width="200" height="200">
<foreignObject x="0" y="0" width="200" height="200">
<div style="width: 200px; height: 200px; background: red; will-change: transform; mask: url('#aMask');"></div>
<div style="width: 200px; height: 200px; background: green; will-change: transform; mask: url('#aMask');"></div>
</foreignObject>
</svg>
</body>

View file

@ -3,7 +3,8 @@ mozinfo==1.2.1 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226
mozlog==6.1
mozdebug==0.2
# Pillow 7 requires Python 3
pillow==6.2.2 # pyup: <7.0
pillow==6.2.2; python_version <= '2.7' # pyup: <7.0
pillow==8.0.1; python_version >= '3.0'
urllib3[secure]==1.25.10
requests==2.24.0
six==1.15.0

View file

@ -23,28 +23,14 @@ standardSetup(function() {
new CreateCredentialsTest("options.publicKey.extensions", "hi mom").runTest("Bad extensions: extensions is string", TypeError);
// phony extensions
// TODO: not sure if this should pass or fail
// should be clarified as part of https://github.com/w3c/webauthn/pull/765
var randomExtId = {};
randomExtId[createRandomString(64)] = dummyExtension;
new CreateCredentialsTest("options.publicKey.extensions", {foo: JSON.stringify(randomExtId)}).runTest("extensions is a nonsensical JSON string");
// Defined extensions.
// appid
new CreateCredentialsTest("options.publicKey.extensions", {appid: ""}).runTest("empty appid in create request", "NotSupportedError");
new CreateCredentialsTest("options.publicKey.extensions", {appid: null}).runTest("null appid in create request", "NotSupportedError");
new CreateCredentialsTest("options.publicKey.extensions", {appid: "anything"}).runTest("appid in create request", "NotSupportedError");
// TODO
// defined extensions:
// * txAuthSimple
// * txAuthGeneric
// * authnSel
// * exts
// * uvi
// * loc
// * uvm
});
/* JSHINT */

View file

@ -0,0 +1,78 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>navigator.credentials.create() largeBlob extension tests with no authenticator support</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src=helpers.js></script>
<body></body>
<script>
standardSetup(function() {
"use strict";
new CreateCredentialsTest("options.publicKey.extensions", {
largeBlob: {
write: new ArrayBuffer(),
},
}).runTest("navigator.credentials.create() with largeBlob.write set", "NotSupportedError");
new CreateCredentialsTest("options.publicKey.extensions", {
largeBlob: {
read: true,
},
}).runTest("navigator.credentials.create() with largeBlob.read set", "NotSupportedError");
promise_test(async t => {
const credential = await createCredential({
options: {
publicKey: {
authenticatorSelection: {
requireResidentKey: true,
},
extensions: {
largeBlob: {
support: "preferred",
},
},
},
},
});
assert_own_property(credential.getClientExtensionResults(), "largeBlob");
assert_false(credential.getClientExtensionResults().largeBlob.supported);
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.create() with largeBlob.support set to preferred and not supported by authenticator");
promise_test(async t => {
const credential = await createCredential({
options: {
publicKey: {
authenticatorSelection: {
requireResidentKey: true,
},
extensions: {
largeBlob: {},
},
},
},
});
assert_own_property(credential.getClientExtensionResults(), "largeBlob");
assert_false(credential.getClientExtensionResults().largeBlob.supported);
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.create() with largeBlob.support not set and not supported by authenticator");
new CreateCredentialsTest("options.publicKey.extensions", {
largeBlob: {
support: "required"
},
}).runTest("navigator.credentials.create() with largeBlob.support set to required and not supported by authenticator", "NotAllowedError");
}, {
protocol: "ctap2",
hasResidentKey: true,
hasUserVerification: true,
isUserVerified: true,
});
</script>

View file

@ -0,0 +1,82 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>navigator.credentials.create() largeBlob extension tests with authenticator support</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src=helpers.js></script>
<body></body>
<script>
standardSetup(function() {
"use strict";
promise_test(async t => {
const credential = await createCredential({
options: {
publicKey: {
authenticatorSelection: {
requireResidentKey: true,
},
extensions: {
largeBlob: {
support: "preferred",
},
},
},
},
});
assert_own_property(credential.getClientExtensionResults(), "largeBlob");
assert_true(credential.getClientExtensionResults().largeBlob.supported);
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.create() with largeBlob.support set to preferred and supported by authenticator");
promise_test(async t => {
const credential = await createCredential({
options: {
publicKey: {
authenticatorSelection: {
requireResidentKey: true,
},
extensions: {
largeBlob: {},
},
},
},
});
assert_own_property(credential.getClientExtensionResults(), "largeBlob");
assert_true(credential.getClientExtensionResults().largeBlob.supported);
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.create() with largeBlob.support not set and supported by authenticator");
promise_test(async t => {
const credential = await createCredential({
options: {
publicKey: {
authenticatorSelection: {
requireResidentKey: true,
},
extensions: {
largeBlob: {
support: "required"
},
},
},
},
});
assert_own_property(credential.getClientExtensionResults(), "largeBlob");
assert_true(credential.getClientExtensionResults().largeBlob.supported);
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.create() with largeBlob.support set to required and supported by authenticator");
}, {
protocol: "ctap2",
hasResidentKey: true,
hasUserVerification: true,
isUserVerified: true,
extensions: ["largeBlob"],
});
</script>

View file

@ -0,0 +1,91 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>navigator.credentials.get() largeBlob extension tests with no authenticator support</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src=helpers.js></script>
<body></body>
<script>
standardSetup(async function() {
"use strict";
const credential = createCredential();
promise_test(async t => {
return promise_rejects_dom(t, "NotSupportedError",
navigator.credentials.get({publicKey: {
challenge: new Uint8Array(),
allowCredentials: [{
id: (await credential).rawId,
type: "public-key",
}],
extensions: {
largeBlob: {
support: "preferred",
},
},
}}));
}, "navigator.credentials.get() with largeBlob.support set");
promise_test(async t => {
return promise_rejects_dom(t, "NotSupportedError",
navigator.credentials.get({publicKey: {
challenge: new Uint8Array(),
allowCredentials: [{
id: (await credential).rawId,
type: "public-key",
}],
extensions: {
largeBlob: {
read: true,
write: new ArrayBuffer(),
},
},
}}));
}, "navigator.credentials.get() with largeBlob.read and largeBlob.write set");
promise_test(async t => {
const assertion = await navigator.credentials.get({publicKey: {
challenge: new Uint8Array(),
allowCredentials: [{
id: (await credential).rawId,
type: "public-key",
}],
extensions: {
largeBlob: {
read: true,
},
},
}});
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "supported");
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.get() with largeBlob.read set without authenticator support");
promise_test(async t => {
const assertion = await navigator.credentials.get({publicKey: {
challenge: new Uint8Array(),
allowCredentials: [{
id: (await credential).rawId,
type: "public-key",
}],
extensions: {
largeBlob: {
write: new TextEncoder().encode("Don't call me Shirley"),
},
},
}});
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "supported");
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "blob");
assert_false(assertion.getClientExtensionResults().largeBlob.written);
}, "navigator.credentials.get() with largeBlob.write set without authenticator support");
}, {
protocol: "ctap2",
hasResidentKey: true,
hasUserVerification: true,
isUserVerified: true,
});
</script>

View file

@ -0,0 +1,90 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>navigator.credentials.get() largeBlob extension tests with authenticator support</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src=helpers.js></script>
<body></body>
<script>
standardSetup(async function(authenticator) {
"use strict";
const credential = createCredential({
options: {
publicKey: {
authenticatorSelection: {
requireResidentKey: true,
},
extensions: {
largeBlob: {
support: "required",
},
},
},
},
});
promise_test(async t => {
const assertion = await navigator.credentials.get({publicKey: {
challenge: new Uint8Array(),
allowCredentials: [{
id: (await credential).rawId,
type: "public-key",
}],
extensions: {
largeBlob: {
read: true,
},
},
}});
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "supported");
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.get() with largeBlob.read set with no blob on authenticator");
promise_test(async t => {
const blob = new TextEncoder().encode("According to all known laws of aviation, "
+ "there is no way a bee should be able to fly");
let assertion = await navigator.credentials.get({publicKey: {
challenge: new Uint8Array(),
allowCredentials: [{
id: (await credential).rawId,
type: "public-key",
}],
extensions: {
largeBlob: {
write: blob,
},
},
}});
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "blob");
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "supported");
assert_true(assertion.getClientExtensionResults().largeBlob.written);
assertion = await navigator.credentials.get({publicKey: {
challenge: new Uint8Array(),
allowCredentials: [{
id: (await credential).rawId,
type: "public-key",
}],
extensions: {
largeBlob: {
read: true,
},
},
}});
assert_array_equals(new Uint8Array(assertion.getClientExtensionResults().largeBlob.blob), blob);
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "supported");
assert_not_own_property(assertion.getClientExtensionResults().largeBlob, "written");
}, "navigator.credentials.get() read and write blob");
}, {
protocol: "ctap2",
hasResidentKey: true,
hasUserVerification: true,
extensions: ["largeBlob"],
isUserVerified: true,
});
</script>

View file

@ -69,7 +69,7 @@ function createCredential(opts) {
createArgs.options.publicKey.user.id = new Uint8Array(16);
// change the defaults with any options that were passed in
extendObject (createArgs, opts);
extendObject(createArgs, opts);
// create the credential, return the Promise
return navigator.credentials.create(createArgs.options);
@ -344,7 +344,8 @@ function cloneObject(o) {
function extendObject(dst, src) {
Object.keys(src).forEach(function(key) {
if (isSimpleObject(src[key])) {
extendObject (dst[key], src[key]);
dst[key] ||= {};
extendObject(dst[key], src[key]);
} else {
dst[key] = src[key];
}

View file

@ -99,10 +99,7 @@ promise_test(async t => {
});
},
error(e) {
t.step(() => {
// TODO(sandersd): Change to 'throw e' once e is defined.
throw "decode error";
});
t.step(() => { throw e; });
}
});

View file

@ -162,56 +162,6 @@ promise_test(async t => {
return ontrackPromise;
}, 'RTCRtpReceiver.createEncodedStream() throws if not requested in PC configuration');
promise_test(async t => {
const caller = new RTCPeerConnection({encodedInsertableStreams:true});
t.add_cleanup(() => caller.close());
const callee = new RTCPeerConnection();
t.add_cleanup(() => callee.close());
const stream = await navigator.mediaDevices.getUserMedia({audio:true});
const track = stream.getTracks()[0];
t.add_cleanup(() => track.stop());
const sender = caller.addTrack(track)
const senderStreams = sender.createEncodedStreams();
const senderWorker = new Worker('RTCPeerConnection-sender-worker-single-frame.js')
senderWorker.postMessage(
{readableStream: senderStreams.readable},
[senderStreams.readable]);
let expectedFrameData = null;
let verifiedFrameData = false;
let numVerifiedFrames = 0;
const onmessagePromise = new Promise(resolve => {
senderWorker.onmessage = t.step_func(message => {
if (!(message.data instanceof RTCEncodedAudioFrame)) {
// This is the first message sent from the Worker to the test.
// It contains an object (not an RTCEncodedAudioFrame) with the same
// fields as the RTCEncodedAudioFrame to be sent in follow-up messages.
// These serve as expected values to validate that the
// RTCEncodedAudioFrame is sent correctly back to the test in the next
// message.
expectedFrameData = message.data;
} else {
// This is the frame sent by the Worker after reading it from the
// readable stream. The Worker sends it twice after sending the
// verification message.
assert_equals(message.data.type, expectedFrameData.type);
assert_equals(message.data.timestamp, expectedFrameData.timestamp);
assert_true(areArrayBuffersEqual(message.data.data, expectedFrameData.data));
if (++numVerifiedFrames == 2)
resolve();
}
});
});
exchangeIceCandidates(caller, callee);
await exchangeOfferAnswer(caller, callee);
return onmessagePromise;
}, 'RTCRtpSender readable stream transferred to a Worker and the Worker sends an RTCEncodedAudioFrame back');
promise_test(async t => {
const caller = new RTCPeerConnection({encodedInsertableStreams:true});
t.add_cleanup(() => caller.close());

View file

@ -9,6 +9,57 @@
</head>
<body>
<script>
promise_test(async t => {
const caller = new RTCPeerConnection({encodedInsertableStreams:true});
t.add_cleanup(() => caller.close());
const callee = new RTCPeerConnection();
t.add_cleanup(() => callee.close());
const stream = await navigator.mediaDevices.getUserMedia({audio:true});
const track = stream.getTracks()[0];
t.add_cleanup(() => track.stop());
const sender = caller.addTrack(track)
const senderStreams = sender.createEncodedStreams();
const senderWorker = new Worker('RTCPeerConnection-sender-worker-single-frame.js')
t.add_cleanup(() => senderWorker.terminate());
senderWorker.postMessage(
{readableStream: senderStreams.readable},
[senderStreams.readable]);
let expectedFrameData = null;
let verifiedFrameData = false;
let numVerifiedFrames = 0;
const onmessagePromise = new Promise(resolve => {
senderWorker.onmessage = t.step_func(message => {
if (!(message.data instanceof RTCEncodedAudioFrame)) {
// This is the first message sent from the Worker to the test.
// It contains an object (not an RTCEncodedAudioFrame) with the same
// fields as the RTCEncodedAudioFrame to be sent in follow-up messages.
// These serve as expected values to validate that the
// RTCEncodedAudioFrame is sent correctly back to the test in the next
// message.
expectedFrameData = message.data;
} else {
// This is the frame sent by the Worker after reading it from the
// readable stream. The Worker sends it twice after sending the
// verification message.
assert_equals(message.data.type, expectedFrameData.type);
assert_equals(message.data.timestamp, expectedFrameData.timestamp);
assert_true(areArrayBuffersEqual(message.data.data, expectedFrameData.data));
if (++numVerifiedFrames == 2)
resolve();
}
});
});
exchangeIceCandidates(caller, callee);
await exchangeOfferAnswer(caller, callee);
return onmessagePromise;
}, 'RTCRtpSender readable stream transferred to a Worker and the Worker sends an RTCEncodedAudioFrame back');
promise_test(async t => {
const caller = new RTCPeerConnection({encodedInsertableStreams:true});
t.add_cleanup(() => caller.close());
@ -23,6 +74,7 @@ promise_test(async t => {
const senderStreams = videoSender.createEncodedStreams();
const senderWorker = new Worker('RTCPeerConnection-sender-worker-single-frame.js')
t.add_cleanup(() => senderWorker.terminate());
senderWorker.postMessage(
{readableStream: senderStreams.readable},
[senderStreams.readable]);