| Index: chrome/test/data/extensions/api_test/cast_streaming/stop_no_start.js
|
| diff --git a/chrome/test/data/extensions/api_test/cast_streaming/destination_not_set.js b/chrome/test/data/extensions/api_test/cast_streaming/stop_no_start.js
|
| similarity index 50%
|
| copy from chrome/test/data/extensions/api_test/cast_streaming/destination_not_set.js
|
| copy to chrome/test/data/extensions/api_test/cast_streaming/stop_no_start.js
|
| index f14810726f0a2a252b06ec5ff80ac9d9b47f471b..9ff2010fcfbf15606d179c2d4adfa048caa0941c 100644
|
| --- a/chrome/test/data/extensions/api_test/cast_streaming/destination_not_set.js
|
| +++ b/chrome/test/data/extensions/api_test/cast_streaming/stop_no_start.js
|
| @@ -9,8 +9,8 @@ var createSession = chrome.cast.streaming.session.create;
|
| var pass = chrome.test.callbackPass;
|
|
|
| chrome.test.runTests([
|
| - function rtpStreamStart() {
|
| - console.log("[TEST] rtpStreamStart");
|
| + function stopNoStart() {
|
| + console.log("[TEST] stopNoStart");
|
| tabCapture.capture({audio: true, video: true},
|
| pass(function(stream) {
|
| console.log("Got MediaStream.");
|
| @@ -18,20 +18,15 @@ chrome.test.runTests([
|
| createSession(stream.getAudioTracks()[0],
|
| stream.getVideoTracks()[0],
|
| pass(function(stream, audioId, videoId, udpId) {
|
| - console.log("Starting.");
|
| - var stateMachine = new TestStateMachine(stream,
|
| - audioId,
|
| - videoId,
|
| - udpId);
|
| - var audioParams = rtpStream.getSupportedParams(audioId)[0];
|
| - chrome.test.assertEq(audioParams.payload.codecName, "OPUS");
|
| - var expectError = function(id, message) {
|
| - chrome.test.assertEq("Destination not set.", message);
|
| - chrome.test.succeed();
|
| - }
|
| - console.log("Starting RTP stream before setting destination.");
|
| - rtpStream.onError.addListener(expectError);
|
| - rtpStream.start(audioId, audioParams);
|
| + chrome.test.assertTrue(audioId > 0);
|
| + chrome.test.assertTrue(videoId > 0);
|
| + chrome.test.assertTrue(udpId > 0);
|
| + rtpStream.stop(audioId);
|
| + rtpStream.stop(videoId);
|
| + rtpStream.destroy(audioId);
|
| + rtpStream.destroy(videoId);
|
| + udpTransport.destroy(udpId);
|
| + chrome.test.succeed();
|
| }.bind(null, stream)));
|
| }));
|
| },
|
|
|