Commit 7a746bbf authored by guidou's avatar guidou Committed by Commit bot

Add counters for nonstandard uses of RTCPeerConnection

BUG=564530

Review URL: https://codereview.chromium.org/1494543002

Cr-Commit-Position: refs/heads/master@{#363050}
parent 7c3f6cc6
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
#include "components/test_runner/mock_webrtc_dtmf_sender_handler.h" #include "components/test_runner/mock_webrtc_dtmf_sender_handler.h"
#include "components/test_runner/test_interfaces.h" #include "components/test_runner/test_interfaces.h"
#include "components/test_runner/web_test_delegate.h" #include "components/test_runner/web_test_delegate.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.h"
#include "third_party/WebKit/public/platform/WebMediaStream.h" #include "third_party/WebKit/public/platform/WebMediaStream.h"
#include "third_party/WebKit/public/platform/WebMediaStreamSource.h" #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
#include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h" #include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h"
#include "third_party/WebKit/public/platform/WebRTCOfferOptions.h"
#include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h" #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandlerClient.h"
#include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h"
#include "third_party/WebKit/public/platform/WebRTCVoidRequest.h" #include "third_party/WebKit/public/platform/WebRTCVoidRequest.h"
...@@ -178,24 +178,24 @@ bool MockWebRTCPeerConnectionHandler::initialize( ...@@ -178,24 +178,24 @@ bool MockWebRTCPeerConnectionHandler::initialize(
void MockWebRTCPeerConnectionHandler::createOffer( void MockWebRTCPeerConnectionHandler::createOffer(
const WebRTCSessionDescriptionRequest& request, const WebRTCSessionDescriptionRequest& request,
const WebMediaConstraints& constraints) { const WebMediaConstraints& constraints) {
interfaces_->GetDelegate()->PostTask(
new RTCSessionDescriptionRequestFailedTask(this, request));
}
void MockWebRTCPeerConnectionHandler::createOffer(
const WebRTCSessionDescriptionRequest& request,
const blink::WebRTCOfferOptions& options) {
WebString should_succeed; WebString should_succeed;
if (constraints.getMandatoryConstraintValue("succeed", should_succeed) && if (options.iceRestart() && options.voiceActivityDetection()) {
should_succeed == "true") {
WebRTCSessionDescription session_description; WebRTCSessionDescription session_description;
session_description.initialize("offer", "local"); session_description.initialize("offer", "local");
interfaces_->GetDelegate()->PostTask( interfaces_->GetDelegate()->PostTask(
new RTCSessionDescriptionRequestSuccededTask( new RTCSessionDescriptionRequestSuccededTask(
this, request, session_description)); this, request, session_description));
} else } else {
interfaces_->GetDelegate()->PostTask( interfaces_->GetDelegate()->PostTask(
new RTCSessionDescriptionRequestFailedTask(this, request)); new RTCSessionDescriptionRequestFailedTask(this, request));
} }
void MockWebRTCPeerConnectionHandler::createOffer(
const WebRTCSessionDescriptionRequest& request,
const blink::WebRTCOfferOptions& options) {
interfaces_->GetDelegate()->PostTask(
new RTCSessionDescriptionRequestFailedTask(this, request));
} }
void MockWebRTCPeerConnectionHandler::createAnswer( void MockWebRTCPeerConnectionHandler::createAnswer(
......
...@@ -7,6 +7,11 @@ PASS requestSucceeded was called. ...@@ -7,6 +7,11 @@ PASS requestSucceeded was called.
PASS sessionDescription.type is "offer" PASS sessionDescription.type is "offer"
PASS requestFailed was called. PASS requestFailed was called.
PASS errorReason is "TEST_ERROR" PASS errorReason is "TEST_ERROR"
PASS pc.createOffer(dummy, dummy); did not throw exception.
PASS pc.createOffer(dummy, dummy, {}); did not throw exception.
PASS pc.createOffer(dummy, dummy, {voiceActivityDetection:false}); did not throw exception.
PASS pc.createOffer(dummy, dummy, {iceRestart:true}); did not throw exception.
PASS pc.createOffer(dummy, dummy, {voiceActivityDetection:false, iceRestart:true}); did not throw exception.
PASS pc.createOffer(dummy, dummy, {offerToReceiveVideo:-1, offerToReceiveAudio:0}); threw exception TypeError: Failed to execute 'createOffer' on 'RTCPeerConnection': Invalid offerToReceiveVideo. PASS pc.createOffer(dummy, dummy, {offerToReceiveVideo:-1, offerToReceiveAudio:0}); threw exception TypeError: Failed to execute 'createOffer' on 'RTCPeerConnection': Invalid offerToReceiveVideo.
PASS pc.createOffer(dummy, dummy, {offerToReceiveVideo:0, offerToReceiveAudio:-1}); threw exception TypeError: Failed to execute 'createOffer' on 'RTCPeerConnection': Invalid offerToReceiveAudio. PASS pc.createOffer(dummy, dummy, {offerToReceiveVideo:0, offerToReceiveAudio:-1}); threw exception TypeError: Failed to execute 'createOffer' on 'RTCPeerConnection': Invalid offerToReceiveAudio.
PASS pc.createOffer(dummy, dummy, {offerToReceiveVideo:1, offerToReceiveAudio:0, voiceActivityDetection:false, iceRestart:true}); did not throw exception. PASS pc.createOffer(dummy, dummy, {offerToReceiveVideo:1, offerToReceiveAudio:0, voiceActivityDetection:false, iceRestart:true}); did not throw exception.
......
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
<script> <script>
description("Tests RTCPeerConnection createOffer."); description("Tests RTCPeerConnection createOffer.");
// Note: createOffer() calls in the test runner are successful if the
// voiceActivityDetection and iceRestart options are passed with a value of true.
// In all other cases, createOffer() fails in the test runner.
var pc = null; var pc = null;
function dummy() {} function dummy() {}
...@@ -18,6 +22,13 @@ function requestFailed2(reason) ...@@ -18,6 +22,13 @@ function requestFailed2(reason)
errorReason = reason; errorReason = reason;
shouldBe('errorReason', '"TEST_ERROR"'); shouldBe('errorReason', '"TEST_ERROR"');
shouldNotThrow("pc.createOffer(dummy, dummy);");
shouldNotThrow("pc.createOffer(dummy, dummy, {});");
shouldNotThrow("pc.createOffer(dummy, dummy, {voiceActivityDetection:false});");
shouldNotThrow("pc.createOffer(dummy, dummy, {iceRestart:true});");
shouldNotThrow("pc.createOffer(dummy, dummy, {voiceActivityDetection:false, iceRestart:true});");
// Deprecated.
shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:-1, offerToReceiveAudio:0});"); shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:-1, offerToReceiveAudio:0});");
shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:0, offerToReceiveAudio:-1});"); shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:0, offerToReceiveAudio:-1});");
shouldNotThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:1, offerToReceiveAudio:0, voiceActivityDetection:false, iceRestart:true});"); shouldNotThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:1, offerToReceiveAudio:0, voiceActivityDetection:false, iceRestart:true});");
...@@ -44,11 +55,11 @@ function requestSucceeded1(sd) ...@@ -44,11 +55,11 @@ function requestSucceeded1(sd)
sessionDescription = sd; sessionDescription = sd;
shouldBe('sessionDescription.type', '"offer"'); shouldBe('sessionDescription.type', '"offer"');
pc.createOffer(requestSucceeded2, requestFailed2, {mandatory:{"succeed":false}}); pc.createOffer(requestSucceeded2, requestFailed2);
} }
pc = new webkitRTCPeerConnection(null, null); pc = new webkitRTCPeerConnection(null);
pc.createOffer(requestSucceeded1, requestFailed1, {mandatory:{"succeed":true}}); pc.createOffer(requestSucceeded1, requestFailed1, {voiceActivityDetection:true, iceRestart:true});
window.jsTestIsAsync = true; window.jsTestIsAsync = true;
window.successfullyParsed = true; window.successfullyParsed = true;
......
...@@ -4,35 +4,32 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ...@@ -4,35 +4,32 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS new webkitRTCPeerConnection(null); did not throw exception. PASS new webkitRTCPeerConnection(null); did not throw exception.
PASS new webkitRTCPeerConnection(null, null); did not throw exception.
PASS new webkitRTCPeerConnection(undefined); did not throw exception. PASS new webkitRTCPeerConnection(undefined); did not throw exception.
PASS new webkitRTCPeerConnection(undefined, undefined); did not throw exception.
PASS new webkitRTCPeerConnection(); threw exception TypeError: Failed to construct 'RTCPeerConnection': 1 argument required, but only 0 present.. PASS new webkitRTCPeerConnection(); threw exception TypeError: Failed to construct 'RTCPeerConnection': 1 argument required, but only 0 present..
PASS new webkitRTCPeerConnection(''); threw exception TypeError: Failed to construct 'RTCPeerConnection': parameter 1 ('rtcConfiguration') is not an object.. PASS new webkitRTCPeerConnection(''); threw exception TypeError: Failed to construct 'RTCPeerConnection': parameter 1 ('rtcConfiguration') is not an object..
PASS new webkitRTCPeerConnection(null, ''); threw exception TypeError: Failed to construct 'RTCPeerConnection': parameter 2 ('mediaConstraints') is not an object.. PASS new webkitRTCPeerConnection({iceServers:[]}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]}, null); did not throw exception. PASS new webkitRTCPeerConnection({fooServers:[]}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCConfiguration.
PASS new webkitRTCPeerConnection({fooServers:[]}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCConfiguration. PASS new webkitRTCPeerConnection({iceServers:true}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCConfiguration.
PASS new webkitRTCPeerConnection({iceServers:true}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCConfiguration. PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCIceServer.
PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCIceServer. PASS new webkitRTCPeerConnection({iceServers:[{}]}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCIceServer.
PASS new webkitRTCPeerConnection({iceServers:[{}]}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCIceServer. PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed URL.
PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed URL. PASS new webkitRTCPeerConnection({iceServers:[{urls:[1, 'turn:foo.com']}]}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed URL.
PASS new webkitRTCPeerConnection({iceServers:[{urls:[1, 'turn:foo.com']}]}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed URL. PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo'}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCIceTransports.
PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo'}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCIceTransports. PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'balanced'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'balanced'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-bundle'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-bundle'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-compat'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-compat'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'foo'}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCBundlePolicy.
PASS new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'foo'}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCBundlePolicy. PASS new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'negotiate'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'negotiate'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'require'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'require'}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'foo'}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCRtcpMuxPolicy.
PASS new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'foo'}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed RTCRtcpMuxPolicy.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1}}); did not throw exception. PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1}}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}}); did not throw exception. PASS new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}}); did not throw exception.
PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0}]}); did not throw exception. PASS new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0}]}); did not throw exception.
...@@ -48,10 +45,10 @@ PASS new webkitRTCPeerConnection(null, {optional:[{invalid:0}]}); threw exceptio ...@@ -48,10 +45,10 @@ PASS new webkitRTCPeerConnection(null, {optional:[{invalid:0}]}); threw exceptio
PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed constraints object.. PASS new webkitRTCPeerConnection(null, {valid_and_supported_1:1}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed constraints object..
PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed constraints object.. PASS new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed constraints object..
PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed constraints object.. PASS new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed constraints object..
PASS new webkitRTCPeerConnection({iceServers:[], certificates:null}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], certificates:null}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], certificates:[]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], certificates:[]}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], certificates:[null]}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed sequence<RTCCertificate>. PASS new webkitRTCPeerConnection({iceServers:[], certificates:[null]}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed sequence<RTCCertificate>.
PASS new webkitRTCPeerConnection({iceServers:[], certificates:[1337]}, null); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed sequence<RTCCertificate>. PASS new webkitRTCPeerConnection({iceServers:[], certificates:[1337]}); threw exception TypeError: Failed to construct 'RTCPeerConnection': Malformed sequence<RTCCertificate>.
PASS new webkitRTCPeerConnection({iceServers:[], certificates:[certRSA]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], certificates:[certRSA]}, null); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[], certificates:[certECDSA]}, null); did not throw exception. PASS new webkitRTCPeerConnection({iceServers:[], certificates:[certECDSA]}, null); did not throw exception.
PASS successfullyParsed is true PASS successfullyParsed is true
......
...@@ -8,41 +8,39 @@ ...@@ -8,41 +8,39 @@
description("Tests the RTCPeerConnection constructor."); description("Tests the RTCPeerConnection constructor.");
shouldNotThrow("new webkitRTCPeerConnection(null);"); shouldNotThrow("new webkitRTCPeerConnection(null);");
shouldNotThrow("new webkitRTCPeerConnection(null, null);");
shouldNotThrow("new webkitRTCPeerConnection(undefined);"); shouldNotThrow("new webkitRTCPeerConnection(undefined);");
shouldNotThrow("new webkitRTCPeerConnection(undefined, undefined);");
shouldThrow("new webkitRTCPeerConnection();"); shouldThrow("new webkitRTCPeerConnection();");
shouldThrow("new webkitRTCPeerConnection('');"); shouldThrow("new webkitRTCPeerConnection('');");
shouldThrow("new webkitRTCPeerConnection(null, '');");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}]});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{urls:['stun:foo.com', 'turn:foo.com']}]});");
shouldThrow("new webkitRTCPeerConnection({fooServers:[]}, null);"); shouldThrow("new webkitRTCPeerConnection({fooServers:[]});");
shouldThrow("new webkitRTCPeerConnection({iceServers:true}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:true});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[{}]}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[{}]});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[{url:'foo'}]});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:[1, 'turn:foo.com']}]}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[{urls:[1, 'turn:foo.com']}]});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo'}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo'});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'balanced'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'balanced'});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-bundle'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-bundle'});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-compat'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'max-compat'});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'foo'}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[], bundlePolicy:'foo'});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'negotiate'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'negotiate'});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'require'}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'require'});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'foo'}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[], rtcpMuxPolicy:'foo'});");
// Deprecated.
shouldNotThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1}});"); shouldNotThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1}});");
shouldNotThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}});"); shouldNotThrow("new webkitRTCPeerConnection(null, {mandatory:{valid_and_supported_1:1, valid_and_supported_2:1}});");
shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0}]});"); shouldNotThrow("new webkitRTCPeerConnection(null, {optional:[{valid_and_supported_1:0}]});");
...@@ -60,10 +58,10 @@ shouldThrow("new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1});"); ...@@ -60,10 +58,10 @@ shouldThrow("new webkitRTCPeerConnection(null, {valid_but_unsupported_1:1});");
shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}});"); shouldThrow("new webkitRTCPeerConnection(null, {valid_and_supported_2:1, mandatory:{valid_and_supported_1:1}});");
// Construct with certificates. // Construct with certificates.
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:null}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:null});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[]}, null);"); shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[]});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[null]}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[null]});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[1337]}, null);"); shouldThrow("new webkitRTCPeerConnection({iceServers:[], certificates:[1337]});");
// Global certificate variables so that the "should..." methods can evaluate them. // Global certificate variables so that the "should..." methods can evaluate them.
var certRSA = null; var certRSA = null;
var certECDSA = null; var certECDSA = null;
......
...@@ -896,6 +896,24 @@ public: ...@@ -896,6 +896,24 @@ public:
PresentationConnectionClose = 1038, PresentationConnectionClose = 1038,
SVG1DOMShape = 1039, SVG1DOMShape = 1039,
SVG1DOMText = 1040, SVG1DOMText = 1040,
RTCPeerConnectionConstructorConstraints = 1041,
RTCPeerConnectionConstructorCompliant = 1042,
RTCPeerConnectionCreateOfferLegacyNoFailureCallback = 1043,
RTCPeerConnectionCreateOfferLegacyFailureCallback = 1044,
RTCPeerConnectionCreateOfferLegacyConstraints = 1045,
RTCPeerConnectionCreateOfferLegacyOfferOptions = 1046,
RTCPeerConnectionCreateOfferLegacyCompliant = 1047,
RTCPeerConnectionCreateAnswerLegacyNoFailureCallback = 1048,
RTCPeerConnectionCreateAnswerLegacyFailureCallback = 1049,
RTCPeerConnectionCreateAnswerLegacyConstraints = 1050,
RTCPeerConnectionCreateAnswerLegacyCompliant = 1051,
RTCPeerConnectionSetLocalDescriptionLegacyNoSuccessCallback = 1052,
RTCPeerConnectionSetLocalDescriptionLegacyNoFailureCallback = 1053,
RTCPeerConnectionSetLocalDescriptionLegacyCompliant = 1054,
RTCPeerConnectionSetRemoteDescriptionLegacyNoSuccessCallback = 1055,
RTCPeerConnectionSetRemoteDescriptionLegacyNoFailureCallback = 1056,
RTCPeerConnectionSetRemoteDescriptionLegacyCompliant = 1057,
RTCPeerConnectionGetStatsLegacyNonCompliant = 1058,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "core/dom/ExceptionCode.h" #include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h" #include "core/dom/ExecutionContext.h"
#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrame.h"
#include "core/frame/UseCounter.h"
#include "core/html/VoidCallback.h" #include "core/html/VoidCallback.h"
#include "core/loader/FrameLoader.h" #include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h" #include "core/loader/FrameLoaderClient.h"
...@@ -300,6 +301,11 @@ RTCOfferOptions* RTCPeerConnection::parseOfferOptions(const Dictionary& options, ...@@ -300,6 +301,11 @@ RTCOfferOptions* RTCPeerConnection::parseOfferOptions(const Dictionary& options,
RTCPeerConnection* RTCPeerConnection::create(ExecutionContext* context, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState& exceptionState) RTCPeerConnection* RTCPeerConnection::create(ExecutionContext* context, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState& exceptionState)
{ {
if (mediaConstraints.isObject())
UseCounter::count(context, UseCounter::RTCPeerConnectionConstructorConstraints);
else
UseCounter::count(context, UseCounter::RTCPeerConnectionConstructorCompliant);
RTCConfiguration* configuration = parseConfiguration(rtcConfiguration, exceptionState); RTCConfiguration* configuration = parseConfiguration(rtcConfiguration, exceptionState);
if (exceptionState.hadException()) if (exceptionState.hadException())
return 0; return 0;
...@@ -361,8 +367,13 @@ RTCPeerConnection::~RTCPeerConnection() ...@@ -361,8 +367,13 @@ RTCPeerConnection::~RTCPeerConnection()
ASSERT(m_closed || m_stopped); ASSERT(m_closed || m_stopped);
} }
void RTCPeerConnection::createOffer(RTCSessionDescriptionCallback* successCallback, RTCErrorCallback* errorCallback, const Dictionary& rtcOfferOptions, ExceptionState& exceptionState) void RTCPeerConnection::createOffer(ExecutionContext* context, RTCSessionDescriptionCallback* successCallback, RTCErrorCallback* errorCallback, const Dictionary& rtcOfferOptions, ExceptionState& exceptionState)
{ {
if (errorCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateOfferLegacyFailureCallback);
else
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateOfferLegacyNoFailureCallback);
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return; return;
...@@ -375,18 +386,38 @@ void RTCPeerConnection::createOffer(RTCSessionDescriptionCallback* successCallba ...@@ -375,18 +386,38 @@ void RTCPeerConnection::createOffer(RTCSessionDescriptionCallback* successCallba
RTCSessionDescriptionRequest* request = RTCSessionDescriptionRequestImpl::create(executionContext(), this, successCallback, errorCallback); RTCSessionDescriptionRequest* request = RTCSessionDescriptionRequestImpl::create(executionContext(), this, successCallback, errorCallback);
if (offerOptions) { if (offerOptions) {
if (offerOptions->offerToReceiveAudio() != -1 || offerOptions->offerToReceiveVideo() != -1)
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateOfferLegacyOfferOptions);
else if (errorCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateOfferLegacyCompliant);
m_peerHandler->createOffer(request, offerOptions); m_peerHandler->createOffer(request, offerOptions);
} else { } else {
WebMediaConstraints constraints = MediaConstraintsImpl::create(rtcOfferOptions, exceptionState); WebMediaConstraints constraints = MediaConstraintsImpl::create(rtcOfferOptions, exceptionState);
if (exceptionState.hadException()) if (exceptionState.hadException())
return; return;
if (!constraints.isEmpty())
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateOfferLegacyConstraints);
else if (errorCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateOfferLegacyCompliant);
m_peerHandler->createOffer(request, constraints); m_peerHandler->createOffer(request, constraints);
} }
} }
void RTCPeerConnection::createAnswer(RTCSessionDescriptionCallback* successCallback, RTCErrorCallback* errorCallback, const Dictionary& mediaConstraints, ExceptionState& exceptionState) void RTCPeerConnection::createAnswer(ExecutionContext* context, RTCSessionDescriptionCallback* successCallback, RTCErrorCallback* errorCallback, const Dictionary& mediaConstraints, ExceptionState& exceptionState)
{ {
if (errorCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateAnswerLegacyFailureCallback);
else
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateAnswerLegacyNoFailureCallback);
if (mediaConstraints.isObject())
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateAnswerLegacyConstraints);
else if (errorCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionCreateAnswerLegacyCompliant);
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return; return;
...@@ -400,8 +431,17 @@ void RTCPeerConnection::createAnswer(RTCSessionDescriptionCallback* successCallb ...@@ -400,8 +431,17 @@ void RTCPeerConnection::createAnswer(RTCSessionDescriptionCallback* successCallb
m_peerHandler->createAnswer(request, constraints); m_peerHandler->createAnswer(request, constraints);
} }
void RTCPeerConnection::setLocalDescription(RTCSessionDescription* sessionDescription, VoidCallback* successCallback, RTCErrorCallback* errorCallback, ExceptionState& exceptionState) void RTCPeerConnection::setLocalDescription(ExecutionContext* context, RTCSessionDescription* sessionDescription, VoidCallback* successCallback, RTCErrorCallback* errorCallback, ExceptionState& exceptionState)
{ {
if (successCallback && errorCallback) {
UseCounter::count(context, UseCounter::RTCPeerConnectionSetLocalDescriptionLegacyCompliant);
} else {
if (!successCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionSetLocalDescriptionLegacyNoSuccessCallback);
if (!errorCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionSetLocalDescriptionLegacyNoFailureCallback);
}
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return; return;
...@@ -420,8 +460,17 @@ RTCSessionDescription* RTCPeerConnection::localDescription() ...@@ -420,8 +460,17 @@ RTCSessionDescription* RTCPeerConnection::localDescription()
return RTCSessionDescription::create(webSessionDescription); return RTCSessionDescription::create(webSessionDescription);
} }
void RTCPeerConnection::setRemoteDescription(RTCSessionDescription* sessionDescription, VoidCallback* successCallback, RTCErrorCallback* errorCallback, ExceptionState& exceptionState) void RTCPeerConnection::setRemoteDescription(ExecutionContext* context, RTCSessionDescription* sessionDescription, VoidCallback* successCallback, RTCErrorCallback* errorCallback, ExceptionState& exceptionState)
{ {
if (successCallback && errorCallback) {
UseCounter::count(context, UseCounter::RTCPeerConnectionSetRemoteDescriptionLegacyCompliant);
} else {
if (!successCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionSetRemoteDescriptionLegacyNoSuccessCallback);
if (!errorCallback)
UseCounter::count(context, UseCounter::RTCPeerConnectionSetRemoteDescriptionLegacyNoFailureCallback);
}
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return; return;
...@@ -683,8 +732,9 @@ MediaStream* RTCPeerConnection::getStreamById(const String& streamId) ...@@ -683,8 +732,9 @@ MediaStream* RTCPeerConnection::getStreamById(const String& streamId)
return 0; return 0;
} }
void RTCPeerConnection::getStats(RTCStatsCallback* successCallback, MediaStreamTrack* selector) void RTCPeerConnection::getStats(ExecutionContext* context, RTCStatsCallback* successCallback, MediaStreamTrack* selector)
{ {
UseCounter::count(context, UseCounter::RTCPeerConnectionGetStatsLegacyNonCompliant);
RTCStatsRequest* statsRequest = RTCStatsRequestImpl::create(executionContext(), this, successCallback, selector); RTCStatsRequest* statsRequest = RTCStatsRequestImpl::create(executionContext(), this, successCallback, selector);
// FIXME: Add passing selector as part of the statsRequest. // FIXME: Add passing selector as part of the statsRequest.
m_peerHandler->getStats(statsRequest); m_peerHandler->getStats(statsRequest);
......
...@@ -68,14 +68,14 @@ public: ...@@ -68,14 +68,14 @@ public:
static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const Dictionary&, ExceptionState&); static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const Dictionary&, ExceptionState&);
~RTCPeerConnection() override; ~RTCPeerConnection() override;
void createOffer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const Dictionary&, ExceptionState&); void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCErrorCallback*, const Dictionary&, ExceptionState&);
void createAnswer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const Dictionary&, ExceptionState&); void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCErrorCallback*, const Dictionary&, ExceptionState&);
void setLocalDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&); void setLocalDescription(ExecutionContext*, RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&);
RTCSessionDescription* localDescription(); RTCSessionDescription* localDescription();
void setRemoteDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&); void setRemoteDescription(ExecutionContext*, RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&);
RTCSessionDescription* remoteDescription(); RTCSessionDescription* remoteDescription();
String signalingState() const; String signalingState() const;
...@@ -105,7 +105,7 @@ public: ...@@ -105,7 +105,7 @@ public:
void removeStream(MediaStream*, ExceptionState&); void removeStream(MediaStream*, ExceptionState&);
void getStats(RTCStatsCallback* successCallback, MediaStreamTrack* selector); void getStats(ExecutionContext*, RTCStatsCallback* successCallback, MediaStreamTrack* selector);
RTCDataChannel* createDataChannel(String label, const Dictionary& dataChannelDict, ExceptionState&); RTCDataChannel* createDataChannel(String label, const Dictionary& dataChannelDict, ExceptionState&);
......
...@@ -99,20 +99,20 @@ enum RTCIceConnectionState { ...@@ -99,20 +99,20 @@ enum RTCIceConnectionState {
// https://w3c.github.io/webrtc-pc/#legacy-interface-extensions // https://w3c.github.io/webrtc-pc/#legacy-interface-extensions
// TODO(guidou): The failureCallback argument should be non-optional. // TODO(guidou): The failureCallback argument should be non-optional.
[RaisesException] void createOffer(RTCSessionDescriptionCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary rtcOfferOptions); [CallWith=ExecutionContext, RaisesException] void createOffer(RTCSessionDescriptionCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary rtcOfferOptions);
// TODO(guidou): None of the arguments should be optional. // TODO(guidou): None of the arguments should be optional.
[RaisesException] void setLocalDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback); [CallWith=ExecutionContext, RaisesException] void setLocalDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback);
// TODO(guidou): The failureCallback argument should be non-optional, and // TODO(guidou): The failureCallback argument should be non-optional, and
// there should be no mediaConstraints argument. // there should be no mediaConstraints argument.
[RaisesException] void createAnswer(RTCSessionDescriptionCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints); [CallWith=ExecutionContext, RaisesException] void createAnswer(RTCSessionDescriptionCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback, optional Dictionary mediaConstraints);
// TODO(guidou): The successCallback and failureCallback arguments should be // TODO(guidou): The successCallback and failureCallback arguments should be
// non-optional. // non-optional.
[RaisesException] void setRemoteDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback); [CallWith=ExecutionContext, RaisesException] void setRemoteDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback);
[RaisesException] void addIceCandidate(RTCIceCandidate candidate, VoidCallback successCallback, RTCErrorCallback failureCallback); [RaisesException] void addIceCandidate(RTCIceCandidate candidate, VoidCallback successCallback, RTCErrorCallback failureCallback);
// TODO(guidou): The selector argument should the first (nullable, // TODO(guidou): The selector argument should the first (nullable,
// non-optional) argument, and there should be a third failureCallback // non-optional) argument, and there should be a third failureCallback
// argument. // argument.
[LegacyInterfaceTypeChecking] void getStats(RTCStatsCallback successCallback, [Default=Undefined] optional MediaStreamTrack selector); [CallWith=ExecutionContext, LegacyInterfaceTypeChecking] void getStats(RTCStatsCallback successCallback, [Default=Undefined] optional MediaStreamTrack selector);
// https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api
// TODO(guidou): The label argument should have [TreatNullAs=EmptyString] // TODO(guidou): The label argument should have [TreatNullAs=EmptyString]
......
...@@ -42,6 +42,7 @@ public: ...@@ -42,6 +42,7 @@ public:
static PassRefPtr<WebMediaConstraintsPrivate> create(); static PassRefPtr<WebMediaConstraintsPrivate> create();
static PassRefPtr<WebMediaConstraintsPrivate> create(const WebVector<WebMediaConstraint>& optional, const WebVector<WebMediaConstraint>& mandatory); static PassRefPtr<WebMediaConstraintsPrivate> create(const WebVector<WebMediaConstraint>& optional, const WebVector<WebMediaConstraint>& mandatory);
bool isEmpty() const;
void getOptionalConstraints(WebVector<WebMediaConstraint>&); void getOptionalConstraints(WebVector<WebMediaConstraint>&);
void getMandatoryConstraints(WebVector<WebMediaConstraint>&); void getMandatoryConstraints(WebVector<WebMediaConstraint>&);
bool getMandatoryConstraintValue(const WebString& name, WebString& value); bool getMandatoryConstraintValue(const WebString& name, WebString& value);
...@@ -72,6 +73,11 @@ WebMediaConstraintsPrivate::WebMediaConstraintsPrivate(const WebVector<WebMediaC ...@@ -72,6 +73,11 @@ WebMediaConstraintsPrivate::WebMediaConstraintsPrivate(const WebVector<WebMediaC
{ {
} }
bool WebMediaConstraintsPrivate::isEmpty() const
{
return m_optional.isEmpty() && m_mandatory.isEmpty();
}
void WebMediaConstraintsPrivate::getOptionalConstraints(WebVector<WebMediaConstraint>& constraints) void WebMediaConstraintsPrivate::getOptionalConstraints(WebVector<WebMediaConstraint>& constraints)
{ {
constraints = m_optional; constraints = m_optional;
...@@ -116,6 +122,11 @@ void WebMediaConstraints::reset() ...@@ -116,6 +122,11 @@ void WebMediaConstraints::reset()
m_private.reset(); m_private.reset();
} }
bool WebMediaConstraints::isEmpty() const
{
return m_private.isNull() || m_private->isEmpty();
}
void WebMediaConstraints::getMandatoryConstraints(WebVector<WebMediaConstraint>& constraints) const void WebMediaConstraints::getMandatoryConstraints(WebVector<WebMediaConstraint>& constraints) const
{ {
ASSERT(!isNull()); ASSERT(!isNull());
......
...@@ -73,6 +73,7 @@ public: ...@@ -73,6 +73,7 @@ public:
BLINK_PLATFORM_EXPORT void reset(); BLINK_PLATFORM_EXPORT void reset();
bool isNull() const { return m_private.isNull(); } bool isNull() const { return m_private.isNull(); }
BLINK_PLATFORM_EXPORT bool isEmpty() const;
BLINK_PLATFORM_EXPORT void getOptionalConstraints(WebVector<WebMediaConstraint>&) const; BLINK_PLATFORM_EXPORT void getOptionalConstraints(WebVector<WebMediaConstraint>&) const;
BLINK_PLATFORM_EXPORT void getMandatoryConstraints(WebVector<WebMediaConstraint>&) const; BLINK_PLATFORM_EXPORT void getMandatoryConstraints(WebVector<WebMediaConstraint>&) const;
......
...@@ -63709,6 +63709,32 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -63709,6 +63709,32 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<int value="1038" label="PresentationConnectionClose"/> <int value="1038" label="PresentationConnectionClose"/>
<int value="1039" label="SVG1DOMShape"/> <int value="1039" label="SVG1DOMShape"/>
<int value="1040" label="SVG1DOMText"/> <int value="1040" label="SVG1DOMText"/>
<int value="1041" label="RTCPeerConnectionConstructorConstraints"/>
<int value="1042" label="RTCPeerConnectionConstructorCompliant"/>
<int value="1043"
label="RTCPeerConnectionCreateOfferLegacyNoFailureCallback"/>
<int value="1044" label="RTCPeerConnectionCreateOfferLegacyFailureCallback"/>
<int value="1045" label="RTCPeerConnectionCreateOfferLegacyConstraints"/>
<int value="1046" label="RTCPeerConnectionCreateOfferLegacyOfferOptions"/>
<int value="1047" label="RTCPeerConnectionCreateOfferLegacyCompliant"/>
<int value="1048"
label="RTCPeerConnectionCreateAnswerLegacyNoFailureCallback"/>
<int value="1049" label="RTCPeerConnectionCreateAnswerLegacyFailureCallback"/>
<int value="1050" label="RTCPeerConnectionCreateAnswerLegacyConstraints"/>
<int value="1051" label="RTCPeerConnectionCreateAnswerLegacyCompliant"/>
<int value="1052"
label="RTCPeerConnectionSetLocalDescriptionLegacyNoSuccessCallback"/>
<int value="1053"
label="RTCPeerConnectionSetLocalDescriptionLegacyNoFailureCallback"/>
<int value="1054"
label="RTCPeerConnectionSetLocalDescriptionLegacyCompliant"/>
<int value="1055"
label="RTCPeerConnectionSetRemoteDescriptionLegacyNoSuccessCallback"/>
<int value="1056"
label="RTCPeerConnectionSetRemoteDescriptionLegacyNoFailureCallback"/>
<int value="1057"
label="RTCPeerConnectionSetRemoteDescriptionLegacyCompliant"/>
<int value="1058" label="RTCPeerConnectionGetStatsLegacyNonCompliant"/>
</enum> </enum>
<enum name="FetchRequestMode" type="int"> <enum name="FetchRequestMode" type="int">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment