Update web-platform-tests to revision 831dc2b6e566cccef87afb93dac79301acefe51c

This commit is contained in:
WPT Sync Bot 2020-11-22 08:18:56 +00:00
parent 30ac2e79a5
commit 28b10bb8c9
74 changed files with 341 additions and 356 deletions

View file

@ -1,8 +0,0 @@
[url-charset.window.html]
expected: TIMEOUT
[Blob charset should override any auto-detected charset.]
expected: TIMEOUT
[Blob charset should override <meta charset>.]
expected: TIMEOUT

View file

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

View file

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

View file

@ -5,6 +5,9 @@
[[data-expected-height\] 7] [[data-expected-height\] 7]
expected: FAIL expected: FAIL
[[data-expected-height\] 4] [[data-expected-height\] 1]
expected: FAIL
[[data-expected-height\] 2]
expected: FAIL expected: FAIL

View file

@ -2,6 +2,3 @@
[Hit test intersecting scaled box] [Hit test intersecting scaled box]
expected: FAIL expected: FAIL
[Hit test within unscaled box]
expected: FAIL

View file

@ -0,0 +1,2 @@
[no-transition-from-ua-to-blocking-stylesheet.html]
expected: FAIL

View file

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

View file

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

View file

@ -0,0 +1,2 @@
[matchMedia-display-none-iframe.html]
expected: ERROR

View file

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

View file

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

View file

@ -0,0 +1,4 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

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

View file

@ -1,4 +1,4 @@
[traverse_the_history_3.html] [traverse_the_history_4.html]
[Multiple history traversals, last would be aborted] [Multiple history traversals, last would be aborted]
expected: FAIL 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,17 +1,16 @@
[supported-elements.html] [supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus] [Contenteditable element should support autofocus]
expected: FAIL expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped] [Host element with delegatesFocus including no focusable descendants should be skipped]
expected: NOTRUN expected: FAIL
[Element with tabindex should support autofocus] [Element with tabindex should support autofocus]
expected: FAIL expected: FAIL
[Area element should support autofocus] [Area element should support autofocus]
expected: NOTRUN expected: FAIL
[Host element with delegatesFocus should support autofocus] [Host element with delegatesFocus should support autofocus]
expected: TIMEOUT expected: FAIL

View file

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

View file

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

View file

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

View file

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

View file

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

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

@ -0,0 +1,4 @@
[activation-behavior.window.html]
[<a> that is not connected should be followed]
expected: FAIL

View file

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

View file

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

View file

@ -305,3 +305,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.1257213237009784e-37\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] [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.1257213237009784e-37\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 expected: FAIL
[X SNR (-288.33873065926707 dB) is not greater than or equal to 65.737. Got -288.33873065926707.]
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\]\t3.8782949092491264e+16\t9.3139332532882690e-1\t3.8782949092491264e+16\t4.1639711213089280e+16\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.8782949092491264e+16 at index of 28696.\n\tMax RelError of 4.1639711213089280e+16 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

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

View file

@ -1,4 +1,5 @@
[003.html] [003.html]
expected: ERROR
[shared] [shared]
expected: FAIL expected: FAIL

View file

@ -1,8 +0,0 @@
[url-charset.window.html]
expected: TIMEOUT
[Blob charset should override any auto-detected charset.]
expected: TIMEOUT
[Blob charset should override <meta charset>.]
expected: TIMEOUT

View file

