Bug 883798 - B2G SMS: test cases should initialize all necessary preferences and/or settings. r=gene

This commit is contained in:
Vicamo Yang 2013-06-19 10:18:39 +08:00
parent 4ce1fd67de
commit f6bdbb0191
3 changed files with 9 additions and 2 deletions

View File

@ -4,6 +4,7 @@
MARIONETTE_TIMEOUT = 60000;
SpecialPowers.setBoolPref("dom.sms.enabled", true);
SpecialPowers.setBoolPref("dom.sms.requestStatusReport", true);
SpecialPowers.addPermission("sms", true, document);
const REMOTE = "5559997777"; // the remote number
@ -213,7 +214,9 @@ function deleteMsgs() {
function cleanUp() {
sms.onreceived = null;
SpecialPowers.removePermission("sms", document);
SpecialPowers.setBoolPref("dom.sms.enabled", false);
SpecialPowers.clearUserPref("dom.sms.enabled", false);
SpecialPowers.clearUserPref("dom.sms.requestStatusReport");
finish();
}

View File

@ -5,6 +5,7 @@ MARIONETTE_TIMEOUT = 60000;
SpecialPowers.setBoolPref("dom.sms.enabled", true);
SpecialPowers.setBoolPref("dom.sms.strict7BitEncoding", false);
SpecialPowers.setBoolPref("dom.sms.requestStatusReport", true);
SpecialPowers.addPermission("sms", true, document);
const SENDER = "15555215554"; // the emulator's number
@ -185,6 +186,7 @@ function cleanUp() {
SpecialPowers.removePermission("sms", document);
SpecialPowers.clearUserPref("dom.sms.enabled");
SpecialPowers.clearUserPref("dom.sms.strict7BitEncoding");
SpecialPowers.clearUserPref("dom.sms.requestStatusReport");
finish();
}

View File

@ -4,6 +4,7 @@
MARIONETTE_TIMEOUT = 60000;
SpecialPowers.setBoolPref("dom.sms.enabled", true);
SpecialPowers.setBoolPref("dom.sms.requestStatusReport", true);
SpecialPowers.addPermission("sms", true, document);
const SENDER = "15555215554"; // the emulator's number
@ -152,7 +153,8 @@ function verifySmsDeleted(smsId) {
function cleanUp() {
sms.onsent = null;
SpecialPowers.removePermission("sms", document);
SpecialPowers.setBoolPref("dom.sms.enabled", false);
SpecialPowers.clearUserPref("dom.sms.enabled", false);
SpecialPowers.clearUserPref("dom.sms.requestStatusReport");
finish();
}