Author: ygrego Date: 2015-04-01 14:49:53 +0000 (Wed, 01 Apr 2015) New Revision: 1026 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1026 Log: Addition of method "getChannel", and modification of method "testSetChannelInConnecting" which use this new method. Modified: oipf/js/test/VideoBroadcastTest.js Modified: oipf/js/test/VideoBroadcastTest.js =================================================================== --- oipf/js/test/VideoBroadcastTest.js 2015-04-01 14:34:56 UTC (rev 1025) +++ oipf/js/test/VideoBroadcastTest.js 2015-04-01 14:49:53 UTC (rev 1026) @@ -73,6 +73,12 @@ this.vidBroadObj.removeEventListener("PlayStateChange", this.onPlayStateChange); }, + getChannel: function(channelCollection){ + if (channelCollection.length != 0) { + return channelCollection[0]; + } + return null; + }, /* * * @param {type} resolve @@ -674,6 +680,9 @@ testSetChannelInConnecting: function(resolve, reject) { var self = this; + this.channel = this.getChannel( + this.vidBroadObj.getChannelConfig().channelList); + this.addTransition(this.UNREALIZED, this.CONNECTING, function() { self.vidBroadObj.setChannel(self.channel); });