2015-08-19 01:28:01 +03:00
|
|
|
function specialPowersLock(orientation) {
|
2016-11-18 11:33:33 +03:00
|
|
|
return SpecialPowers.pushPrefEnv({
|
|
|
|
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
|
|
|
|
}).then(function() => {
|
|
|
|
var p = screen.orientation.lock(orientation);
|
2015-08-19 01:28:01 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function specialPowersUnlock() {
|
2016-11-18 11:33:33 +03:00
|
|
|
return SpecialPowers.pushPrefEnv({
|
|
|
|
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
|
|
|
|
}).then(function() {
|
|
|
|
screen.orientation.unlock();
|
|
|
|
resolve();
|
2015-08-19 01:28:01 +03:00
|
|
|
});
|
|
|
|
}
|