Author: ygrego Date: 2015-06-11 13:21:12 +0000 (Thu, 11 Jun 2015) New Revision: 1700 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1700 Log: These modifications are necessary in order to the classes 'RecordingSchedulerTest' and 'SearchManagerTest' can be redefined. Modified: oipf/test/js/RecordingSchedulerTest.js oipf/test/js/SearchManagerTest.js oipf/test/js/TestConfig.js Modified: oipf/test/js/RecordingSchedulerTest.js =================================================================== --- oipf/test/js/RecordingSchedulerTest.js 2015-06-11 13:08:57 UTC (rev 1699) +++ oipf/test/js/RecordingSchedulerTest.js 2015-06-11 13:21:12 UTC (rev 1700) @@ -4,7 +4,7 @@ * and open the template in the editor. */ -class RecordingSchedulerTest extends TestCase { +var RecordingSchedulerTest = class extends TestCase { constructor() { super(); @@ -532,6 +532,6 @@ this.transitions = []; this.previousState = null; } -} +}; Modified: oipf/test/js/SearchManagerTest.js =================================================================== --- oipf/test/js/SearchManagerTest.js 2015-06-11 13:08:57 UTC (rev 1699) +++ oipf/test/js/SearchManagerTest.js 2015-06-11 13:21:12 UTC (rev 1700) @@ -3,7 +3,7 @@ * This class gather a set of method necessary to test a search manager object. * */ -class SearchManagerTest extends TestCase { +var SearchManagerTest = class extends TestCase { constructor() { super(); @@ -682,4 +682,4 @@ this.vidBroadObj.bindToCurrentChannel(); } -} +}; Modified: oipf/test/js/TestConfig.js =================================================================== --- oipf/test/js/TestConfig.js 2015-06-11 13:08:57 UTC (rev 1699) +++ oipf/test/js/TestConfig.js 2015-06-11 13:21:12 UTC (rev 1700) @@ -28,7 +28,7 @@ constructor() { super(); - + console.log("VideoBroadcastManager constructor"); this.startEndStates = { "00": "unrealizedToUnrealized", @@ -69,11 +69,12 @@ } connectingToPresenting(begin, end, callback) { - /** + /* * Avoid that the future transition C->P be canceled. * More extend super method beforeTest in order to reset * 'startEndStates' property. */ + if (this.cancel) { callback && this.timeout().then(callback).then(console.log.bind(console, "TOTO")); this.cancel = false; @@ -120,21 +121,24 @@ this.pushTransitionWithError(begin, end, callback, error); } } + console.log("VideoBroadcastManager class defined."); - class VideoBroadcastTest extends VideoBroadcastManager { + var VideoBroadcastTest = class extends VideoBroadcastManager { constructor() { super(); } - } + }; - class SearchManagerTest extends SearchManagerTest { + console.log("VideoBroadcastTest class redefined."); + var SearchManagerTest = class extends SearchManagerTest { + constructor() { super(); - startEndStates = { + this.startEndStates = { "00": "unrealizedToUnrealized", "01": "unrealizedToConnecting", "12": "connectingToPresenting", @@ -161,11 +165,12 @@ } connectingToPresenting(begin, end, callback) { - /** + /* * Avoid that the future transition C->P be canceled. * More extend super method beforeTest in order to reset * 'startEndStates' property. */ + if (this.cancel) { callback && this.timeout().then(callback).then(console.log.bind(console, "TOTO")); this.cancel = false; @@ -199,9 +204,10 @@ addTransitionWithError(begin, end, callback, error) { this.pushTransitionWithError(begin, end, callback, error); } - } + }; + console.log("SearchManagerTest class redefined."); - class RecordingSchedulerTest extends RecordingSchedulerTest { + var RecordingSchedulerTest = class extends RecordingSchedulerTest { constructor() { super(); @@ -225,6 +231,7 @@ this.beforeTest(resolve, reject); } - } + }; + console.log("RecordingSchedulerTest class redefined."); }