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; |