зеркало из https://github.com/mozilla/gecko-dev.git
Bug 943198 - Follow-up of bug 814637: enable new marionette tests of IccManager. r=hsinyi
This commit is contained in:
Родитель
89e2fbba42
Коммит
2c9697303d
|
@ -24,6 +24,4 @@ qemu = true
|
|||
[test_stk_setup_idle_mode_text.js]
|
||||
[test_stk_bip_command.js]
|
||||
[test_icc_access_invalid_object.js]
|
||||
disabled = Bug 933654
|
||||
[test_icc_detected_undetected_event.js]
|
||||
disabled = Bug 933654
|
||||
|
|
|
@ -5,25 +5,18 @@ MARIONETTE_TIMEOUT = 30000;
|
|||
MARIONETTE_HEAD_JS = "icc_header.js";
|
||||
|
||||
function setRadioEnabled(enabled) {
|
||||
SpecialPowers.addPermission("settings-write", true, document);
|
||||
let connection = navigator.mozMobileConnections[0];
|
||||
ok(connection);
|
||||
|
||||
// TODO: Bug 856553 - [B2G] RIL: need an API to enable/disable radio
|
||||
let settings = navigator.mozSettings;
|
||||
let setLock = settings.createLock();
|
||||
let obj = {
|
||||
"ril.radio.disabled": !enabled
|
||||
let request = connection.setRadioEnabled(enabled);
|
||||
|
||||
request.onsuccess = function onsuccess() {
|
||||
log('setRadioEnabled: ' + enabled);
|
||||
};
|
||||
let setReq = setLock.set(obj);
|
||||
|
||||
setReq.addEventListener("success", function onSetSuccess() {
|
||||
log("set 'ril.radio.disabled' to " + enabled);
|
||||
});
|
||||
|
||||
setReq.addEventListener("error", function onSetError() {
|
||||
ok(false, "cannot set 'ril.radio.disabled' to " + enabled);
|
||||
});
|
||||
|
||||
SpecialPowers.removePermission("settings-write", document);
|
||||
request.onerror = function onerror() {
|
||||
ok(false, "setRadioEnabled should be ok");
|
||||
};
|
||||
}
|
||||
|
||||
/* Test access invalid icc object */
|
||||
|
|
|
@ -5,25 +5,18 @@ MARIONETTE_TIMEOUT = 30000;
|
|||
MARIONETTE_HEAD_JS = "icc_header.js";
|
||||
|
||||
function setRadioEnabled(enabled) {
|
||||
SpecialPowers.addPermission("settings-write", true, document);
|
||||
let connection = navigator.mozMobileConnections[0];
|
||||
ok(connection);
|
||||
|
||||
// TODO: Bug 856553 - [B2G] RIL: need an API to enable/disable radio
|
||||
let settings = navigator.mozSettings;
|
||||
let setLock = settings.createLock();
|
||||
let obj = {
|
||||
"ril.radio.disabled": !enabled
|
||||
let request = connection.setRadioEnabled(enabled);
|
||||
|
||||
request.onsuccess = function onsuccess() {
|
||||
log('setRadioEnabled: ' + enabled);
|
||||
};
|
||||
let setReq = setLock.set(obj);
|
||||
|
||||
setReq.addEventListener("success", function onSetSuccess() {
|
||||
log("set 'ril.radio.disabled' to " + enabled);
|
||||
});
|
||||
|
||||
setReq.addEventListener("error", function onSetError() {
|
||||
ok(false, "cannot set 'ril.radio.disabled' to " + enabled);
|
||||
});
|
||||
|
||||
SpecialPowers.removePermission("settings-write", document);
|
||||
request.onerror = function onerror() {
|
||||
ok(false, "setRadioEnabled should be ok");
|
||||
};
|
||||
}
|
||||
|
||||
/* Test iccundetected event */
|
||||
|
|
Загрузка…
Ссылка в новой задаче