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

Unified Diff: LayoutTests/imported/web-platform-tests/webrtc/no-media-call.html

Issue 1188583004: update-w3c-deps import using blink 9d3793ee56e5bb1aa1eef078d848e1b0e6e4d355: (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: LayoutTests/imported/web-platform-tests/webrtc/no-media-call.html
diff --git a/LayoutTests/imported/web-platform-tests/webrtc/no-media-call.html b/LayoutTests/imported/web-platform-tests/webrtc/no-media-call.html
index 0a02b8a1c03de6226eec78d06a452547a4ffba66..236b7a8125fc13dcb8c4e0e3d5025be510d651bb 100644
--- a/LayoutTests/imported/web-platform-tests/webrtc/no-media-call.html
+++ b/LayoutTests/imported/web-platform-tests/webrtc/no-media-call.html
@@ -1,6 +1,6 @@
<!doctype html>
<!--
-This test uses no media, and thus does not require fake media devices.
+This test uses the legacy callback API with no media, and thus does not require fake media devices.
-->
<html>
@@ -20,8 +20,7 @@ This test uses no media, and thus does not require fake media devices.
<script src="../../../resources/vendor-prefix.js"
data-prefixed-objects=
'[{"ancestors":["window"], "name":"RTCPeerConnection"},
- {"ancestors":["window"], "name":"RTCSessionDescription"},
- {"ancestors":["window"], "name":"RTCIceCandidate"}]'
+ {"ancestors":["window"], "name":"RTCSessionDescription"}]'
>
</script>
<script type="text/javascript">
@@ -31,7 +30,6 @@ This test uses no media, and thus does not require fake media devices.
var gSecondConnection = null;
var onOfferCreated = test.step_func(function(offer) {
- // TODO: Switch to promise-based interface.
gFirstConnection.setLocalDescription(offer, ignoreSuccess,
failed('setLocalDescription first'));
@@ -45,7 +43,6 @@ This test uses no media, and thus does not require fake media devices.
var parsedOffer = new RTCSessionDescription({ type: 'offer',
sdp: offerSdp });
// These functions use the legacy interface extensions to RTCPeerConnection.
- // TODO: Switch to promise-based interfaces.
gSecondConnection.setRemoteDescription(parsedOffer,
function() {
gSecondConnection.createAnswer(onAnswerCreated,
@@ -72,15 +69,13 @@ This test uses no media, and thus does not require fake media devices.
var onIceCandidateToFirst = test.step_func(function(event) {
// If event.candidate is null = no more candidates.
if (event.candidate) {
- var candidate = new RTCIceCandidate(event.candidate);
- gSecondConnection.addIceCandidate(candidate);
+ gSecondConnection.addIceCandidate(event.candidate);
}
});
var onIceCandidateToSecond = test.step_func(function(event) {
if (event.candidate) {
- var candidate = new RTCIceCandidate(event.candidate);
- gFirstConnection.addIceCandidate(candidate);
+ gFirstConnection.addIceCandidate(event.candidate);
}
});
@@ -90,6 +85,8 @@ This test uses no media, and thus does not require fake media devices.
var onIceConnectionStateChange = test.step_func(function(event) {
assert_equals(event.type, 'iceconnectionstatechange');
+ assert_not_equals(gFirstConnection.iceConnectionState, "failed", "iceConnectionState of first connection");
+ assert_not_equals(gSecondConnection.iceConnectionState, "failed", "iceConnectionState of second connection");
var stateinfo = document.getElementById('stateinfo');
stateinfo.innerHTML = 'First: ' + gFirstConnection.iceConnectionState
+ '<br>Second: ' + gSecondConnection.iceConnectionState;
@@ -139,7 +136,6 @@ This test uses no media, and thus does not require fake media devices.
// The offerToReceiveVideo is necessary and sufficient to make
// an actual connection.
- // TODO: Use a promise-based API. This is legacy.
gFirstConnection.createOffer(onOfferCreated, failed('createOffer'),
{offerToReceiveVideo: true});
});

Powered by Google App Engine
This is Rietveld 408576698