Bug 1242876 - turn on the display before reftest. r=ahalberstadt

This commit is contained in:
Jerry Shih 2016-01-27 18:59:00 +01:00
parent f50db30160
commit 8f5046dca5

View File

@ -49,5 +49,19 @@ setPermissions();
var reftest = {};
Cu.import("chrome://reftest/content/reftest.jsm", reftest);
// Start the reftests
reftest.OnRefTestLoad(win);
// Prevent display off during testing.
navigator.mozPower.screenEnabled = true;
var settingLock = navigator.mozSettings.createLock();
var settingResult = settingLock.set({
'screen.timeout': 0
});
settingResult.onsuccess = function () {
dump("Set screen.time to 0\n");
// Start the reftests
reftest.OnRefTestLoad(win);
}
settingResult.onerror = function () {
dump("Change screen.time failed\n");
// Start the reftests
reftest.OnRefTestLoad(win);
}