зеркало из https://github.com/mozilla/gecko-dev.git
Bug 902788 - B2G RIL: Update xpcshell-tests for updating ICC
From 9a0db7c853f2b09b91b28fbd78d950405c6639cb Mon Sep 17 00:00:00 2001 Contact. r=vicamo --- dom/system/gonk/tests/test_ril_worker_icc.js | 84 ++++++++++++++------------ 1 file changed, 47 insertions(+), 37 deletions(-)
This commit is contained in:
Родитель
569441a3b2
Коммит
cd41a2696c
|
@ -1560,44 +1560,55 @@ add_test(function test_update_icc_contact() {
|
|||
contactHelper.updateICCContact(aSimType, aContactType, aContact, aPin2, onsuccess, onerror);
|
||||
}
|
||||
|
||||
let contact = {
|
||||
pbrIndex: 0,
|
||||
recordId: ADN_RECORD_ID,
|
||||
alphaId: "test",
|
||||
number: "123456",
|
||||
email: "test@mail.com",
|
||||
anr: ["+654321"]
|
||||
};
|
||||
let contacts = [
|
||||
{
|
||||
pbrIndex: 0,
|
||||
recordId: ADN_RECORD_ID,
|
||||
alphaId: "test",
|
||||
number: "123456",
|
||||
email: "test@mail.com",
|
||||
anr: ["+654321"]
|
||||
},
|
||||
// a contact without email and anr.
|
||||
{
|
||||
pbrIndex: 0,
|
||||
recordId: ADN_RECORD_ID,
|
||||
alphaId: "test2",
|
||||
number: "123456",
|
||||
}];
|
||||
|
||||
// SIM
|
||||
do_print("Test update SIM adn contacts");
|
||||
do_test(CARD_APPTYPE_SIM, "adn", contact);
|
||||
for (let i = 0; i < contacts.length; i++) {
|
||||
let contact = contacts[i];
|
||||
// SIM
|
||||
do_print("Test update SIM adn contacts");
|
||||
do_test(CARD_APPTYPE_SIM, "adn", contact);
|
||||
|
||||
do_print("Test update SIM fdn contacts");
|
||||
do_test(CARD_APPTYPE_SIM, "fdn", contact, "1234");
|
||||
do_print("Test update SIM fdn contacts");
|
||||
do_test(CARD_APPTYPE_SIM, "fdn", contact, "1234");
|
||||
|
||||
// USIM
|
||||
do_print("Test update USIM adn contacts");
|
||||
do_test(CARD_APPTYPE_USIM, "adn", contact, null, ICC_USIM_TYPE1_TAG);
|
||||
do_test(CARD_APPTYPE_USIM, "adn", contact, null, ICC_USIM_TYPE2_TAG);
|
||||
// USIM
|
||||
do_print("Test update USIM adn contacts");
|
||||
do_test(CARD_APPTYPE_USIM, "adn", contact, null, ICC_USIM_TYPE1_TAG);
|
||||
do_test(CARD_APPTYPE_USIM, "adn", contact, null, ICC_USIM_TYPE2_TAG);
|
||||
|
||||
do_print("Test update USIM fdn contacts");
|
||||
do_test(CARD_APPTYPE_USIM, "fdn", contact, "1234");
|
||||
do_print("Test update USIM fdn contacts");
|
||||
do_test(CARD_APPTYPE_USIM, "fdn", contact, "1234");
|
||||
|
||||
// RUIM
|
||||
do_print("Test update RUIM adn contacts");
|
||||
do_test(CARD_APPTYPE_RUIM, "adn", contact);
|
||||
// RUIM
|
||||
do_print("Test update RUIM adn contacts");
|
||||
do_test(CARD_APPTYPE_RUIM, "adn", contact);
|
||||
|
||||
do_print("Test update RUIM fdn contacts");
|
||||
do_test(CARD_APPTYPE_RUIM, "fdn", contact, "1234");
|
||||
do_print("Test update RUIM fdn contacts");
|
||||
do_test(CARD_APPTYPE_RUIM, "fdn", contact, "1234");
|
||||
|
||||
// RUIM with enhanced phone book
|
||||
do_print("Test update RUIM adn contacts with enhanced phone book");
|
||||
do_test(CARD_APPTYPE_RUIM, "adn", contact, null, ICC_USIM_TYPE1_TAG, true);
|
||||
do_test(CARD_APPTYPE_RUIM, "adn", contact, null, ICC_USIM_TYPE2_TAG, true);
|
||||
// RUIM with enhanced phone book
|
||||
do_print("Test update RUIM adn contacts with enhanced phone book");
|
||||
do_test(CARD_APPTYPE_RUIM, "adn", contact, null, ICC_USIM_TYPE1_TAG, true);
|
||||
do_test(CARD_APPTYPE_RUIM, "adn", contact, null, ICC_USIM_TYPE2_TAG, true);
|
||||
|
||||
do_print("Test update RUIM fdn contacts with enhanced phone book");
|
||||
do_test(CARD_APPTYPE_RUIM, "fdn", contact, "1234", null, true);
|
||||
do_print("Test update RUIM fdn contacts with enhanced phone book");
|
||||
do_test(CARD_APPTYPE_RUIM, "fdn", contact, "1234", null, true);
|
||||
}
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче