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

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

Issue 583353003: Cast: missing transport ID in setOptions API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 years, 2 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/resources/extensions/cast_streaming_udp_transport_custom_bindings.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 12 matching lines...) Expand all
23 chrome.test.assertTrue(udpId > 0); 23 chrome.test.assertTrue(udpId > 0);
24 console.log("Starting."); 24 console.log("Starting.");
25 var stateMachine = new TestStateMachine(stream, 25 var stateMachine = new TestStateMachine(stream,
26 audioId, 26 audioId,
27 videoId, 27 videoId,
28 udpId); 28 udpId);
29 var audioParams = rtpStream.getSupportedParams(audioId)[0]; 29 var audioParams = rtpStream.getSupportedParams(audioId)[0];
30 var videoParams = rtpStream.getSupportedParams(videoId)[0]; 30 var videoParams = rtpStream.getSupportedParams(videoId)[0];
31 chrome.test.assertTrue(!!audioParams.payload.codecName); 31 chrome.test.assertTrue(!!audioParams.payload.codecName);
32 chrome.test.assertTrue(!!videoParams.payload.codecName); 32 chrome.test.assertTrue(!!videoParams.payload.codecName);
33 udpTransport.setOptions(udpId, {DSCP: true});
33 udpTransport.setDestination(udpId, 34 udpTransport.setDestination(udpId,
34 {address: "127.0.0.1", port: 2344}); 35 {address: "127.0.0.1", port: 2344});
35 rtpStream.onStarted.addListener( 36 rtpStream.onStarted.addListener(
36 stateMachine.onStarted.bind(stateMachine)); 37 stateMachine.onStarted.bind(stateMachine));
37 stateMachine.onAllStarted = 38 stateMachine.onAllStarted =
38 pass(function(audioId, videoId) { 39 pass(function(audioId, videoId) {
39 console.log("Enabling logging."); 40 console.log("Enabling logging.");
40 rtpStream.toggleLogging(audioId, true); 41 rtpStream.toggleLogging(audioId, true);
41 rtpStream.toggleLogging(videoId, true); 42 rtpStream.toggleLogging(videoId, true);
42 console.log("Stopping."); 43 console.log("Stopping.");
(...skipping 23 matching lines...) Expand all
66 chrome.test.assertTrue(!!audioParams.payload.codecName); 67 chrome.test.assertTrue(!!audioParams.payload.codecName);
67 chrome.test.assertTrue(!!videoParams.payload.codecName); 68 chrome.test.assertTrue(!!videoParams.payload.codecName);
68 chrome.test.succeed(); 69 chrome.test.succeed();
69 }.bind(null, stream, audioId, videoId, udpId)); 70 }.bind(null, stream, audioId, videoId, udpId));
70 rtpStream.start(audioId, audioParams); 71 rtpStream.start(audioId, audioParams);
71 rtpStream.start(videoId, videoParams); 72 rtpStream.start(videoId, videoParams);
72 }.bind(null, stream))); 73 }.bind(null, stream)));
73 })); 74 }));
74 }, 75 },
75 ]); 76 ]);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/cast_streaming_udp_transport_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698