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

Side by Side Diff: chrome/test/data/extensions/api_test/cast_streaming/rtp_stream_error.js

Issue 2133903002: RELAND: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled two unittests. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/media/cast_session_delegate.cc ('k') | media/cast/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var rtpStream = chrome.cast.streaming.rtpStream; 5 var rtpStream = chrome.cast.streaming.rtpStream;
6 var tabCapture = chrome.tabCapture; 6 var tabCapture = chrome.tabCapture;
7 var udpTransport = chrome.cast.streaming.udpTransport; 7 var udpTransport = chrome.cast.streaming.udpTransport;
8 var createSession = chrome.cast.streaming.session.create; 8 var createSession = chrome.cast.streaming.session.create;
9 var pass = chrome.test.callbackPass; 9 var pass = chrome.test.callbackPass;
10 10
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 }; 25 };
26 tabCapture.capture(constraints, 26 tabCapture.capture(constraints,
27 pass(function(stream) { 27 pass(function(stream) {
28 chrome.test.assertTrue(!!stream); 28 chrome.test.assertTrue(!!stream);
29 createSession(stream.getAudioTracks()[0], 29 createSession(stream.getAudioTracks()[0],
30 stream.getVideoTracks()[0], 30 stream.getVideoTracks()[0],
31 pass(function(stream, audioId, videoId, udpId) { 31 pass(function(stream, audioId, videoId, udpId) {
32 var audioParams = rtpStream.getSupportedParams(audioId)[0]; 32 var audioParams = rtpStream.getSupportedParams(audioId)[0];
33 var videoParams = rtpStream.getSupportedParams(videoId)[0]; 33 var videoParams = rtpStream.getSupportedParams(videoId)[0];
34 rtpStream.onError.addListener(
35 pass(function(audioId, videoId, id, msg) {
36 chrome.test.assertEq(videoId, id);
37 rtpStream.destroy(audioId);
38 rtpStream.destroy(videoId);
39 udpTransport.destroy(udpId);
40 console.log(msg);
41 }.bind(null, audioId, videoId)));
42 // Specify invalid value to trigger error. 34 // Specify invalid value to trigger error.
43 videoParams.payload.codecName = "Animated WebP"; 35 videoParams.payload.codecName = "Animated WebP";
44 udpTransport.setDestination(udpId, 36 udpTransport.setDestination(udpId,
45 {address: "127.0.0.1", port: 2344}); 37 {address: "127.0.0.1", port: 2344});
46 rtpStream.start(videoId, videoParams); 38 try {
39 rtpStream.start(videoId, videoParams);
40 chrome.test.fail();
41 } catch (e) {
42 rtpStream.stop(audioId);
43 rtpStream.stop(videoId);
44 rtpStream.destroy(audioId);
45 rtpStream.destroy(videoId);
46 udpTransport.destroy(udpId);
47 chrome.test.succeed();
48 }
47 }.bind(null, stream))); 49 }.bind(null, stream)));
48 })); 50 }));
49 }, 51 },
50 ]); 52 ]);
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_session_delegate.cc ('k') | media/cast/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698