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

Unified Diff: chrome/test/data/extensions/api_test/cast_streaming/stop_no_start.js

Issue 281333002: Stop cast streaming API without start (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « chrome/test/data/extensions/api_test/cast_streaming/stop_no_start.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
}));
},
« no previous file with comments | « chrome/test/data/extensions/api_test/cast_streaming/stop_no_start.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698