Author: ygrego Date: 2015-06-12 12:37:33 +0000 (Fri, 12 Jun 2015) New Revision: 1708 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1708 Log: Don't blocked the tuner by severals creations of VideoBroadcastObject. Modified: oipf/test/js/TestConfig.js Modified: oipf/test/js/TestConfig.js =================================================================== --- oipf/test/js/TestConfig.js 2015-06-12 11:51:07 UTC (rev 1707) +++ oipf/test/js/TestConfig.js 2015-06-12 12:37:33 UTC (rev 1708) @@ -146,73 +146,21 @@ constructor() { super(); - - this.startEndStates = { - "00": "unrealizedToUnrealized", - "01": "unrealizedToConnecting", - "12": "connectingToPresenting", - "33": "stopToStop", - "nullnull": "noStatesDefined" - }; - this.searchManagerObj = oipfObjectFactory.createSearchManagerObject(); - } + this.createVideoBroadcastObject(); - beforeTest(resolve, reject) { - this.beforeTest(resolve, reject); - this.cancel = true; - } - - noStatesDefined(begin, end, callback) { - this.reject("Untestable Case."); - } - - unrealizedToConnecting(begin, end, callback) { - if (callback) { - throw "Untestable Case."; - } - } - - connectingToPresenting(begin, end, callback) { - /* - * Avoid that the future transition C->P be canceled. - * More extend super method beforeTest in order to reset - * 'startEndStates' property. + /*The VideoBroadcastObject must be created on TV only one time if the TV own only one tuner + *because this one block this tuner. */ - - if (this.cancel) { - callback && this.timeout().then(callback).then(console.log.bind(console, "TOTO")); - this.cancel = false; - } else { - this.pushTransition(begin, end, callback, null); - } + this.createVideoBroadcastObject = function() {}; + console.log(this.createVideoBroadcastObject); } - pushTransition(begin, end, callback, error) { - this.transitions.push({ - begin: begin, - end: end, - error: error, - callback: callback - }); - } - - pushTransitionWithError(begin, end, callback, error) { - var method = this.startEndStates["" + begin + end]; - if (method) { - this[method].call(this, begin, end, callback); - } else { - this.pushTransition(begin, end, callback, error); + addTransition(begin, end, callback) { + if (begin + end == 3) { + callback && callback(); } } - - addTransition(begin, end, callback) { - this.addTransitionWithError(begin, end, callback, null); - } - - addTransitionWithError(begin, end, callback, error) { - this.pushTransitionWithError(begin, end, callback, error); - } }; console.log("SearchManagerTest class redefined.");
participants (1)
-
ygregoï¼ users.nuiton.org