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

Unified Diff: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html

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
Index: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html
diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html
index 55e310e98f9068b05e5b3c0558866e9d034dc4ae..38258b1a0c1aab202739a0d98d9485db2f783aaa 100644
--- a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html
+++ b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html
@@ -7,6 +7,10 @@
<script>
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;
function dummy() {}
@@ -18,6 +22,13 @@ function requestFailed2(reason)
errorReason = reason;
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:0, offerToReceiveAudio:-1});");
shouldNotThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:1, offerToReceiveAudio:0, voiceActivityDetection:false, iceRestart:true});");
@@ -44,11 +55,11 @@ function requestSucceeded1(sd)
sessionDescription = sd;
shouldBe('sessionDescription.type', '"offer"');
- pc.createOffer(requestSucceeded2, requestFailed2, {mandatory:{"succeed":false}});
+ pc.createOffer(requestSucceeded2, requestFailed2);
}
-pc = new webkitRTCPeerConnection(null, null);
-pc.createOffer(requestSucceeded1, requestFailed1, {mandatory:{"succeed":true}});
+pc = new webkitRTCPeerConnection(null);
+pc.createOffer(requestSucceeded1, requestFailed1, {voiceActivityDetection:true, iceRestart:true});
window.jsTestIsAsync = true;
window.successfullyParsed = true;

Powered by Google App Engine
This is Rietveld 408576698