diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations index 6ad3552538499..41a50c5e37dd2 100644 --- a/LayoutTests/TestExpectations +++ b/LayoutTests/TestExpectations @@ -6460,6 +6460,9 @@ webkit.org/b/256976 [ Debug ] imported/w3c/web-platform-tests/html/browsers/brow # Test has been timing out since its import. imported/w3c/web-platform-tests/dom/events/scrolling/scrollend-event-handler-content-attributes.html [ Skip ] +# New faliure after re-importing mediacapture-streams. +webkit.org/b/274091 imported/w3c/web-platform-tests/mediacapture-streams/idlharness.https.window.html + # Recent WPT update webkit.org/b/255101 imported/w3c/web-platform-tests/css/css-backgrounds/background-attachment-fixed-inside-transform-1.html [ ImageOnlyFailure ] webkit.org/b/255101 imported/w3c/web-platform-tests/css/css-backgrounds/background-attachment-local-hidden.html [ ImageOnlyFailure ] diff --git a/LayoutTests/imported/w3c/resources/resource-files.json b/LayoutTests/imported/w3c/resources/resource-files.json index f9b37eef32595..ef7be17af3be5 100644 --- a/LayoutTests/imported/w3c/resources/resource-files.json +++ b/LayoutTests/imported/w3c/resources/resource-files.json @@ -7939,7 +7939,6 @@ "web-platform-tests/mathml/relations/text-and-math/use-typo-metrics-1-ref.html", "web-platform-tests/mathml/tools/operator-dictionary.xsl", "web-platform-tests/mediacapture-record/support/MediaRecorder-iframe.html", - "web-platform-tests/mediacapture-streams/crashtests/enumerateDevices-after-discard-1.https.html", "web-platform-tests/mediacapture-streams/iframe-enumerate-cleared.html", "web-platform-tests/mediacapture-streams/iframe-enumerate-nogum.html", "web-platform-tests/mediacapture-streams/iframe-enumerate.html", diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https-expected.txt new file mode 100644 index 0000000000000..ea32fe5b94db5 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https-expected.txt @@ -0,0 +1,9 @@ +When prompted, accept to give permission to use your audio, video devices. + +Description +This test checks that BrowserCaptureMediaStreamTrack cropping works as expected. + +Start test + +FAIL Tests that cropping MediaStreamTrack objects works as expected promise_test: Unhandled rejection with value: object "InvalidStateError: getDisplayMedia must be called from a user gesture handler." + diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https.html new file mode 100644 index 0000000000000..f84029433f696 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https.html @@ -0,0 +1,66 @@ + + + + + BrowserCaptureMediaStreamTrack cropTo() + + + + + + + +

+ When prompted, accept to give permission to use your audio, video devices. +

+

Description

+

+ This test checks that BrowserCaptureMediaStreamTrack cropping works as + expected. +

+ + +
+ + + + + + + + + + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https-expected.txt new file mode 100644 index 0000000000000..f4d4a25f108e5 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https-expected.txt @@ -0,0 +1,11 @@ +When prompted, accept to give permission to use your audio, video devices. + +Description +This test checks that restricting BrowserCaptureMediaStreamTrack works as expected. + + + +FAIL Tests that restricting MediaStreamTrack objects works as expected (StackingContext). promise_test: Unhandled rejection with value: object "InvalidStateError: getDisplayMedia must be called from a user gesture handler." +FAIL Tests that restricting MediaStreamTrack objects works as expected (OnlyOneBoxFragment). promise_test: Unhandled rejection with value: object "InvalidStateError: getDisplayMedia must be called from a user gesture handler." +FAIL Tests that restricting MediaStreamTrack objects works as expected (FlattenedIn3D). promise_test: Unhandled rejection with value: object "InvalidStateError: getDisplayMedia must be called from a user gesture handler." + diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https.html new file mode 100644 index 0000000000000..4b0da740bdf72 --- /dev/null +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https.html @@ -0,0 +1,245 @@ + + + + + BrowserCaptureMediaStreamTrack restrictTo() + + + + +

+ When prompted, accept to give permission to use your audio, video devices. +

+

Description

+

+ This test checks that restricting BrowserCaptureMediaStreamTrack works as + expected. +

