diff --git a/dom/system/gonk/tests/test_ril_worker_icc_ICCUtilsHelper.js b/dom/system/gonk/tests/test_ril_worker_icc_ICCUtilsHelper.js index 3cd82647dff..86e0bdc1d99 100644 --- a/dom/system/gonk/tests/test_ril_worker_icc_ICCUtilsHelper.js +++ b/dom/system/gonk/tests/test_ril_worker_icc_ICCUtilsHelper.js @@ -189,6 +189,11 @@ add_test(function test_get_network_name_from_icc() { ] }; + // EF_OPL isn't available + ICCUtilsHelper.isICCServiceAvailable = function fakeIsICCServiceAvailable(service) { + return false; + }; + // EF_OPL isn't available and current isn't in HPLMN, testGetNetworkNameFromICC({mcc: "321", mnc: "654", lac: 0x1000}, null); @@ -197,6 +202,11 @@ add_test(function test_get_network_name_from_icc() { testGetNetworkNameFromICC({mcc: "123", mnc: "456", lac: 0x1000}, {longName: "PNN1Long", shortName: "PNN1Short"}); + // EF_OPL is available + ICCUtilsHelper.isICCServiceAvailable = function fakeIsICCServiceAvailable(service) { + return service === "OPL"; + }; + // Set EF_OPL RIL.iccInfoPrivate.OPL = [ { diff --git a/dom/system/gonk/tests/test_ril_worker_mmi.js b/dom/system/gonk/tests/test_ril_worker_mmi.js index 18b311163cc..8ec6ee842f5 100644 --- a/dom/system/gonk/tests/test_ril_worker_mmi.js +++ b/dom/system/gonk/tests/test_ril_worker_mmi.js @@ -14,7 +14,7 @@ function testSendMMI(mmi, error) { do_print("worker.postMessage " + worker.postMessage); - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({rilMessageType: "sendMMI", mmi: mmi}); let postedMessage = workerhelper.postedMessage; @@ -60,7 +60,7 @@ add_test(function test_sendMMI_short_code() { }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "**"}); let postedMessage = workerhelper.postedMessage; @@ -89,7 +89,7 @@ add_test(function test_sendMMI_change_PIN() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "**04*1234*4567*4567#"}); let postedMessage = workerhelper.postedMessage; @@ -135,7 +135,7 @@ add_test(function test_sendMMI_change_PIN2() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "**042*1234*4567*4567#"}); let postedMessage = workerhelper.postedMessage; @@ -181,7 +181,7 @@ add_test(function test_sendMMI_unblock_PIN() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "**05*1234*4567*4567#"}); let postedMessage = workerhelper.postedMessage; @@ -227,7 +227,7 @@ add_test(function test_sendMMI_unblock_PIN2() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "**052*1234*4567*4567#"}); let postedMessage = workerhelper.postedMessage; @@ -327,7 +327,7 @@ add_test(function test_sendMMI_call_barring_BAIC_interrogation_voice() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "*#33#"}); let postedMessage = workerhelper.postedMessage; @@ -357,7 +357,7 @@ add_test(function test_sendMMI_call_barring_BAIC_activation() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "*33#"}); let postedMessage = workerhelper.postedMessage; @@ -385,7 +385,7 @@ add_test(function test_sendMMI_call_barring_BAIC_deactivation() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "#33#"}); let postedMessage = workerhelper.postedMessage; @@ -416,7 +416,7 @@ add_test(function test_sendMMI_USSD() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "*123#"}); let postedMessage = workerhelper.postedMessage; @@ -442,7 +442,7 @@ add_test(function test_sendMMI_USSD_error() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "*123#"}); let postedMessage = workerhelper.postedMessage; @@ -466,7 +466,7 @@ function setCallWaitingSuccess(mmi) { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: mmi}); let postedMessage = workerhelper.postedMessage; @@ -519,7 +519,7 @@ add_test(function test_sendMMI_call_waiting_interrogation() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "*#43#"}); let postedMessage = workerhelper.postedMessage; diff --git a/dom/system/gonk/tests/test_ril_worker_mmi_cf.js b/dom/system/gonk/tests/test_ril_worker_mmi_cf.js index bebdb6e0de1..bcb7aadc989 100644 --- a/dom/system/gonk/tests/test_ril_worker_mmi_cf.js +++ b/dom/system/gonk/tests/test_ril_worker_mmi_cf.js @@ -18,7 +18,7 @@ function setCallForwardSuccess(mmi) { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: mmi}); let postedMessage = workerhelper.postedMessage; @@ -66,7 +66,7 @@ add_test(function test_sendMMI_call_forwarding_interrogation() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "*#21#"}); let postedMessage = workerhelper.postedMessage; @@ -96,7 +96,7 @@ add_test(function test_sendMMI_call_forwarding_interrogation_no_rules() { }); }; - context.RIL.radioState = GECKO_RADIOSTATE_READY; + context.RIL.radioState = GECKO_RADIOSTATE_ENABLED; context.RIL.sendMMI({mmi: "*#21#"}); let postedMessage = workerhelper.postedMessage;