Skip to content

Commit 75c5df6

Browse files
committed
Bug 1979187 [wpt PR 53964] - [MediaStream] Support new EchoCancellationModes in track capabilities, a=testonly
Automatic update from web-platform-tests [MediaStream] Support new EchoCancellationModes in track capabilities Bug: 428856440 Change-Id: I4a67a857d1426da1e6a44d72c4d4ad0d72327072 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6779826 Reviewed-by: Olga Sharonova <olkachromium.org> Commit-Queue: Guido Urdaneta <guidouchromium.org> Cr-Commit-Position: refs/heads/main{#1492188} -- wpt-commits: 039221d69c1670c19d0c199f0c1bb6d06ad39ffe wpt-pr: 53964 UltraBlame original commit: 20512ba03609ad0927b5ae6c1b47726083d20adc
1 parent 9f0a43f commit 75c5df6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

testing/web-platform/tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
const audioProperties = [
1111
{name: "sampleRate", type: "number"},
1212
{name: "sampleSize", type: "number"},
13-
{name: "echoCancellation", type: "boolean"},
13+
{name: "echoCancellation", type: "boolean or string", validValues: [true, false, "all", "remote-only"]},
1414
{name: "autoGainControl", type: "boolean"},
1515
{name: "noiseSuppression", type: "boolean"},
1616
{name: "voiceIsolation", type: "boolean"},
@@ -62,6 +62,13 @@
6262
});
6363
}
6464

65+
function verifyBooleanOrStringCapability(capability, validMembers) {
66+
capability.forEach(c => {
67+
assert_true(typeof c == "boolean" || typeof c == "string");
68+
assert_in_array(c, validMembers);
69+
});
70+
}
71+
6572
function testCapabilities(capabilities, property, testNamePrefix) {
6673
let testName = testNamePrefix + " " + property.name;
6774
test(() => {
@@ -82,6 +89,12 @@
8289
}, testName);
8390
}
8491

92+
if (property.type == "boolean or string") {
93+
test(() => {
94+
verifyBooleanOrStringCapability(capability, property.validValues);
95+
}, testName);
96+
}
97+
8598
if (property.type == "number") {
8699
test(() => {
87100
verifyNumberCapability(capability);

0 commit comments

Comments
 (0)