+ + + + +
+
+
+ + + + + + + + + + + diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-non-applicable-constraint.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-non-applicable-constraint.https.html index 3e9481bfa445c..e9fd6665dcfac 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-non-applicable-constraint.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-non-applicable-constraint.https.html @@ -37,6 +37,7 @@ echoCancellation: {ideal: true}, autoGainControl: {ideal: true}, noiseSuppression: {ideal: true}, + voiceIsolation: {ideal: true}, latency: {min: 0}, channelCount: {min: 0} } @@ -48,6 +49,7 @@ echoCancellation: {exact: true}, autoGainControl: {exact: true}, noiseSuppression: {exact: true}, + voiceIsolation: {exact: true}, latency: {max: 0}, channelCount: {max: 0} } diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https-expected.txt index 31b7af8c9716b..915b8cc04c837 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https-expected.txt @@ -1,4 +1,4 @@ -PASS enumerateDevices returns expected mostly empty objects in case device-info permission is not granted -PASS enumerateDevices returns expected objects in case device-info permission is granted +PASS enumerateDevices exposes mostly empty objects ahead of successful getUserMedia call +PASS enumerateDevices exposes expected objects after successful getUserMedia call diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html index 2b5687f672b9f..6e6dbaf3bba4f 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices-returned-objects.https.html @@ -36,7 +36,8 @@ assert_equals(device1.deviceId, "", "deviceId is empty before capture"); assert_equals(device1.groupId, "", "groupId is empty before capture"); assert_equals(device1.label, "", "label is empty before capture"); - assert_in_array(device1.kind, ["audioinput", "audiooutput", "videoinput", "kind is set to a valid value before capture"]); + assert_in_array(device1.kind, ["audioinput", "audiooutput", "videoinput"], + "kind is set to a valid value before capture"); } } /* Additionally, at most one device of each kind @@ -52,8 +53,8 @@ }, testName); } -doTest(false, "enumerateDevices returns expected mostly empty objects in case device-info permission is not granted"); -doTest(true, "enumerateDevices returns expected objects in case device-info permission is granted"); +doTest(false, "enumerateDevices exposes mostly empty objects ahead of successful getUserMedia call"); +doTest(true, "enumerateDevices exposes expected objects after successful getUserMedia call"); diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https-expected.txt index cabb7aea14727..e621f9f8e4f0a 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https-expected.txt @@ -3,6 +3,7 @@ This test checks for the presence of the navigator.mediaDevices.enumerateDevices PASS mediaDevices.enumerateDevices() is present and working - before capture -PASS mediaDevices.enumerateDevices() is present and working - after capture +FAIL mediaDevices.enumerateDevices() is working - after video capture assert_equals: audio deviceId should be empty. expected 0 but got 40 +PASS mediaDevices.enumerateDevices() is working - after video then audio capture PASS InputDeviceInfo is supported diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html index 4971f4fc48280..88c07048a1b48 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html @@ -23,36 +23,85 @@

Description

promise_test(async () => { assert_not_equals(navigator.mediaDevices.enumerateDevices, undefined, "navigator.mediaDevices.enumerateDevices exists"); - const deviceList = await navigator.mediaDevices.enumerateDevices(); - for (const mediaInfo of deviceList) { - assert_not_equals(mediaInfo.kind, undefined, "mediaInfo's kind should exist."); - assert_equals(mediaInfo.deviceId, "", "mediaInfo's deviceId should exist and be empty if getUserMedia was never called successfully."); - assert_equals(mediaInfo.label, "", "mediaInfo's label should exist and be empty if getUserMedia was never called successfully."); - assert_equals(mediaInfo.groupId, "", "mediaInfo's groupId should exist and be empty if getUserMedia was never called successfully."); - assert_in_array(mediaInfo.kind, ["videoinput", "audioinput", "audiooutput"]); + const devices = await navigator.mediaDevices.enumerateDevices(); + for (const {kind, deviceId, label, groupId} of devices) { + assert_in_array(kind, ["videoinput", "audioinput", "audiooutput"]); + assert_equals(deviceId, "", "deviceId should be empty string if getUserMedia was never called successfully."); + assert_equals(label, "", "label should be empty string if getUserMedia was never called successfully."); + assert_equals(groupId, "", "groupId should be empty string if getUserMedia was never called successfully."); + } + assert_less_than_equal(devices.filter(({kind}) => kind == "audioinput").length, + 1, "there should be zero or one audio input device."); + assert_less_than_equal(devices.filter(({kind}) => kind == "videoinput").length, + 1, "there should be zero or one video input device."); + assert_equals(devices.filter(({kind}) => kind == "audiooutput").length, + 0, "there should be no audio output devices."); + assert_less_than_equal(devices.length, 2, + "there should be no more than two devices."); + if (devices.length > 1) { + assert_equals(devices[0].kind, "audioinput", "audioinput is first"); + assert_equals(devices[1].kind, "videoinput", "videoinput is second"); } - assert_less_than_equal(deviceList.filter((item) => { return item.kind == "audioinput"; }).length, 1, "there should be zero or one audio input device "); - assert_less_than_equal(deviceList.filter((item) => { return item.kind == "videoinput"; }).length, 1, "there should be zero or one video input device "); - }, "mediaDevices.enumerateDevices() is present and working - before capture"); -promise_test(async () => { - await setMediaPermission("granted", ["microphone"]); - await navigator.mediaDevices.getUserMedia({ audio : true }); - const deviceList = await navigator.mediaDevices.enumerateDevices(); - for (const mediaInfo of deviceList) { - assert_not_equals(mediaInfo.kind, undefined, "mediaInfo's kind should exist."); - assert_not_equals(mediaInfo.deviceId, "", "mediaInfo's deviceId should exist and not be empty."); - assert_in_array(mediaInfo.kind, ["videoinput", "audioinput", "audiooutput"]); +promise_test(async t => { + await setMediaPermission("granted"); + const stream = await navigator.mediaDevices.getUserMedia({ video: true }); + stream.getTracks()[0].stop(); + + const devices = await navigator.mediaDevices.enumerateDevices(); + const kinds = ["audioinput", "videoinput"]; + for (const {kind, deviceId} of devices) { + assert_in_array(kind, kinds, "camera doesn't expose audiooutput"); + assert_equals(typeof deviceId, "string", "deviceId is a string."); + switch (kind) { + case "videoinput": + assert_greater_than(deviceId.length, 0, "video deviceId should not be empty."); + break; + case "audioinput": + assert_equals(deviceId.length, 0, "audio deviceId should be empty."); + break; + } + } +}, "mediaDevices.enumerateDevices() is working - after video capture"); + +// This test is designed to come after its video counterpart directly above +promise_test(async t => { + const devices1 = await navigator.mediaDevices.enumerateDevices(); + const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); + stream.getTracks()[0].stop(); + const devices = await navigator.mediaDevices.enumerateDevices(); + assert_equals(devices.filter(({kind}) => kind == "videoinput").length, + devices1.filter(({kind}) => kind == "videoinput").length, + "same number of (previously exposed) videoinput devices"); + assert_greater_than_equal(devices.filter(d => d.kind == "audioinput").length, + devices1.filter(d => d.kind == "audioinput").length, + "same number or more audioinput devices"); + const order = ["audioinput", "videoinput", "audiooutput"]; + for (const {kind, deviceId} of devices) { + assert_in_array(kind, order, "expected kind"); + assert_equals(typeof deviceId, "string", "deviceId is a string."); + switch (kind) { + case "videoinput": + assert_greater_than(deviceId.length, 0, "video deviceId should not be empty."); + break; + case "audioinput": + assert_greater_than(deviceId.length, 0, "audio deviceId should not be empty."); + break; + } } -}, "mediaDevices.enumerateDevices() is present and working - after capture"); + const kinds = devices.map(({kind}) => kind); + const correct = [...kinds].sort((a, b) => order.indexOf(a) - order.indexOf(b)); + assert_equals(JSON.stringify(kinds), JSON.stringify(correct), "correct order"); +}, "mediaDevices.enumerateDevices() is working - after video then audio capture"); promise_test(async () => { - const deviceList = await navigator.mediaDevices.enumerateDevices(); - for (const mediaInfo of deviceList) { + const devices = await navigator.mediaDevices.enumerateDevices(); + for (const mediaInfo of devices) { if (mediaInfo.kind == "audioinput" || mediaInfo.kind == "videoinput") { + assert_true("InputDeviceInfo" in window, "InputDeviceInfo exists"); assert_true(mediaInfo instanceof InputDeviceInfo); - } else if ( mediaInfo.kind == "audiooutput" ) { + } else if (mediaInfo.kind == "audiooutput") { assert_true(mediaInfo instanceof MediaDeviceInfo); } else { assert_unreached("mediaInfo.kind should be one of 'audioinput', 'videoinput', or 'audiooutput'.") diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https-expected.txt index 814a919c2a6d6..6c596601c1812 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https-expected.txt @@ -14,6 +14,7 @@ PASS sampleSize is supported PASS echoCancellation is supported FAIL autoGainControl is supported assert_true: expected true got undefined FAIL noiseSuppression is supported assert_true: expected true got undefined +FAIL voiceIsolation is supported assert_true: expected true got undefined FAIL latency is supported assert_true: expected true got undefined FAIL channelCount is supported assert_true: expected true got undefined PASS deviceId is supported diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html index 453184a16919a..7d374b5336ea5 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getSupportedConstraints.https.html @@ -32,6 +32,7 @@

Description

"echoCancellation", "autoGainControl", "noiseSuppression", + "voiceIsolation", "latency", "channelCount", "deviceId", diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https-expected.txt index 7f40c57b19c85..899fdce19af67 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https-expected.txt @@ -3,8 +3,8 @@ This test checks for the presence of the navigator.mediaDevices.getUserMedia met PASS mediaDevices.getUserMedia() is present on navigator -FAIL groupId is correctly supported by getUserMedia() for video devices assert_equals: expected "groupId" but got "" -FAIL groupId is correctly supported by getUserMedia() for audio devices assert_equals: expected "groupId" but got "" +FAIL groupId is correctly supported by getUserMedia() for video devices assert_equals: expected (undefined) undefined but got (object) object "[object InputDeviceInfo]" +FAIL groupId is correctly supported by getUserMedia() for audio devices assert_equals: expected (undefined) undefined but got (object) object "[object InputDeviceInfo]" FAIL getUserMedia() supports setting none as resizeMode. assert_true: resizeMode should be supported expected true got undefined FAIL getUserMedia() supports setting crop-and-scale as resizeMode. assert_true: resizeMode should be supported expected true got undefined FAIL getUserMedia() fails with exact invalid resizeMode. assert_true: resizeMode should be supported expected true got undefined diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html index 96399c804fcf3..9376f528974a9 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html @@ -43,6 +43,10 @@

Description

promise_test(async t => { // Both permissions are needed at some point, asking both at once await setMediaPermission(); + // A successful camera gUM call is needed to expose camera information + const afterGum = await navigator.mediaDevices.getUserMedia({video: true}); + afterGum.getTracks()[0].stop(); + assert_true(navigator.mediaDevices.getSupportedConstraints()["groupId"], "groupId should be supported"); const devices = await navigator.mediaDevices.enumerateDevices(); @@ -66,6 +70,10 @@

Description

}, 'groupId is correctly supported by getUserMedia() for video devices'); promise_test(async t => { + // A successful microphone gUM call is needed to expose microphone information + const afterGum = await navigator.mediaDevices.getUserMedia({audio: true}); + afterGum.getTracks()[0].stop(); + assert_true(navigator.mediaDevices.getSupportedConstraints()["groupId"], "groupId should be supported"); const devices = await navigator.mediaDevices.enumerateDevices(); diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https-expected.txt deleted file mode 100644 index 5b9e30e4f1b0b..0000000000000 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https-expected.txt +++ /dev/null @@ -1,76 +0,0 @@ -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://localhost:9443' and allow attribute 'camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://localhost:9443' and allow attribute 'camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone 'none';camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone 'none';camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone 'none';camera 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'camera *;microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'camera *;microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'camera *;microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'camera *;microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://localhost:9443' and allow attribute 'camera 'none';microphone *'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://localhost:9443' and allow attribute 'camera 'none';microphone *'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone *; microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone *; microphone 'none''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'microphone *; camera 'self''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'microphone *; camera 'self''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone *; camera http:/example.org self'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone *; camera http:/example.org self'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'microphone *; camera http:/example.org 'self''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'microphone *; camera http:/example.org 'self''. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone https://127.0.0.1:9443'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Microphone' check failed for element with origin 'https://localhost:9443' and allow attribute 'microphone https://127.0.0.1:9443'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'microphone https://127.0.0.1:9443'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. -CONSOLE MESSAGE: Permission policy 'Camera' check failed for element with origin 'https://127.0.0.1:9443' and allow attribute 'microphone https://127.0.0.1:9443'. -CONSOLE MESSAGE: Not allowed to call getUserMedia. - -PASS "camera 'none'" - same origin iframe -PASS "camera 'none'" - cross origin iframe -PASS "microphone 'none'" - same origin iframe -PASS "microphone 'none';camera 'none'" - same origin iframe -PASS "camera *;microphone 'none'" - same origin iframe -PASS "camera *;microphone 'none'" - cross origin iframe -PASS "camera 'none';microphone *" - same origin iframe -PASS "microphone *; microphone 'none'" - same origin iframe -PASS "microphone *; microphone ' none'" - same origin iframe -PASS "microphone *; microphone none" - same origin iframe -PASS "microphone *; camera 'self'" - same origin iframe -PASS "microphone *; camera 'self'" - cross origin iframe -PASS "microphone *; camera http:/example.org self" - same origin iframe -PASS "microphone *; camera http:/example.org 'self'" - same origin iframe -PASS "microphone *; camera http:/example.org 'self'" - cross origin iframe -PASS "microphone https://127.0.0.1:9443" - same origin iframe -PASS "microphone https://127.0.0.1:9443" - cross origin iframe -PASS "microphone 'self' https://127.0.0.1:9443" - same origin iframe - diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https.html deleted file mode 100644 index 4fc3a15b62fbb..0000000000000 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt index 4a6f9960536ab..c9e2fc513173b 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt @@ -1,12 +1,13 @@ When prompted, accept to share your video stream. Description - This test checks that a disabled video track in a MediaStream is handled correctly by HTMLVideoElement. +Harness Error (TIMEOUT), message = null + PASS Tests that a disabled video track in a MediaStream is rendered as blackness -PASS Test that a video element rendering a disabled video track reports correct intrinsic dimensions -FAIL Test that frames don't flow for a disabled video track assert_equals: expected 0 but got 1 +TIMEOUT Test that a video element rendering a disabled video track reports correct intrinsic dimensions Test timed out +NOTRUN Test that frames are black for a disabled video track with an enabled clone diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html index f920eccdf2bcd..9215f931f0ce7 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html @@ -20,9 +20,23 @@

Description

diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https-expected.txt index 1cffb6aadf7c5..d50b9bcc52b74 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https-expected.txt @@ -4,6 +4,7 @@ PASS Setup audio MediaStreamTrack getCapabilities() test for sampleSize PASS Setup audio MediaStreamTrack getCapabilities() test for echoCancellation PASS Setup audio MediaStreamTrack getCapabilities() test for autoGainControl PASS Setup audio MediaStreamTrack getCapabilities() test for noiseSuppression +PASS Setup audio MediaStreamTrack getCapabilities() test for voiceIsolation PASS Setup audio MediaStreamTrack getCapabilities() test for latency PASS Setup audio MediaStreamTrack getCapabilities() test for channelCount PASS Setup audio MediaStreamTrack getCapabilities() test for deviceId @@ -21,6 +22,7 @@ PASS Setup audio InputDeviceInfo getCapabilities() test for sampleSize PASS Setup audio InputDeviceInfo getCapabilities() test for echoCancellation PASS Setup audio InputDeviceInfo getCapabilities() test for autoGainControl PASS Setup audio InputDeviceInfo getCapabilities() test for noiseSuppression +PASS Setup audio InputDeviceInfo getCapabilities() test for voiceIsolation PASS Setup audio InputDeviceInfo getCapabilities() test for latency PASS Setup audio InputDeviceInfo getCapabilities() test for channelCount PASS Setup audio InputDeviceInfo getCapabilities() test for deviceId @@ -43,6 +45,8 @@ FAIL Audio track getCapabilities() autoGainControl property present. assert_true FAIL Audio track getCapabilities() autoGainControl properly supported. undefined is not an object (evaluating 'capability.length') FAIL Audio track getCapabilities() noiseSuppression property present. assert_true: expected true got false FAIL Audio track getCapabilities() noiseSuppression properly supported. undefined is not an object (evaluating 'capability.length') +FAIL Audio track getCapabilities() voiceIsolation property present. assert_true: expected true got false +FAIL Audio track getCapabilities() voiceIsolation properly supported. undefined is not an object (evaluating 'capability.length') FAIL Audio track getCapabilities() latency property present. assert_true: expected true got false FAIL Audio track getCapabilities() latency properly supported. assert_equals: expected "object" but got "undefined" FAIL Audio track getCapabilities() channelCount property present. assert_true: expected true got false @@ -79,6 +83,8 @@ FAIL Audio device getCapabilities() autoGainControl property present. assert_tru FAIL Audio device getCapabilities() autoGainControl properly supported. undefined is not an object (evaluating 'capability.length') FAIL Audio device getCapabilities() noiseSuppression property present. assert_true: expected true got false FAIL Audio device getCapabilities() noiseSuppression properly supported. undefined is not an object (evaluating 'capability.length') +FAIL Audio device getCapabilities() voiceIsolation property present. assert_true: expected true got false +FAIL Audio device getCapabilities() voiceIsolation properly supported. undefined is not an object (evaluating 'capability.length') FAIL Audio device getCapabilities() latency property present. assert_true: expected true got false FAIL Audio device getCapabilities() latency properly supported. assert_equals: expected "object" but got "undefined" FAIL Audio device getCapabilities() channelCount property present. assert_true: expected true got false diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html index b67a8d51561a3..7d600c0e1b97c 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html @@ -13,6 +13,7 @@ {name: "echoCancellation", type: "boolean"}, {name: "autoGainControl", type: "boolean"}, {name: "noiseSuppression", type: "boolean"}, + {name: "voiceIsolation", type: "boolean"}, {name: "latency", type: "number"}, {name: "channelCount", type: "number"}, {name: "deviceId", type: "string"}, diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt index b9780ce5c7dbb..6b22d5009b3cc 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt @@ -11,6 +11,7 @@ FAIL sampleSize is reported by getSettings() for getUserMedia() audio tracks ass PASS echoCancellation is reported by getSettings() for getUserMedia() audio tracks FAIL autoGainControl is reported by getSettings() for getUserMedia() audio tracks assert_equals: autoGainControl should exist and it should be a boolean. expected "boolean" but got "undefined" FAIL noiseSuppression is reported by getSettings() for getUserMedia() audio tracks assert_equals: noiseSuppression should exist and it should be a boolean. expected "boolean" but got "undefined" +FAIL voiceIsolation is reported by getSettings() for getUserMedia() audio tracks assert_equals: voiceIsolation should exist and it should be a boolean. expected "boolean" but got "undefined" FAIL latency is reported by getSettings() for getUserMedia() audio tracks assert_equals: latency should exist and it should be a number. expected "number" but got "undefined" FAIL channelCount is reported by getSettings() for getUserMedia() audio tracks assert_equals: channelCount should exist and it should be a number. expected "number" but got "undefined" PASS deviceId is reported by getSettings() for getUserMedia() video tracks diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html index c1d90a4f4831a..3bae50c346dd3 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html @@ -67,18 +67,25 @@ }, 'A device can be opened twice with different resolutions requested'); promise_test(async t => { + // getUserMedia needs to be called before deviceIds and groupIds are exposed + const afterGum = await navigator.mediaDevices.getUserMedia({ + video: true, audio: true + }); + afterGum.getTracks().forEach(track => track.stop()); + const devices = await navigator.mediaDevices.enumerateDevices(); - const inputDevices = devices.filter(d => d.kind != "audiooutput"); - assert_greater_than(inputDevices.length, 0); - for (const device of inputDevices) { - const device_id_constraint = {deviceId: {exact: device.deviceId}}; - const constraints = device.kind == "audioinput" - ? {audio: device_id_constraint} - : {video: device_id_constraint}; - - const stream = await navigator.mediaDevices.getUserMedia(constraints); - assert_true(stream.getTracks()[0].getSettings().groupId === device.groupId, "device groupId"); - assert_greater_than(device.groupId.length, 0); + const inputDevices = devices.filter(({kind}) => kind != "audiooutput"); + assert_greater_than(inputDevices.length, 1, "have at least 2 test devices"); + for (const {kind, deviceId, groupId} of inputDevices) { + const type = {videoinput: "video", audioinput: "audio"}[kind]; + const stream = await navigator.mediaDevices.getUserMedia({ + [type]: {deviceId: {exact: deviceId}} + }); + const [track] = stream.getTracks(); + const settings = track.getSettings(); + track.stop(); + assert_true(settings.groupId == groupId, "device groupId"); + assert_greater_than(settings.groupId.length, 0, "groupId is not empty"); } }, 'groupId is correctly reported by getSettings() for all input devices'); @@ -126,6 +133,12 @@ "noiseSuppression should exist and it should be a boolean."); }, 'noiseSuppression is reported by getSettings() for getUserMedia() audio tracks'); + promise_test(async t => { + const settings = await createTrackAndGetSettings(t, "audio"); + assert_equals(typeof(settings.voiceIsolation), "boolean", + "voiceIsolation should exist and it should be a boolean."); + }, 'voiceIsolation is reported by getSettings() for getUserMedia() audio tracks'); + promise_test(async t => { const settings = await createTrackAndGetSettings(t, "audio"); assert_equals(typeof(settings.latency), "number", diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical-expected.txt deleted file mode 100644 index 60e109743a0b3..0000000000000 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical-expected.txt +++ /dev/null @@ -1,5 +0,0 @@ - -PASS webkitMediaStream interface should not exist -PASS navigator.webkitGetUserMedia should not exist -PASS navigator.mozGetUserMedia should not exist - diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https-expected.txt index e3c95540207d0..477beff38e97a 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https-expected.txt +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https-expected.txt @@ -1,5 +1,6 @@ PASS webkitMediaStream interface should not exist +PASS navigator.getUserMedia should not exist PASS navigator.webkitGetUserMedia should not exist PASS navigator.mozGetUserMedia should not exist PASS Passing MediaStream to URL.createObjectURL() should throw diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https.html b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https.html index 84326cec0a61a..402bc9e957a53 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https.html +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/historical.https.html @@ -8,6 +8,10 @@ assert_false("webkitMediaStream" in window); }, "webkitMediaStream interface should not exist"); +test(function() { + assert_false("getUserMedia" in navigator); +}, "navigator.getUserMedia should not exist"); + test(function() { assert_false("webkitGetUserMedia" in navigator); }, "navigator.webkitGetUserMedia should not exist"); diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/idlharness.https.window.js b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/idlharness.https.window.js index ad9bbfd8a35d3..d8b7bc8d7a2a4 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/idlharness.https.window.js +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/idlharness.https.window.js @@ -8,7 +8,7 @@ idl_test( ['mediacapture-streams'], - ['WebIDL', 'dom', 'html', 'permissions'], + ['webidl', 'dom', 'html', 'permissions'], async idl_array => { const inputDevices = []; const outputDevices = []; diff --git a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/w3c-import.log index a9876a04747e4..9653ff2f44d72 100644 --- a/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/w3c-import.log +++ b/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/w3c-import.log @@ -14,6 +14,8 @@ Property values requiring vendor prefixes: None ------------------------------------------------------------------------ List of files: +/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https.html +/LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https.html /LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-api.https.html /LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-deny.https.html /LayoutTests/imported/w3c/web-platform-tests/mediacapture-streams/GUM-empty-option-param.https.html diff --git a/LayoutTests/platform/ios/TestExpectations b/LayoutTests/platform/ios/TestExpectations index 3dbfc4febea80..39b14541406a7 100644 --- a/LayoutTests/platform/ios/TestExpectations +++ b/LayoutTests/platform/ios/TestExpectations @@ -5674,6 +5674,8 @@ imported/w3c/web-platform-tests/uievents/order-of-events/mouse-events/mouseover- imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events-onerror.html [ Pass Failure ] imported/w3c/web-platform-tests/uievents/click/click_events_on_input.html [ Pass Failure ] imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html [ Pass Failure ] +# Test is failing since its import. +webkit.org/b/274091 imported/w3c/web-platform-tests/mediacapture-streams/BrowserCaptureMediaStreamTrack-restrictTo.https.html [ Failure ] webkit.org/b/162032 js/date-constructor.html [ Pass Timeout ]