mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 14:30:43 +00:00
Bug 916000 - Part2: Add sim state xpcshell test case. r=yoshi
This commit is contained in:
parent
abd0c8cd26
commit
514b3633dc
@ -1665,6 +1665,42 @@ add_test(function test_personalization_state() {
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
/**
|
||||
* Verify SIM app_state in _processICCStatus
|
||||
*/
|
||||
add_test(function test_card_app_state() {
|
||||
let worker = newUint8Worker();
|
||||
let ril = worker.RIL;
|
||||
|
||||
function testCardAppState(cardAppState, geckoCardState) {
|
||||
let iccStatus = {
|
||||
gsmUmtsSubscriptionAppIndex: 0,
|
||||
apps: [
|
||||
{
|
||||
app_state: cardAppState
|
||||
}],
|
||||
};
|
||||
|
||||
ril._processICCStatus(iccStatus);
|
||||
do_check_eq(ril.cardState, geckoCardState);
|
||||
}
|
||||
|
||||
testCardAppState(CARD_APPSTATE_ILLEGAL,
|
||||
GECKO_CARDSTATE_ILLEGAL);
|
||||
testCardAppState(CARD_APPSTATE_PIN,
|
||||
GECKO_CARDSTATE_PIN_REQUIRED);
|
||||
testCardAppState(CARD_APPSTATE_PUK,
|
||||
GECKO_CARDSTATE_PUK_REQUIRED);
|
||||
testCardAppState(CARD_APPSTATE_READY,
|
||||
GECKO_CARDSTATE_READY);
|
||||
testCardAppState(CARD_APPSTATE_UNKNOWN,
|
||||
GECKO_CARDSTATE_UNKNOWN);
|
||||
testCardAppState(CARD_APPSTATE_DETECTED,
|
||||
GECKO_CARDSTATE_UNKNOWN);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
/**
|
||||
* Verify iccSetCardLock - Facility Lock.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user