Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer-promise.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer-promise.html b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer-promise.html |
| index 651e4770c015bda8daff37450d2d23bbc6df5b8e..a4ac6d18ab96498a50cf1471c4a4dde5ada0f1b0 100644 |
| --- a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer-promise.html |
| +++ b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer-promise.html |
| @@ -9,24 +9,37 @@ |
| <script> |
| // 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. |
| + // of true and offerToReceiveAudio and offerToReceiveVideo are passed with |
| + // a positive value. In all other cases, createOffer() fails in the test |
| + // runner. |
| defaultError = new DOMException('TEST_ERROR', 'OperationError') |
| pc = new webkitRTCPeerConnection(null); |
| - // Test that creating an offer with voiceActivityDetection and iceRestart |
| - // returns an accepted promise. |
| + // Test that creating an offer with voiceActivityDetection, iceRestart, |
| + // offerToReceiveAudio and offerToReceiveVideo returns an accepted promise. |
| promise_test(function() { |
| - return pc.createOffer({voiceActivityDetection:true, iceRestart:true}) |
| + return pc.createOffer({voiceActivityDetection:true, iceRestart:true, offerToReceiveAudio:1, offerToReceiveVideo:1}) |
| }, 'createOffer({voiceActivityDetection:true, iceRestart:true})'); |
| - // Test that only setting iceRestart to true results in an accepted |
| - // promise, since the default value for voiceActivityDetection is true |
| + // Test that not explicitly setting voiceActivityDetection results in an |
| + // accepted promise, since the default value for voiceActivityDetection |
| + // is true. |
| promise_test(function() { |
| - return pc.createOffer({voiceActivityDetection:true, iceRestart:true}) |
| + return pc.createOffer({iceRestart:true, offerToReceiveAudio:1, offerToReceiveVideo:1}) |
| }, 'createOffer({iceRestart:true})'); |
| - // Test that the other combinations return a rejected promise |
| + // Test that other combinations return a rejected promise. |
| + promise_test(function() { |
| + return promise_rejects(this, defaultError, |
| + pc.createOffer({voiceActivityDetection:true, iceRestart:true})); |
| + }, 'createOffer({voiceActivityDetection:false, iceRestart:false})' ); |
| + |
| + promise_test(function() { |
| + return promise_rejects(this, defaultError, |
| + pc.createOffer({voiceActivityDetection:true, iceRestart:true, offerToReceiveAudio:0, offerToReceiveVideo: 0})); |
|
foolip
2016/06/20 13:59:05
An extra space here if you need to make another ch
|
| + }, 'createOffer({voiceActivityDetection:false, iceRestart:false})' ); |
| + |
| promise_test(function() { |
| return promise_rejects(this, defaultError, |
| pc.createOffer({voiceActivityDetection:false, iceRestart:false})); |