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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/webrtc/promises-call.html

Issue 1979363002: Moved web-platform-tests to wpt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/imported/web-platform-tests/webrtc/promises-call.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/webrtc/promises-call.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/webrtc/promises-call.html
deleted file mode 100644
index 32b9508d49ed970a923edd7df87a6df4256f671e..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/webrtc/promises-call.html
+++ /dev/null
@@ -1,121 +0,0 @@
-<!doctype html>
-<!--
-This test uses data only, and thus does not require fake media devices.
- -->
-
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>RTCPeerConnection Data-Only Connection Test with Promises</title>
-</head>
-<body>
- <div id="log"></div>
- <h2>iceConnectionState info</h2>
- <div id="stateinfo">
- </div>
-
- <!-- These files are in place when executing on W3C. -->
- <script src="../../../resources/testharness.js"></script>
- <script src="../../../resources/testharnessreport.js"></script>
- <script type="text/javascript">
- var test = async_test('Can set up a basic WebRTC call with only data using promises.');
-
- var gFirstConnection = null;
- var gSecondConnection = null;
-
- var onIceCandidateToFirst = test.step_func(function(event) {
- // If event.candidate is null = no more candidates.
- if (event.candidate) {
- gSecondConnection.addIceCandidate(event.candidate);
- }
- });
-
- var onIceCandidateToSecond = test.step_func(function(event) {
- if (event.candidate) {
- gFirstConnection.addIceCandidate(event.candidate);
- }
- });
-
- var onRemoteStream = test.step_func(function(event) {
- assert_unreached('WebRTC received a stream when there was none');
- });
-
- var onIceConnectionStateChange = test.step_func(function(event) {
- assert_equals(event.type, 'iceconnectionstatechange');
- var stateinfo = document.getElementById('stateinfo');
- stateinfo.innerHTML = 'First: ' + gFirstConnection.iceConnectionState
- + '<br>Second: ' + gSecondConnection.iceConnectionState;
- // Note: All these combinations are legal states indicating that the
- // call has connected. All browsers should end up in completed/completed,
- // but as of this moment, we've chosen to terminate the test early.
- // TODO: Revise test to ensure completed/completed is reached.
- if (gFirstConnection.iceConnectionState == 'connected' &&
- gSecondConnection.iceConnectionState == 'connected') {
- test.done()
- }
- if (gFirstConnection.iceConnectionState == 'connected' &&
- gSecondConnection.iceConnectionState == 'completed') {
- test.done()
- }
- if (gFirstConnection.iceConnectionState == 'completed' &&
- gSecondConnection.iceConnectionState == 'connected') {
- test.done()
- }
- if (gFirstConnection.iceConnectionState == 'completed' &&
- gSecondConnection.iceConnectionState == 'completed') {
- test.done()
- }
- });
-
- // This function starts the test.
- test.step(function() {
- gFirstConnection = new RTCPeerConnection(null);
- gFirstConnection.onicecandidate = onIceCandidateToFirst;
- gFirstConnection.oniceconnectionstatechange = onIceConnectionStateChange;
-
- gSecondConnection = new RTCPeerConnection(null);
- gSecondConnection.onicecandidate = onIceCandidateToSecond;
- gSecondConnection.onaddstream = onRemoteStream;
- gSecondConnection.oniceconnectionstatechange = onIceConnectionStateChange;
-
- // The createDataChannel is necessary and sufficient to make
- // sure the ICE connection be attempted.
- gFirstConnection.createDataChannel('channel');
-
- var atStep = 'Create offer';
-
- gFirstConnection.createOffer()
- .then(function(offer) {
- atStep = 'Set local description at first';
- return gFirstConnection.setLocalDescription(offer);
- })
- .then(function() {
- atStep = 'Set remote description at second';
- return gSecondConnection.setRemoteDescription(
- gFirstConnection.localDescription);
- })
- .then(function() {
- atStep = 'Create answer';
- return gSecondConnection.createAnswer();
- })
- .then(function(answer) {
- atStep = 'Set local description at second';
- return gSecondConnection.setLocalDescription(answer);
- })
- .then(function() {
- atStep = 'Set remote description at first';
- return gFirstConnection.setRemoteDescription(
- gSecondConnection.localDescription);
- })
- .then(function() {
- atStep = 'Negotiation completed';
- })
- .catch(test.step_func(function(e) {
- assert_unreached('Error ' + e.name + ': ' + e.message +
- ' happened at step ' + atStep);
- }));
- });
-</script>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698