Bug 1243431 - [5.2] Enable vibration permission for tests. r=bz

This commit is contained in:
Eugen Sawin 2016-04-29 15:43:51 +02:00
Родитель 17fe5573bf
Коммит b209b679de
1 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -73,14 +73,19 @@ function tests(aEnabled) {
SimpleTest.finish();
}
// Test with the vibrator pref enabled.
SpecialPowers.pushPrefEnv({"set": [['dom.vibrator.enabled', true]]}, function() {
tests(true);
SpecialPowers.pushPrefEnv({"set": [['dom.vibrator.enabled', false]]}, tests(false));
});
// Everything should be the same when the vibrator is disabled -- in
// particular, a disabled vibrator shouldn't eat failures we'd otherwise
// observe.
SpecialPowers.pushPermissions([
{type: 'vibration', allow: true, context: document}
], function() {
// Test with the vibrator pref enabled.
SpecialPowers.pushPrefEnv({"set": [['dom.vibrator.enabled', true]]}, function() {
tests(true);
SpecialPowers.pushPrefEnv({"set": [['dom.vibrator.enabled', false]]}, tests(false));
});
// Everything should be the same when the vibrator is disabled -- in
// particular, a disabled vibrator shouldn't eat failures we'd otherwise
// observe.
}
);
</script>
</body>