Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable webrtc by default, enable webrtc wpt tests #23377

Closed
wants to merge 13 commits into from

Mock mediadevices on WPT

  • Loading branch information
Manishearth committed May 16, 2019
commit 5f1020bb83b87e31375afe25f6d4e7055d02e499
@@ -193,6 +193,8 @@ mod gen {
mediadevices: {
#[serde(default)]
enabled: bool,
#[serde(default)]
mock: bool,
},
microdata: {
testing: {
@@ -17,6 +17,7 @@ use crate::dom::mediastream::MediaStream;
use crate::dom::mediastreamtrack::MediaStreamTrack;
use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use servo_config::prefs;
use servo_media::streams::capture::{Constrain, ConstrainRange, MediaTrackConstraintSet};
use servo_media::streams::MediaStreamType;
use servo_media::ServoMedia;
@@ -35,6 +36,10 @@ impl MediaDevices {
}

pub fn new(global: &GlobalScope) -> DomRoot<MediaDevices> {
let mock = prefs::pref_map().get("dom.mediadevices.mock").as_bool();
if let Some(true) = mock {
ServoMedia::get().unwrap().set_capture_mocking(true);
}
reflect_dom_object(
Box::new(MediaDevices::new_inherited()),
global,
@@ -10,6 +10,7 @@
"dom.fullscreen.test": false,
"dom.gamepad.enabled": false,
"dom.mediadevices.enabled": false,
"dom.mediadevices.mock": false,
"dom.microdata.enabled": false,
"dom.microdata.testing.enabled": false,
"dom.mouseevent.which.enabled": false,
@@ -1,4 +1,5 @@
[RTCPeerConnection-add-track-no-deadlock.https.html]
expected: ERROR
[RTCPeerConnection addTrack does not deadlock.]
expected: FAIL

@@ -1,28 +1,29 @@
[RTCPeerConnection-addTrack.https.html]
expected: ERROR
[addTrack with existing sender that has been used to send should create new sender]
expected: FAIL
expected: NOTRUN

[addTrack with single track argument and multiple streams should succeed]
expected: FAIL
expected: NOTRUN

[addTrack with existing sender with null track, different kind, and recvonly direction should create new sender]
expected: FAIL
expected: NOTRUN

[addTrack with single track argument and no stream should succeed]
expected: FAIL
expected: NOTRUN

[addTrack with existing sender that has not been used to send should reuse the sender]
expected: FAIL
expected: NOTRUN

[addTrack with single track argument and single stream should succeed]
expected: FAIL
expected: NOTRUN

[addTrack when pc is closed should throw InvalidStateError]
expected: FAIL

[addTrack with existing sender with null track, same kind, and recvonly direction should reuse sender]
expected: FAIL
expected: NOTRUN

[Adding the same track multiple times should throw InvalidAccessError]
expected: FAIL
expected: NOTRUN

@@ -1,4 +1,5 @@
[RTCPeerConnection-addTransceiver.https.html]
expected: ERROR
[addTransceiver() with direction inactive should have result transceiver.direction be the same]
expected: FAIL

@@ -33,5 +34,5 @@
expected: FAIL

[addTransceiver(track) multiple times should create multiple transceivers]
expected: FAIL
expected: NOTRUN

@@ -1,12 +1,13 @@
[RTCPeerConnection-connectionState.https.html]
expected: ERROR
[Initial connectionState should be new]
expected: FAIL

[connectionState remains new when not adding remote ice candidates]
expected: FAIL

[connectionState transitions to connected via connecting]
expected: FAIL
expected: NOTRUN

[connection with one data channel should eventually have transports in connected state]
expected: FAIL
@@ -1,5 +1,5 @@
[RTCPeerConnection-createAnswer.html]
expected: TIMEOUT
expected: CRASH
[createAnswer() when connection is closed reject with InvalidStateError]
expected: NOTRUN

@@ -1,21 +1,22 @@
[RTCPeerConnection-getStats.https.html]
expected: ERROR
[getStats() with connected peer connections having tracks and data channel should return all mandatory to implement stats]
expected: FAIL

[getStats() with no argument should return stats report containing peer-connection stats and outbound-track-stats]
expected: FAIL
expected: NOTRUN

[getStats() with track associated with both sender and receiver should reject with InvalidAccessError]
expected: FAIL
expected: NOTRUN

[getStats() on track associated with RtpReceiver should return stats report containing inbound-rtp stats]
expected: FAIL
expected: NOTRUN

[getStats() with no argument should return stats for no-stream tracks]
expected: FAIL
expected: NOTRUN

[getStats() on track associated with RtpSender should return stats report containing outbound-rtp stats]
expected: FAIL
expected: NOTRUN

[getStats() with no argument should succeed]
expected: FAIL
@@ -27,13 +28,13 @@
expected: FAIL

[getStats() with no argument should return stats report containing peer-connection stats on an empty PC]
expected: FAIL
expected: NOTRUN

[getStats() with track added via addTransceiver should succeed]
expected: FAIL

[getStats() with track associated with more than one sender should reject with InvalidAccessError]
expected: FAIL
expected: NOTRUN

[getStats() with track added via addTrack should succeed]
expected: FAIL
@@ -1,4 +1,5 @@
[RTCPeerConnection-iceConnectionState-disconnected.https.html]
expected: ERROR
[ICE goes to disconnected if the other side goes away]
expected: FAIL

@@ -16,7 +16,7 @@
expected: FAIL

[Updating the direction of the transceiver should cause negotiationneeded to fire]
expected: FAIL
expected: NOTRUN

[negotiationneeded event should fire only after signaling state go back to stable after setLocalDescription]
expected: FAIL
@@ -33,3 +33,6 @@
[calling createDataChannel twice should fire negotiationneeded event once]
expected: FAIL

[negotiationneeded event should not fire if signaling state is not stable]
expected: TIMEOUT

@@ -1,4 +1,5 @@
[RTCPeerConnection-onsignalingstatechanged.https.html]
expected: ERROR
[RTCPeerConnection onsignalingstatechanged]
expected: FAIL

@@ -1,12 +1,13 @@
[RTCPeerConnection-remote-track-mute.https.html]
expected: ERROR
[Changing transceiver direction to 'sendrecv' unmutes the remote track]
expected: FAIL
expected: NOTRUN

[pc.close() mutes remote tracks]
expected: FAIL
expected: NOTRUN

[Changing transceiver direction to 'inactive' mutes the remote track]
expected: FAIL
expected: NOTRUN

[ontrack: track goes from muted to unmuted]
expected: FAIL
@@ -1,40 +1,41 @@
[RTCPeerConnection-removeTrack.https.html]
expected: ERROR
[Calling removeTrack with currentDirection sendonly should set direction to inactive]
expected: FAIL
expected: NOTRUN

[addTrack - Calling removeTrack when connection is closed should throw InvalidStateError]
expected: FAIL
expected: NOTRUN

[addTransceiver - Calling removeTrack on different connection should throw InvalidAccessError]
expected: FAIL
expected: NOTRUN

[addTrack - Calling removeTrack on different connection that is closed should throw InvalidStateError]
expected: FAIL
expected: NOTRUN

[addTransceiver - Calling removeTrack on different connection that is closed should throw InvalidStateError]
expected: FAIL
expected: NOTRUN

[addTransceiver - Calling removeTrack with valid sender should set sender.track to null]
expected: FAIL
expected: NOTRUN

[Calling removeTrack on a stopped transceiver should be a no-op]
expected: FAIL
expected: NOTRUN

[addTransceiver - Calling removeTrack when connection is closed should throw InvalidStateError]
expected: FAIL

[addTrack - Calling removeTrack on different connection should throw InvalidAccessError]
expected: FAIL
expected: NOTRUN

[Calling removeTrack with currentDirection inactive should not change direction]
expected: FAIL
expected: NOTRUN

[Calling removeTrack with currentDirection sendrecv should set direction to recvonly]
expected: FAIL
expected: NOTRUN

[Calling removeTrack with currentDirection recvonly should not change direction]
expected: FAIL
expected: NOTRUN

[addTrack - Calling removeTrack with valid sender should set sender.track to null]
expected: FAIL
expected: NOTRUN

@@ -1,43 +1,44 @@
[RTCPeerConnection-setRemoteDescription-tracks.https.html]
expected: ERROR
[ontrack fires before setRemoteDescription resolves.]
expected: FAIL
expected: NOTRUN

[addTrack() for an existing stream makes stream.onaddtrack fire.]
expected: FAIL
expected: NOTRUN

[ontrack's receiver matches getReceivers().]
expected: FAIL
expected: NOTRUN
[track.onmute fires before setRemoteDescription resolves.]
expected: FAIL
expected: NOTRUN
[addTrack() with two tracks and one stream makes ontrack fire twice with the tracks and shared stream.]
expected: FAIL
expected: NOTRUN
[stream.onaddtrack fires before setRemoteDescription resolves.]
expected: FAIL
expected: NOTRUN
[addTrack() with a track and no stream makes ontrack fire with a track and no stream.]
expected: FAIL
[addTrack() with a track and a stream makes ontrack fire with a track and a stream.]
expected: FAIL
expected: NOTRUN
[removeTrack() makes track.onmute fire and the track to be muted.]
expected: FAIL
expected: NOTRUN
[addTrack() with a track and two streams makes ontrack fire with a track and two streams.]
expected: FAIL
expected: NOTRUN
[stream.onremovetrack fires before setRemoteDescription resolves.]
expected: FAIL
expected: NOTRUN
[removeTrack() makes stream.onremovetrack fire and the track to be removed from the stream.]
expected: FAIL
expected: NOTRUN
[removeTrack() does not remove the receiver.]
expected: FAIL
expected: NOTRUN
[removeTrack() twice is safe.]
expected: FAIL
expected: NOTRUN
@@ -1,4 +1,5 @@
[RTCPeerConnection-track-stats.https.html]
expected: ERROR
[replaceTrack() before offer: new track attachment stats present]
expected: FAIL

@@ -12,7 +13,7 @@
expected: FAIL

[RTCRtpReceiver.getStats() contains only inbound-rtp and related stats]
expected: FAIL
expected: NOTRUN

[O/A exchange yields inbound RTP stream stats for receiving track]
expected: FAIL
@@ -33,19 +34,19 @@
expected: FAIL

[RTCPeerConnection.getStats(track) throws InvalidAccessError when there are zero senders or receivers for the track]
expected: FAIL
expected: NOTRUN

[RTCPeerConnection.getStats(track) throws InvalidAccessError when there are multiple senders for the track]
expected: FAIL
expected: NOTRUN

[replaceTrack() after answer: new track attachment stats present]
expected: FAIL

[RTCPeerConnection.getStats(receivingTrack) is the same as RTCRtpReceiver.getStats()]
expected: FAIL
expected: NOTRUN

[RTCPeerConnection.getStats(sendingTrack) is the same as RTCRtpSender.getStats()]
expected: FAIL
expected: NOTRUN

[addTrack() with setLocalDescription() yields track stats]
expected: FAIL
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.