Author: ygrego Date: 2015-04-02 08:39:14 +0000 (Thu, 02 Apr 2015) New Revision: 1045 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1045 Log: In this test case ("testPrevChannelInUnrealized") the video-broadcast don't has to reveive events. The method "addTransition" is called and "onChannelChangeSucceded" implemented, but none of them will be called. A timer is set in order to validate the test if none method called. New properties "timerManager" and "timeout" have been added. Modified: oipf/js/test/VideoBroadcastTest.js Modified: oipf/js/test/VideoBroadcastTest.js =================================================================== --- oipf/js/test/VideoBroadcastTest.js 2015-04-02 07:59:59 UTC (rev 1044) +++ oipf/js/test/VideoBroadcastTest.js 2015-04-02 08:39:14 UTC (rev 1045) @@ -47,6 +47,8 @@ this.previousState = this.vidBroadObj.playState; this.currentIndex = 0; this.channel = null; + this.timerManager = new TimerManager(); + this.timeout = this.timerManager.createTimer.bind(this.timerManager); logTest("State: Pending"); }, @@ -238,7 +240,14 @@ }, testPrevChannelInUnrealized: function(resolve, reject) { + this.addTransition(null, null, reject); + this.vidBroadObj.onChannelChangeSucceeded = function(channel) { + reject(); + }; this.vidBroadObj.prevChannel(); + this.timeout(3000) + .then(resolve); + }, testPrevChannelInConnecting: function(resolve, reject) {
participants (1)
-
ygregoï¼ users.nuiton.org