Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Unified Diff: components/test_runner/mock_webrtc_peer_connection_handler.cc

Issue 1494543002: Add counters for nonstandard uses of RTCPeerConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histograms.xml Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/mock_webrtc_peer_connection_handler.cc
diff --git a/components/test_runner/mock_webrtc_peer_connection_handler.cc b/components/test_runner/mock_webrtc_peer_connection_handler.cc
index 3aaa91d8d51ab63607ec304b1a3c6da4d3f2b00f..1fb0bc908afd2a67425c781d2391c35b7e667fcd 100644
--- a/components/test_runner/mock_webrtc_peer_connection_handler.cc
+++ b/components/test_runner/mock_webrtc_peer_connection_handler.cc
@@ -9,11 +9,11 @@
#include "components/test_runner/mock_webrtc_dtmf_sender_handler.h"
#include "components/test_runner/test_interfaces.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/WebMediaStreamSource.h"
#include "third_party/WebKit/public/platform/WebMediaStreamTrack.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/WebRTCStatsResponse.h"
#include "third_party/WebKit/public/platform/WebRTCVoidRequest.h"
@@ -178,24 +178,24 @@ bool MockWebRTCPeerConnectionHandler::initialize(
void MockWebRTCPeerConnectionHandler::createOffer(
const WebRTCSessionDescriptionRequest& request,
const WebMediaConstraints& constraints) {
+ interfaces_->GetDelegate()->PostTask(
+ new RTCSessionDescriptionRequestFailedTask(this, request));
+}
+
+void MockWebRTCPeerConnectionHandler::createOffer(
+ const WebRTCSessionDescriptionRequest& request,
+ const blink::WebRTCOfferOptions& options) {
WebString should_succeed;
- if (constraints.getMandatoryConstraintValue("succeed", should_succeed) &&
- should_succeed == "true") {
+ if (options.iceRestart() && options.voiceActivityDetection()) {
WebRTCSessionDescription session_description;
session_description.initialize("offer", "local");
interfaces_->GetDelegate()->PostTask(
new RTCSessionDescriptionRequestSuccededTask(
this, request, session_description));
- } else
+ } else {
interfaces_->GetDelegate()->PostTask(
new RTCSessionDescriptionRequestFailedTask(this, request));
-}
-
-void MockWebRTCPeerConnectionHandler::createOffer(
- const WebRTCSessionDescriptionRequest& request,
- const blink::WebRTCOfferOptions& options) {
- interfaces_->GetDelegate()->PostTask(
- new RTCSessionDescriptionRequestFailedTask(this, request));
+ }
}
void MockWebRTCPeerConnectionHandler::createAnswer(
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698