| Index: third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice-promise.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice.html b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice-promise.html
|
| similarity index 67%
|
| copy from third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice.html
|
| copy to third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice-promise.html
|
| index f144b9dacfd2914c80f0bf16aa68e458ad49eaf0..5bf9f341942815695abfea2b30abf4a2f2415077 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-ice-promise.html
|
| @@ -27,19 +27,29 @@ function addIceCandidateSuccess()
|
|
|
| function addIceCandidateFailure()
|
| {
|
| - testFailed("addIceCandidateFailue was called.");
|
| + testFailed("addIceCandidateFailure was called.");
|
| finishJSTest();
|
| }
|
|
|
| +function unexpectedSuccess()
|
| +{
|
| + testFailed("unexpectedSuccess was called.");
|
| + finishJSTest();
|
| +}
|
| +
|
| +function expectedTypeError(error)
|
| +{
|
| + shouldBe(error.name, "TypeError")
|
| + testPassed("expectedTypeError was called.")
|
| +}
|
| +
|
| function onIceChange1()
|
| {
|
| if (pc.iceConnectionState === "completed") {
|
| testPassed("iceConnectionState is completed");
|
| iceCandidate = new RTCIceCandidate({candidate:"nano nano"});
|
| - shouldThrow('pc.addIceCandidate(null, addIceCandidateSuccess, addIceCandidateFailure);');
|
| - shouldThrow('pc.addIceCandidate(iceCandidate, null, addIceCandidateFailure);');
|
| - shouldThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess, null);');
|
| - shouldNotThrow('pc.addIceCandidate(iceCandidate, addIceCandidateSuccess, addIceCandidateFailure);');
|
| + shouldNotThrow('pc.addIceCandidate(null).then(unexpectedSuccess, expectedTypeError);');
|
| + shouldNotThrow('pc.addIceCandidate(iceCandidate).then(addIceCandidateSuccess, addIceCandidateFailure);');
|
| }
|
| }
|
|
|
|
|