Skip to content

Commit

Permalink
Auto merge of #23377 - Manishearth:webrtc-wpt, r=<try>
Browse files Browse the repository at this point in the history
Enable webrtc by default, enable webrtc wpt tests

None
  • Loading branch information
bors-servo committed May 13, 2019
2 parents 2c28e2b + 7566c87 commit 139f071
Show file tree
Hide file tree
Showing 112 changed files with 3,529 additions and 6 deletions.
4 changes: 4 additions & 0 deletions components/config/prefs.rs
Expand Up @@ -190,6 +190,10 @@ mod gen {
gamepad: {
enabled: bool,
},
mediadevices: {
#[serde(default)]
enabled: bool,
},
microdata: {
testing: {
enabled: bool,
Expand Down
4 changes: 2 additions & 2 deletions components/script/dom/webidls/MediaDevices.webidl
Expand Up @@ -5,15 +5,15 @@
// https://w3c.github.io/mediacapture-main/#dom-mediadevices

[Exposed=Window,
SecureContext, Pref="dom.webrtc.enabled"]
SecureContext, Pref="dom.mediadevices.enabled"]
interface MediaDevices : EventTarget {
// attribute EventHandler ondevicechange;
// Promise<sequence<MediaDeviceInfo>> enumerateDevices();
};

partial interface Navigator {
// [SameObject, SecureContext]
[Pref="dom.webrtc.enabled"] readonly attribute MediaDevices mediaDevices;
[Pref="dom.mediadevices.enabled"] readonly attribute MediaDevices mediaDevices;
};

partial interface MediaDevices {
Expand Down
3 changes: 1 addition & 2 deletions components/script/dom/webidls/MediaStream.webidl
Expand Up @@ -7,8 +7,7 @@
[Exposed=Window,
Constructor,
Constructor(MediaStream stream),
Constructor(sequence<MediaStreamTrack> tracks),
Pref="dom.webrtc.enabled"]
Constructor(sequence<MediaStreamTrack> tracks)]
interface MediaStream : EventTarget {
// readonly attribute DOMString id;
sequence<MediaStreamTrack> getAudioTracks();
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/MediaStreamTrack.webidl
Expand Up @@ -4,7 +4,7 @@

// https://w3c.github.io/mediacapture-main/#dom-mediastreamtrack

[Exposed=Window, Pref="dom.webrtc.enabled"]
[Exposed=Window]
interface MediaStreamTrack : EventTarget {
readonly attribute DOMString kind;
readonly attribute DOMString id;
Expand Down
3 changes: 2 additions & 1 deletion resources/prefs.json
Expand Up @@ -9,6 +9,7 @@
"dom.forcetouch.enabled": false,
"dom.fullscreen.test": false,
"dom.gamepad.enabled": false,
"dom.mediadevices.enabled": false,
"dom.microdata.enabled": false,
"dom.microdata.testing.enabled": false,
"dom.mouseevent.which.enabled": false,
Expand All @@ -26,7 +27,7 @@
"dom.testing.htmlinputelement.select_files.enabled": false,
"dom.webgl.dom_to_texture.enabled": false,
"dom.webgl2.enabled": false,
"dom.webrtc.enabled": false,
"dom.webrtc.enabled": true,
"dom.webvr.enabled": false,
"dom.webvr.event_polling_interval": 500,
"dom.webvr.test": false,
Expand Down
2 changes: 2 additions & 0 deletions tests/wpt/include.ini
Expand Up @@ -129,6 +129,8 @@ skip: true
skip: false
[webvr]
skip: false
[webvr]
skip: false
[WebIDL]
skip: false
[websockets]
Expand Down
10 changes: 10 additions & 0 deletions tests/wpt/metadata/webrtc/RTCCertificate-postMessage.html.ini
@@ -0,0 +1,10 @@
[RTCCertificate-postMessage.html]
[Check cross-origin created RTCCertificate]
expected: FAIL

[Check cross-origin RTCCertificate serialization]
expected: FAIL

[Check same-origin RTCCertificate serialization]
expected: FAIL

16 changes: 16 additions & 0 deletions tests/wpt/metadata/webrtc/RTCCertificate.html.ini
@@ -0,0 +1,16 @@
[RTCCertificate.html]
[Constructing RTCPeerConnection with expired certificate should reject with InvalidAccessError]
expected: FAIL

[RTCCertificate should have at least one fingerprint]
expected: FAIL

[RTCPeerConnection({ certificates }) should generate offer SDP with fingerprint of provided certificate]
expected: FAIL

[RTCPeerConnection({ certificates }) should generate offer SDP with fingerprint of all provided certificates]
expected: FAIL

[Calling setConfiguration with different set of certs should reject with InvalidModificationError]
expected: FAIL

40 changes: 40 additions & 0 deletions tests/wpt/metadata/webrtc/RTCConfiguration-bundlePolicy.html.ini
@@ -0,0 +1,40 @@
[RTCConfiguration-bundlePolicy.html]
[setConfiguration({ bundlePolicy: 'max-compat' }) with initial bundlePolicy max-bundle should throw InvalidModificationError]
expected: FAIL

[setConfiguration({ bundlePolicy: balanced }) with initial default bundlePolicy balanced should succeed]
expected: FAIL

[setConfiguration({ bundlePolicy: 'balanced' }) with initial bundlePolicy balanced should succeed]
expected: FAIL

[new RTCPeerConnection({ bundlePolicy: 'max-compat' }) should succeed]
expected: FAIL

[setConfiguration({}) with initial default bundlePolicy balanced should succeed]
expected: FAIL

[setConfiguration({ bundlePolicy: 'max-compat' }) with initial bundlePolicy max-compat should succeed]
expected: FAIL

[setConfiguration({}) with initial bundlePolicy max-bundle should throw InvalidModificationError]
expected: FAIL

[setConfiguration({ bundlePolicy: 'max-bundle' }) with initial bundlePolicy max-bundle should succeed]
expected: FAIL

[new RTCPeerConnection({ bundlePolicy: undefined }) should have bundlePolicy balanced]
expected: FAIL

[setConfiguration({}) with initial bundlePolicy balanced should succeed]
expected: FAIL

[new RTCPeerConnection({ bundlePolicy: 'max-bundle' }) should succeed]
expected: FAIL

[Default bundlePolicy should be balanced]
expected: FAIL

[new RTCPeerConnection({ bundlePolicy: 'balanced' }) should succeed]
expected: FAIL

@@ -0,0 +1,22 @@
[RTCConfiguration-iceCandidatePoolSize.html]
[Initialize a new RTCPeerConnection with iceCandidatePoolSize: 255]
expected: FAIL

[Reconfigure RTCPeerConnection instance iceCandidatePoolSize to 0]
expected: FAIL

[Initialize a new RTCPeerConnection with iceCandidatePoolSize: 0]
expected: FAIL

[Reconfigure RTCPeerConnection instance iceCandidatePoolSize to 255]
expected: FAIL

[Reconfigure RTCPeerConnection instance iceCandidatePoolSize to 256 (Out Of Range)]
expected: FAIL

[Initialize a new RTCPeerConnection with no iceCandidatePoolSize]
expected: FAIL

[Reconfigure RTCPeerConnection instance iceCandidatePoolSize to -1 (Out Of Range)]
expected: FAIL

202 changes: 202 additions & 0 deletions tests/wpt/metadata/webrtc/RTCConfiguration-iceServers.html.ini
@@ -0,0 +1,202 @@
[RTCConfiguration-iceServers.html]
[setConfiguration(config) - { iceServers: undefined } should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with turn server, username, credential should succeed]
expected: FAIL

[setConfiguration(config) - with turns server and no credentials should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with 2 stun servers should succeed]
expected: FAIL

[setConfiguration(config) - with url field should throw TypeError]
expected: FAIL

[setConfiguration(config) - with invalid credentialType should throw TypeError]
expected: FAIL

[new RTCPeerConnection(config) - with ["stun:stun1.example.net", ""\] url should throw SyntaxError]
expected: FAIL

[new RTCPeerConnection(config) - with turns server and only credential should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with stun server, credentialType oauth, and string credential should succeed]
expected: FAIL

[setConfiguration(config) - with one turns server, one turn server, username, credential should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with "" url should throw SyntaxError]
expected: FAIL

[new RTCPeerConnection(config) - with stun server, credentialType password, and RTCOAuthCredential credential should succeed]
expected: FAIL

[new RTCPeerConnection() should have default configuration.iceServers of undefined]
expected: FAIL

[setConfiguration(config) - with turns server, credentialType oauth and RTCOAuthCredential credential should succeed]
expected: FAIL

[setConfiguration(config) - { iceServers: null } should throw TypeError]
expected: FAIL

[new RTCPeerConnection(config) - { iceServers: undefined } should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with turns server and only username should throw InvalidAccessError]
expected: FAIL

[setConfiguration(config) - with stun server should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with turns server, credentialType oauth and RTCOAuthCredential credential should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with stun server array should succeed]
expected: FAIL

[setConfiguration(config) - with stun server, credentialType oauth, and string credential should succeed]
expected: FAIL

[setConfiguration(config) - with invalid stun url should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - with turn server, username, credential should succeed]
expected: FAIL

[setConfiguration(config) - with turns server and only credential should throw InvalidAccessError]
expected: FAIL

[setConfiguration(config) - with turns server, credentialType oauth, and string credential should throw InvalidAccessError]
expected: FAIL

[setConfiguration(config) - with turn server and only credential should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with http url should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - with turns server and only username should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with turn server and only username should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with stun server should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with turns server, credentialType oauth, and string credential should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with turn server and only credential should throw InvalidAccessError]
expected: FAIL

[setConfiguration(config) - with turns server and empty string username, credential should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with both turns and stun server, credentialType oauth and RTCOAuthCredential credential should succeed]
expected: FAIL

[setConfiguration(config) - {} should succeed]
expected: FAIL

[setConfiguration(config) - with stun server and credentialType password should succeed]
expected: FAIL

[setConfiguration(config) - { iceServers: [{}\] } should throw TypeError]
expected: FAIL

[new RTCPeerConnection(config) - with turn server and no credentials should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with stun server and credentialType password should succeed]
expected: FAIL

[setConfiguration(config) - with empty urls should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - with turn server and empty string username, credential should succeed]
expected: FAIL

[setConfiguration(config) - with 2 stun servers should succeed]
expected: FAIL

[setConfiguration(config) - with stun server array should succeed]
expected: FAIL

[setConfiguration(config) - with relative url should throw SyntaxError]
expected: FAIL

[new RTCPeerConnection(config) - with turns server, credentialType password, and RTCOauthCredential credential should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with invalid turn url should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - { iceServers: [undefined\] } should throw TypeError]
expected: FAIL

[new RTCPeerConnection(config) - with turns server and empty string username, credential should succeed]
expected: FAIL

[setConfiguration(config) - with "" url should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - with credentialType token should throw TypeError]
expected: FAIL

[setConfiguration(config) - { iceServers: [\] } should succeed]
expected: FAIL

[setConfiguration(config) - { iceServers: [null\] } should throw TypeError]
expected: FAIL

[setConfiguration(config) - with turn server and no credentials should throw InvalidAccessError]
expected: FAIL

[setConfiguration(config) - with stun server, credentialType password, and RTCOAuthCredential credential should succeed]
expected: FAIL

[setConfiguration(config) - with ["stun:stun1.example.net", ""\] url should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - with turn server and only username should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - { iceServers: [\] } should succeed]
expected: FAIL

[setConfiguration(config) - with both turns and stun server, credentialType oauth and RTCOAuthCredential credential should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with relative url should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - with invalid turn url should throw SyntaxError]
expected: FAIL

[new RTCPeerConnection(config) - with turn server and empty string username, credential should succeed]
expected: FAIL

[setConfiguration(config) - with http url should throw SyntaxError]
expected: FAIL

[new RTCPeerConnection(config) - with invalid stun url should throw SyntaxError]
expected: FAIL

[new RTCPeerConnection(config) - with empty urls should throw SyntaxError]
expected: FAIL

[setConfiguration(config) - with turns server, credentialType password, and RTCOauthCredential credential should throw InvalidAccessError]
expected: FAIL

[new RTCPeerConnection(config) - with one turns server, one turn server, username, credential should succeed]
expected: FAIL

[new RTCPeerConnection(config) - with turns server and no credentials should throw InvalidAccessError]
expected: FAIL

0 comments on commit 139f071

Please sign in to comment.