OLD | NEW |
---|---|
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 27 matching lines...) Expand all Loading... | |
38 pass(function(stream, audioId, videoId, udpId) { | 38 pass(function(stream, audioId, videoId, udpId) { |
39 chrome.test.assertTrue(audioId == null); | 39 chrome.test.assertTrue(audioId == null); |
40 chrome.test.assertTrue(videoId > 0); | 40 chrome.test.assertTrue(videoId > 0); |
41 chrome.test.assertTrue(udpId > 0); | 41 chrome.test.assertTrue(udpId > 0); |
42 rtpStream.destroy(videoId); | 42 rtpStream.destroy(videoId); |
43 udpTransport.destroy(udpId); | 43 udpTransport.destroy(udpId); |
44 }.bind(null, stream))); | 44 }.bind(null, stream))); |
45 })); | 45 })); |
46 })); | 46 })); |
47 }, | 47 }, |
48 function noStream() { | 48 function noStream() { |
miu
2016/09/02 21:32:40
Let's rename this to something like "remotingSessi
xjz
2016/09/02 22:00:10
Done.
| |
49 console.log("[TEST] noAudio"); | 49 console.log("[TEST] noAudio"); |
miu
2016/09/02 21:32:40
...and update the logging string here.
xjz
2016/09/02 22:00:10
Done.
| |
50 chrome.tabs.create({"url": "about:blank"}, pass(function(tab) { | 50 chrome.tabs.create({"url": "about:blank"}, pass(function(tab) { |
51 try { | 51 createSession(null, null, function(a, b, c) {}); |
52 createSession(null, null, function(a, b, c) {}); | |
53 chrome.test.fail(); | |
54 } catch (e) { | |
55 // Success. | |
56 } | |
57 })); | 52 })); |
58 }, | 53 }, |
59 ]); | 54 ]); |
OLD | NEW |