Author: ygrego Date: 2015-06-18 08:09:18 +0000 (Thu, 18 Jun 2015) New Revision: 1745 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1745 Log: Make the concerned test success. Modified: oipf/test/js/ConfigurationTest.js Modified: oipf/test/js/ConfigurationTest.js =================================================================== --- oipf/test/js/ConfigurationTest.js 2015-06-18 08:07:22 UTC (rev 1744) +++ oipf/test/js/ConfigurationTest.js 2015-06-18 08:09:18 UTC (rev 1745) @@ -156,14 +156,18 @@ } testSetPowerState(resolve, reject) { + var self = this - if (this.localSystem) { - var result = this.localSystem.setPowerState(); - if (result) { + this.localSystem.onPowerStateChange = function(state) { + if (self.result && state == 1) { resolve(); } else { - throw new Error("Unexpected error"); + reject(); } + }; + + if (this.localSystem) { + this.result = this.localSystem.setPowerState(1); } else { throw new Error("Unexpected error"); }
participants (1)
-
ygregoï¼ users.nuiton.org