Author: ygrego Date: 2015-04-01 13:46:13 +0000 (Wed, 01 Apr 2015) New Revision: 1021 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1021 Log: Call of method "setChannel" after PRESENTING state in second transition. And the final transition, take resolve as callback. Modified: oipf/js/test/VideoBroadcastTest.js Modified: oipf/js/test/VideoBroadcastTest.js =================================================================== --- oipf/js/test/VideoBroadcastTest.js 2015-04-01 13:41:10 UTC (rev 1020) +++ oipf/js/test/VideoBroadcastTest.js 2015-04-01 13:46:13 UTC (rev 1021) @@ -735,21 +735,15 @@ testSetChannelInPresentingWithNull: function(resolve, reject) { var self = this; - this.addTransition(this.PRESENTING, this.CONNECTING); - this.addTransition(this.CONNECTING, this.PRESENTING); - - this.vidBroadObj.onChannelChangeSucceeded = function(channel) { + this.addTransition(this.UNREALIZED, this.CONNECTING); - if (self.assertNotNull(channel) && self.assertEquals(self.vidBroadObj.playState, self.PRESENTING)) { - logTest("State: Successful"); - resolve("Success"); - } else { - logTest("State: Failure"); - reject("Failure : The channel is null for a unknown reason or wrong play state."); - } - }; + this.addTransition(this.CONNECTING, this.PRESENTING, function() { + self.vidBroadObj.setChannel(null); + }); - this.vidBroadObj.setChannel(null); + this.addTransition(this.PRESENTING, this.UNREALIZED, resolve); + + this.vidBroadObj.bindToCurrentChannel(); },
participants (1)
-
ygregoï¼ users.nuiton.org