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

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

Issue 1661493002: Add promise-based addIceCandidate, setLocalDescription and setRemoteDescription to RTCPeerConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace "TBD" with "InternalError" Created 4 years, 11 months 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-localDescription.html
diff --git a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html
index a8987914665129244a44fbb560021f856629ebcc..e2f8b66a0f10ddb5ff17798aaf5a7d366a2149dd 100644
--- a/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html
+++ b/third_party/WebKit/LayoutTests/fast/mediastream/RTCPeerConnection-localDescription.html
@@ -42,12 +42,26 @@ function requestSucceeded1()
shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded2, requestFailed2);');
}
+function expectedTypeError(error)
+{
+ errorReason = error;
+ shouldBe('errorReason.name', '"TypeError"')
+ testPassed('expectedTypeError was called.')
+}
+
+function expectedInvalidSessionDescription(error)
+{
+ errorReason = error;
+ shouldBe('errorReason.name', '"InvalidSessionDescription"')
+ testPassed('expectedInvalidSessionDescription was called.')
+}
+
pc = new webkitRTCPeerConnection(null, null);
-shouldThrow('pc.setLocalDescription(null)');
+shouldNotThrow('pc.setLocalDescription().catch(expectedTypeError)');
+shouldNotThrow('pc.setLocalDescription(null).catch(expectedInvalidSessionDescription)');
var sessionDescription = new RTCSessionDescription({type:"offer", sdp:"local"});
shouldNotThrow('pc.setLocalDescription(sessionDescription, requestSucceeded1, requestFailed1);');
-
window.jsTestIsAsync = true;
window.successfullyParsed = true;
</script>

Powered by Google App Engine
This is Rietveld 408576698