@ -174433,7 +174433,7 @@
] ]
], ],
"abspos-004.html": [ "abspos-004.html": [
"b7685f1db3836e6785aad5a70dbcff217655ac48", "c16c8c78b02038b3db85f1535c72e8d799ca559a",
[ [
null, null,
[ [
@ -174575,6 +174575,19 @@
{} {}
] ]
], ],
"abspos-015.html": [
"efd9759a862c631cef8846ba8eb12b8f37376083",
[
null,
[
[
"/css/reference/ref-filled-green-100px-square.xht",
"=="
]
],
{}
]
],
"auto-margins-001.html": [ "auto-margins-001.html": [
"9e89ab6ca7f5220ea030aa537bcb3b64f156043d", "9e89ab6ca7f5220ea030aa537bcb3b64f156043d",
[ [
@ -241657,7 +241670,7 @@
] ]
], ],
"forced-colors-mode-18.html": [ "forced-colors-mode-18.html": [
"435b9e4326f9a012e3f9a0eacc4cb9761477f3f3", "6b415f765873e1201d65d54e455e946d9e0acd98",
[ [
null, null,
[ [
@ -336839,7 +336852,7 @@
[] []
], ],
"forced-colors-mode-18-ref.html": [ "forced-colors-mode-18-ref.html": [
"a1701e3fdac842ea26c8f291b23f1febdb305d11", "dd069c1874d9af71b44720785968105631546358",
[] []
], ],
"forced-colors-mode-19-ref.html": [ "forced-colors-mode-19-ref.html": [
@ -352154,7 +352167,7 @@
}, },
"utils": { "utils": {
"peerconnection.js": [ "peerconnection.js": [
"817095e981f7724ba4d8a9f1cec26d2b4b7e3b4d", "1b9670d34631dced4e03e334292aed00786237fb",
[] []
], ],
"sources.js": [ "sources.js": [
@ -454286,13 +454299,6 @@
{} {}
] ]
], ],
"forced-colors-mode-04.html": [
"42b4efdba71bd959b5db159c1c448a27231b977e",
[
null,
{}
]
],
"forced-colors-mode-09.html": [ "forced-colors-mode-09.html": [
"16ca8a46104d06153b3e9bbd920d3187b0a7fa00", "16ca8a46104d06153b3e9bbd920d3187b0a7fa00",
[ [
@ -454335,22 +454341,15 @@
{} {}
] ]
], ],
"forced-colors-mode-32.html": [
"bd3595bf3bf33d5c65210c2f155a2431ef976e44",
[
null,
{}
]
],
"forced-colors-mode-40.html": [ "forced-colors-mode-40.html": [
"71ac4c9ea820c5853ed762fcd8000ffa1a86f36a", "07316bda24610f87d0735a4835f865d176396d0d",
[ [
null, null,
{} {}
] ]
], ],
"forced-colors-mode-41.html": [ "forced-colors-mode-41.html": [
"64bc6cc8cd59b7f98509ac1e5f54b9cf26046e82", "ddb747d08186ede841356867657d8e3941b008a8",
[ [
null, null,
{} {}
@ -499198,13 +499197,6 @@
{} {}
] ]
], ],
"MediaRecorder-no-sink.https.html": [
"7f5ff934fad7ccb47b742bd4cb8546e3a745b483",
[
null,
{}
]
],
"MediaRecorder-pause-resume.html": [ "MediaRecorder-pause-resume.html": [
"39f98cc85a17d14c65b274f3925497b8c85d92cc", "39f98cc85a17d14c65b274f3925497b8c85d92cc",
[ [
@ -499212,8 +499204,17 @@
{} {}
] ]
], ],
"MediaRecorder-peerconnection-no-sink.https.html": [
"3d96df5e4f05f1ed5b85f2f8b945d70f22725f3a",
[
null,
{
"timeout": "long"
}
]
],
"MediaRecorder-peerconnection.https.html": [ "MediaRecorder-peerconnection.https.html": [
"88e9da78a7a55af1e99a2a483e962ac19fe0ff76", "b47fbe2debaf5a93ec803aaff9e8ddcb801f6987",
[ [
null, null,
{ {
@ -499248,7 +499249,7 @@
], ],
"passthrough": { "passthrough": {
"MediaRecorder-passthrough.https.html": [ "MediaRecorder-passthrough.https.html": [
"655b7a1192378d8ee7766c801c1818c3f9d595a9", "b75797583949514f4b5eb9ffed2d362ed0406b49",
[ [
null, null,
{} {}

View file

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

View file

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

View file

@ -8,6 +8,9 @@
[[data-expected-height\] 3] [[data-expected-height\] 3]
expected: FAIL expected: FAIL
[[data-expected-height\] 4] [[data-expected-height\] 1]
expected: FAIL
[[data-expected-height\] 2]
expected: FAIL expected: FAIL

View file

@ -2,6 +2,3 @@
[Hit test intersecting scaled box] [Hit test intersecting scaled box]
expected: FAIL expected: FAIL
[Hit test within unscaled box]
expected: FAIL

View file

@ -0,0 +1,2 @@
[no-transition-from-ua-to-blocking-stylesheet.html]
expected: FAIL

View file

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

View file

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

View file

@ -0,0 +1,2 @@
[matchMedia-display-none-iframe.html]
expected: ERROR

View file

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

View file

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

View file

@ -0,0 +1,4 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

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

View file

@ -0,0 +1,4 @@
[traverse_the_history_4.html]
[Multiple history traversals, last would be aborted]
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 @@
[supported-elements.html] [supported-elements.html]
expected: TIMEOUT
[Contenteditable element should support autofocus] [Contenteditable element should support autofocus]
expected: FAIL expected: FAIL
@ -7,11 +6,11 @@
expected: FAIL expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped] [Host element with delegatesFocus including no focusable descendants should be skipped]
expected: NOTRUN expected: FAIL
[Area element should support autofocus] [Area element should support autofocus]
expected: NOTRUN expected: FAIL
[Host element with delegatesFocus should support autofocus] [Host element with delegatesFocus should support autofocus]
expected: TIMEOUT expected: FAIL

View file

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

View file

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

View file

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

View file

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

View file

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

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

@ -0,0 +1,4 @@
[activation-behavior.window.html]
[<a> that is not connected should be followed]
expected: FAIL

View file

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

View file

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

View file

@ -533,3 +533,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.1257213237009784e-37\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] [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.1257213237009784e-37\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 expected: FAIL
[X SNR (-288.33873065926707 dB) is not greater than or equal to 65.737. Got -288.33873065926707.]
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\]\t3.8782949092491264e+16\t9.3139332532882690e-1\t3.8782949092491264e+16\t4.1639711213089280e+16\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.8782949092491264e+16 at index of 28696.\n\tMax RelError of 4.1639711213089280e+16 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

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

View file

@ -1,5 +1,6 @@
[003.html] [003.html]
type: testharness type: testharness
expected: ERROR
[shared] [shared]
expected: FAIL expected: FAIL

View file

@ -2,14 +2,14 @@
<title>CSS aspect-ratio: abspos div inline size</title> <title>CSS aspect-ratio: abspos div inline size</title>
<link rel="author" title="Google LLC" href="https://www.google.com/"> <link rel="author" title="Google LLC" href="https://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio"> <link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">
<link rel="help" href="https://drafts.csswg.org/css-position/#abspos-auto-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" /> <link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
<!-- It is not entirely clear if this is testing the right behavior. See:
https://github.com/w3c/csswg-drafts/issues/5151
-->
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width: 500px; height: 100px; position: relative;"> <div style="width: 300px; height: 50px; position: relative;">
<div style="background: green; aspect-ratio: 1/1; position: absolute; left: 0; top: 0; bottom: 0;"></div> <div style="background: green; aspect-ratio: 2/1; position: absolute; left: 0; top: 0; bottom: 0;"></div>
</div>
<div style="width: 100px; height: 300px; position: relative;">
<div style="background: green; aspect-ratio: 2/1; position: absolute; left: 0; right: 0; top: 0; writing-mode: vertical-lr;"></div>
</div> </div>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<title>CSS aspect-ratio: abspos div block size</title>
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<link rel="help" href="https://drafts.csswg.org/css-sizing-4/#aspect-ratio">
<link rel="help" href="https://drafts.csswg.org/css-position/#abspos-auto-size">
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht" />
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div style="width: 300px; height: 50px; position: relative;">
<div style="background: green; aspect-ratio: 2/1; position: absolute; left: 0; top: 0; bottom: 0; writing-mode: vertical-lr"></div>
</div>
<div style="width: 100px; height: 300px; position: relative;">
<div style="background: green; aspect-ratio: 2/1; position: absolute; left: 0; right: 0; top: 0;"></div>
</div>

View file

@ -1,24 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Forced colors mode - webkit-tap-highlight-color.</title>
<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
a {
-webkit-tap-highlight-color: rgb(0, 0, 255);
}
</style>
<body>
<p>
<a href="https://www.wikipedia.org" id="link">
This link color should be overridden when forced colors mode is enabled.
</a>
</p>
</body>
<script>
test(function(){
assert_equals(getComputedStyle(link).webkitTapHighlightColor, "rgba(0, 0, 0, 0.18)");
}, "Checks hyperlinks are overridden in forced colors mode.");
</script>

View file

@ -17,20 +17,12 @@
</text> </text>
<rect x="0" height="60" y="30" width="180" style="fill: red; stroke: blue;"/> <rect x="0" height="60" y="30" width="180" style="fill: red; stroke: blue;"/>
<foreignObject x="20" y="100" width="160" height="160"> <foreignObject x="20" y="100" width="160" height="160">
<div xmlns="http://www.w3.org/1999/xhtml" style="color: orange;"> <div xmlns="http://www.w3.org/1999/xhtml" style="color: CanvasText;">
This text should be orange in forced colors mode due to inheritance. This text should be CanvasText in forced colors mode.
</div> </div>
<svg height="20" width="20"> <svg height="20" width="20">
<rect x="0" height="20" y="0" width="20" style="fill: green; stroke: purple;"/> <rect x="0" height="20" y="0" width="20" style="fill: green; stroke: purple;"/>
</svg> </svg>
</foreignObject> </foreignObject>
</svg> </svg>
<svg height="600" width="600">
<foreignObject x="20" y="100" width="160" height="160" style="color: CanvasText;">
<div xmlns="http://www.w3.org/1999/xhtml">
This text should be CanvasText in forced colors mode.
</div>
</foreignObject>
</svg>
</body> </body>

View file

@ -15,19 +15,11 @@
<rect x="0" height="60" y="30" width="180" style="fill: red; stroke: blue;"/> <rect x="0" height="60" y="30" width="180" style="fill: red; stroke: blue;"/>
<foreignObject x="20" y="100" width="160" height="160" style="color: blue;"> <foreignObject x="20" y="100" width="160" height="160" style="color: blue;">
<div xmlns="http://www.w3.org/1999/xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">
This text should be orange in forced colors mode due to inheritance. This text should be CanvasText in forced colors mode.
</div> </div>
<svg height="20" width="20"> <svg height="20" width="20">
<rect x="0" height="20" y="0" width="20" style="fill: green; stroke: purple;"/> <rect x="0" height="20" y="0" width="20" style="fill: green; stroke: purple;"/>
</svg> </svg>
</foreignObject> </foreignObject>
</svg> </svg>
<svg height="600" width="600">
<foreignObject x="20" y="100" width="160" height="160" style="color: blue;">
<div xmlns="http://www.w3.org/1999/xhtml">
This text should be CanvasText in forced colors mode.
</div>
</foreignObject>
</svg>
</body> </body>

View file

@ -1,22 +0,0 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Forced colors mode - webkit-tap-highlight-color with sys color.</title>
<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
a {
-webkit-tap-highlight-color: GrayText;
}
</style>
<a href="https://www.wikipedia.org" id="link">
This link color should not be overridden when forced colors mode is enabled.
</a>
<a href="" id="ref" style="forced-color-adjust:none"></a>
<script>
var gray_text = getComputedStyle(ref).webkitTapHighlightColor;
test(function(){
assert_equals(getComputedStyle(link).webkitTapHighlightColor, gray_text);
}, "Checks hyperlinks are not overridden if a sys color is used.");
</script>

View file

@ -10,9 +10,14 @@
div { div {
background-color: green; background-color: green;
border-color: green; border-color: green;
color: green;
column-rule-color: green;
fill: green; fill: green;
outline-color: green; outline-color: green;
stroke: green; stroke: green;
text-decoration-color: green;
-webkit-tap-highlight-color: green;
-webkit-text-emphasis-color: green;
} }
</style> </style>
<div id="div"> <div id="div">
@ -26,9 +31,14 @@
"border-left-color", "border-left-color",
"border-right-color", "border-right-color",
"border-top-color", "border-top-color",
"color",
"column-rule-color",
"fill", "fill",
"outline-color", "outline-color",
"stroke" "stroke",
"text-decoration-color",
"-webkit-tap-highlight-color",
"-webkit-text-emphasis-color"
]; ];
for (let property of properties_to_test) { for (let property of properties_to_test) {
test(function() { test(function() {

View file

@ -12,6 +12,7 @@
div { div {
background-color: green; background-color: green;
border-color: green; border-color: green;
color: green;
outline-color: green; outline-color: green;
} }
</style> </style>
@ -24,6 +25,7 @@
"border-left-color", "border-left-color",
"border-right-color", "border-right-color",
"border-top-color", "border-top-color",
"color",
"outline-color" "outline-color"
]; ];
for (let property of properties_to_test) { for (let property of properties_to_test) {

View file

@ -1,42 +0,0 @@
<!doctype html>
<html>
<head>
<title>MediaRecorder peer connection</title>
<link rel="help"
href="https://w3c.github.io/mediacapture-record/MediaRecorder.html#dom-mediarecorder-mimeType">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="utils/peerconnection.js"></script>
</head>
<body>
<script>
[{name: "audio", kind: {audio: true, video: false}},
{name: "video", kind: {audio: false, video: true}},
{name: "audio/video", kind: {audio: true, video: true}}].forEach(args => {
promise_test(async t => {
const [localPc, remotePc, stream] = await startConnection(
t, args.kind.audio, args.kind.video);
const recorder = new MediaRecorder(stream);
// Set an arbitrary timeslice interval so the ondataavailable event
// handler gets invoked repeatedly. Without it, the test would
// deadlock as it's currently written.
recorder.start(100);
let combinedSize = 0;
const dataPromise = new Promise(r => recorder.ondataavailable = e => {
// Wait for an arbitrary amount of data to appear before we resolve.
combinedSize += e.data.size;
if (combinedSize > 4711) r();
});
await dataPromise;
recorder.stop();
}, "PeerConnection MediaRecorder records " + args.name +
" from PeerConnection without sinks");
});
</script>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!doctype html>
<html>
<meta name="timeout" content="long">
<head>
<title>MediaRecorder peer connection</title>
<link rel="help"
href="https://w3c.github.io/mediacapture-record/MediaRecorder.html#dom-mediarecorder-mimeType">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="utils/peerconnection.js"></script>
</head>
<body>
<script>
promise_setup(async () => {
const t = {add_cleanup: add_completion_callback};
const [, pc, stream] = await startConnection(t, true, true);
const [audio] = stream.getAudioTracks();
const [video] = stream.getVideoTracks();
for (const kinds of [{ audio }, { video }, { audio, video }]) {
const tag = `${JSON.stringify(kinds)}`;
const stream = new MediaStream([kinds.audio, kinds.video].filter(n => n));
promise_test(async t => {
const recorder = new MediaRecorder(stream);
recorder.start(200);
let combinedSize = 0;
// Wait for a small amount of data to appear. Kept small for mobile tests
while (combinedSize < 2000) {
const {data} = await new Promise(r => recorder.ondataavailable = r);
combinedSize += data.size;
}
recorder.stop();
}, `MediaRecorder records from PeerConnection without sinks, ${tag}`);
}
});
</script>
</body>
</html>

View file

@ -15,57 +15,67 @@
<video id="remote" autoplay width="240" /> <video id="remote" autoplay width="240" />
<script> <script>
[{ name: "video", kind: { video: true, audio: false }, mimeType: "" }, promise_setup(async () => {
{ name: "audio", kind: { video: false, audio: true }, mimeType: "" }, const t = {add_cleanup: add_completion_callback};
{ name: "audio/video", kind: { video: true, audio: true }, mimeType: "" }, const [, pc, stream] = await startConnection(t, true, true);
{ name: "audio", kind: { video: false, audio: true }, mimeType: "video/webm;codecs=vp8" }, const [audio] = stream.getAudioTracks();
{ name: "video", kind: { video: true, audio: false }, mimeType: "video/webm;codecs=vp8" }, const [video] = stream.getVideoTracks();
{ name: "audio/video", kind: { video: true, audio: true }, mimeType: "video/webm;codecs=vp8" },
{ name: "audio", kind: { video: false, audio: true }, mimeType: "video/webm;codecs=vp9" }, // Needed for the tests to get exercised in Chrome (bug)
{ name: "video", kind: { video: true, audio: false }, mimeType: "video/webm;codecs=vp9" }, document.getElementById('remote').srcObject = stream;
{ name: "audio/video", kind: { video: true, audio: true }, mimeType: "video/webm;codecs=vp9" }]
.forEach(args => { for (const {kinds, mimeType} of [
const formatString = JSON.stringify(args.kind) + { kinds: { video }, mimeType: "" },
" with format " + (args.mimeType ? args.mimeType : "[passthrough]") + "."; { kinds: { audio }, mimeType: "" },
promise_test(async t => { { kinds: { video, audio }, mimeType: "" },
const [localPc, remotePc, stream] = await startConnection( { kinds: { audio }, mimeType: "audio/webm;codecs=opus" },
t, args.kind.audio, args.kind.video); { kinds: { video }, mimeType: "video/webm;codecs=vp8" },
const recorder = new MediaRecorder(stream, { mimeType: args.mimeType }); { kinds: { video, audio }, mimeType: "video/webm;codecs=vp8,opus" },
let combinedSize = 0; { kinds: { video }, mimeType: "video/webm;codecs=vp9" },
const dataPromise = new Promise(r => { { kinds: { video, audio }, mimeType: "video/webm;codecs=vp9,opus" }
recorder.onstart = () => { ]) {
recorder.ondataavailable = e => { const tag = `${JSON.stringify(kinds)} mimeType "${mimeType}"`;
// Wait for an arbitrary amount of data to appear before we resolve. const stream = new MediaStream([kinds.audio, kinds.video].filter(n => n));
combinedSize += e.data.size;
if (combinedSize > 4711) r(); // Spec doesn't mandate codecs, so if not supported, test failure instead.
} if (mimeType && !MediaRecorder.isTypeSupported(mimeType)) {
} promise_test(async t => {
}); assert_throws_dom('NotSupportedError',
recorder.start(100); () => new MediaRecorder(stream, { mimeType }));
await dataPromise; }, `MediaRecorder constructor throws on no support, ${tag}`);
recorder.stop(); continue;
}, "PeerConnection MediaRecorder receives data after onstart, " + }
formatString);
promise_test(async t => { promise_test(async t => {
const [localPc, remotePc, stream] = await startConnection( const recorder = new MediaRecorder(stream, { mimeType });
t, args.kind.audio, args.kind.video); recorder.start(200);
const recorder = new MediaRecorder(stream, { mimeType: args.mimeType }); await new Promise(r => recorder.onstart = r);
const stopPromise = new Promise(r => recorder.onstop = r); let combinedSize = 0;
const dataPromise = new Promise(r => recorder.ondataavailable = r); // Wait for a small amount of data to appear. Kept small for mobile tests
while (combinedSize < 2000) {
const {data} = await new Promise(r => recorder.ondataavailable = r);
combinedSize += data.size;
}
recorder.stop();
}, `PeerConnection MediaRecorder receives data after onstart, ${tag}`);
promise_test(async t => {
const clone = stream.clone();
const recorder = new MediaRecorder(clone, { mimeType });
recorder.start(); recorder.start();
await waitForReceivedFrames( await new Promise(r => recorder.onstart = r);
t, remotePc, args.kind.audio, args.kind.video, 10); await waitForReceivedFramesOrPackets(t, pc, kinds.audio, kinds.video, 10);
for (transceiver of remotePc.getTransceivers()) for (const track of clone.getTracks()) {
transceiver.receiver.track.stop(); track.stop();
// As the tracks ended, we'd like to see data from the recorder. }
// For details: // As the tracks ended, expect data from the recorder.
// https://www.w3.org/TR/mediastream-recording/#mediarecorder-methods. await Promise.all([
await dataPromise; new Promise(r => recorder.onstop = r),
await stopPromise; new Promise(r => recorder.ondataavailable = r)
}, "PeerConnection MediaRecorder gets ondata on stopping recorded " + ]);
"tracks " + formatString); }, `PeerConnection MediaRecorder gets ondata on stopping tracks, ${tag}`);
}); }
});
</script> </script>
</body> </body>

View file

@ -22,6 +22,10 @@
promise_test(async t => { promise_test(async t => {
const [localPc, remotePc, stream] = await startConnection( const [localPc, remotePc, stream] = await startConnection(
t, args.audio, /*video=*/true, args.codecPreference); t, args.audio, /*video=*/true, args.codecPreference);
// Needed for the tests to get exercised in Chrome (bug)
document.getElementById('remote').srcObject = stream;
const recorder = new MediaRecorder(stream); // Passthrough. const recorder = new MediaRecorder(stream); // Passthrough.
const onstartPromise = new Promise(resolve => { const onstartPromise = new Promise(resolve => {
recorder.onstart = t.step_func(() => { recorder.onstart = t.step_func(() => {
@ -42,16 +46,22 @@
promise_test(async t => { promise_test(async t => {
const [localPc, remotePc, stream, transceivers] = await startConnection( const [localPc, remotePc, stream, transceivers] = await startConnection(
t, /*audio=*/false, /*video=*/true, /*videoCodecPreference=*/"VP8"); t, /*audio=*/false, /*video=*/true, /*videoCodecPreference=*/"VP8");
// Needed for the tests to get exercised in Chrome (bug)
document.getElementById('remote').srcObject = stream;
const recorder = new MediaRecorder(stream); // Possibly passthrough. const recorder = new MediaRecorder(stream); // Possibly passthrough.
recorder.start(); recorder.start();
await waitForReceivedFrames(t, remotePc, false, true, 10); await waitForReceivedFramesOrPackets(t, remotePc, false, true, 10);
// Switch codec to VP9; we expect onerror to not be invoked. // Switch codec to VP9; we expect onerror to not be invoked.
recorder.onerror = t.step_func(() => assert_unreached( recorder.onerror = t.step_func(() => assert_unreached(
"MediaRecorder should be prepared to handle codec switches")); "MediaRecorder should be prepared to handle codec switches"));
setTransceiverCodecPreference(transceivers.video, "VP9"); setTransceiverCodecPreference(transceivers.video, "VP9");
exchangeOfferAnswer(localPc, remotePc); await Promise.all([
await waitForReceivedCodec(t, remotePc, "VP9"); exchangeOfferAnswer(localPc, remotePc),
waitForReceivedCodec(t, remotePc, "VP9")
]);
}, "PeerConnection passthrough MediaRecorder should be prepared to handle " + }, "PeerConnection passthrough MediaRecorder should be prepared to handle " +
"the codec switching from VP8 to VP9"); "the codec switching from VP8 to VP9");

View file

@ -26,7 +26,7 @@ async function exchangeOfferAnswer(pc1, pc2) {
* @param {string} codecPreference The codec preference. * @param {string} codecPreference The codec preference.
*/ */
function setTransceiverCodecPreference(transceiver, codecPreference) { function setTransceiverCodecPreference(transceiver, codecPreference) {
for (let codec of RTCRtpSender.getCapabilities('video').codecs) { for (const codec of RTCRtpSender.getCapabilities('video').codecs) {
if (codec.mimeType.includes(codecPreference)) { if (codec.mimeType.includes(codecPreference)) {
transceiver.setCodecPreferences([codec]); transceiver.setCodecPreferences([codec]);
return; return;
@ -38,55 +38,37 @@ function setTransceiverCodecPreference(transceiver, codecPreference) {
* Starts a connection between two peer connections, using a audio and/or video * Starts a connection between two peer connections, using a audio and/or video
* stream. * stream.
* @param {*} t Test instance. * @param {*} t Test instance.
* @param {boolean} useAudio True if audio should be used. * @param {boolean} audio True if audio should be used.
* @param {boolean} useVideo True if video should be used. * @param {boolean} video True if video should be used.
* @param {string} [videoCodecPreference] String containing the codec preference. * @param {string} [videoCodecPreference] String containing the codec preference.
* @returns an array with the two connected peer connections, the remote stream, * @returns an array with the two connected peer connections, the remote stream,
* and the list of transceivers. * and an object containing transceivers by kind.
*/ */
async function startConnection(t, useAudio, useVideo, videoCodecPreference) { async function startConnection(t, audio, video, videoCodecPreference) {
const stream = await navigator.mediaDevices.getUserMedia({ const stream = await navigator.mediaDevices.getUserMedia({audio, video});
audio: useAudio, video: useVideo
});
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
const pc1 = new RTCPeerConnection(); const pc1 = new RTCPeerConnection();
t.add_cleanup(() => pc1.close()); t.add_cleanup(() => pc1.close());
const pc2 = new RTCPeerConnection(); const pc2 = new RTCPeerConnection();
t.add_cleanup(() => pc2.close()); t.add_cleanup(() => pc2.close());
let transceivers = {}; const transceivers = {};
stream.getTracks().forEach(track => { for (const track of stream.getTracks()) {
const transceiver = pc1.addTransceiver(track); const transceiver = pc1.addTransceiver(track, {streams: [stream]});
transceivers[track.kind] = transceiver; transceivers[track.kind] = transceiver;
if (videoCodecPreference && track.kind == 'video') { if (videoCodecPreference && track.kind == 'video') {
setTransceiverCodecPreference(transceiver, videoCodecPreference); setTransceiverCodecPreference(transceiver, videoCodecPreference);
} }
}); }
function doExchange(localPc, remotePc) { for (const [local, remote] of [[pc1, pc2], [pc2, pc1]]) {
localPc.addEventListener('icecandidate', event => { local.addEventListener('icecandidate', ({candidate}) => {
const { candidate } = event; if (!candidate || remote.signalingState == 'closed') return;
if (candidate && remotePc.signalingState !== 'closed') { remote.addIceCandidate(candidate);
remotePc.addIceCandidate(candidate);
}
}); });
} }
doExchange(pc1, pc2); const haveTrackEvent = new Promise(r => pc2.ontrack = r);
doExchange(pc2, pc1); await exchangeOfferAnswer(pc1, pc2);
exchangeOfferAnswer(pc1, pc2); const {streams} = await haveTrackEvent;
const remoteStream = await new Promise(resolve => { return [pc1, pc2, streams[0], transceivers];
let tracks = [];
pc2.ontrack = e => {
tracks.push(e.track)
if (tracks.length < useAudio + useVideo) return;
const stream = new MediaStream(tracks);
// The srcObject sink is needed for the tests to get exercised in Chrome.
const remoteVideo = document.getElementById('remote');
if (remoteVideo) {
remoteVideo.srcObject = stream;
}
resolve(stream)
}
});
return [pc1, pc2, remoteStream, transceivers]
} }
/** /**
@ -99,17 +81,17 @@ async function startConnection(t, useAudio, useVideo, videoCodecPreference) {
* @param {int} numFramesOrPackets Number of frames (video) and packets (audio) * @param {int} numFramesOrPackets Number of frames (video) and packets (audio)
* to wait for. * to wait for.
*/ */
async function waitForReceivedFrames( async function waitForReceivedFramesOrPackets(
t, pc, lookForAudio, lookForVideo, numFramesOrPackets) { t, pc, lookForAudio, lookForVideo, numFramesOrPackets) {
let initialAudioPackets = 0; let initialAudioPackets = 0;
let initialVideoFrames = 0; let initialVideoFrames = 0;
while (lookForAudio || lookForVideo) { while (lookForAudio || lookForVideo) {
const report = await pc.getStats(); const report = await pc.getStats();
report.forEach(stats => { for (const stats of report.values()) {
if (stats.type && stats.type == 'inbound-rtp') { if (stats.type == 'inbound-rtp') {
if (lookForAudio && stats.kind == 'audio') { if (lookForAudio && stats.kind == 'audio') {
if (!initialAudioPackets) { if (!initialAudioPackets) {
initialAudioPackets = stats.packetsReceived initialAudioPackets = stats.packetsReceived;
} else if (stats.packetsReceived > initialAudioPackets + } else if (stats.packetsReceived > initialAudioPackets +
numFramesOrPackets) { numFramesOrPackets) {
lookForAudio = false; lookForAudio = false;
@ -124,8 +106,8 @@ async function waitForReceivedFrames(
} }
} }
} }
}); }
await new Promise(r => { t.step_timeout(r, 100); }); await new Promise(r => t.step_timeout(r, 100));
} }
} }
@ -140,17 +122,16 @@ async function waitForReceivedCodec(t, pc, codecToLookFor) {
let currentCodecId; let currentCodecId;
for (;;) { for (;;) {
const report = await pc.getStats(); const report = await pc.getStats();
report.forEach(stats => { for (const stats of report.values()) {
if (stats.id) { if (stats.type == 'inbound-rtp' && stats.kind == 'video') {
if (stats.type == 'inbound-rtp' && stats.kind == 'video') { if (stats.codecId) {
currentCodecId = stats.codecId; if (report.get(stats.codecId).mimeType.toLowerCase()
} else if (currentCodecId && stats.id == currentCodecId && .includes(codecToLookFor.toLowerCase())) {
stats.mimeType.toLowerCase().includes( return;
codecToLookFor.toLowerCase())) { }
return;
} }
} }
}); }
await new Promise(r => { t.step_timeout(r, 100); }); await new Promise(r => t.step_timeout(r, 100));
} }
} }