зеркало из https://github.com/mozilla/gecko-dev.git
Bug 889215 - Fix xpcshell-test test_ril_worker_mmi.js. r=yoshi.
--- dom/system/gonk/tests/test_ril_worker_mmi.js | 47 +++++++++++++------------- 1 file changed, 23 insertions(+), 24 deletions(-)
This commit is contained in:
Родитель
5b73841eef
Коммит
f2a0e876b3
|
@ -305,25 +305,25 @@ add_test(function test_parseMMI_erasure() {
|
|||
*/
|
||||
|
||||
add_test(function test_sendMMI_empty() {
|
||||
testSendMMI("", "NO_VALID_MMI_STRING");
|
||||
testSendMMI("", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_undefined() {
|
||||
testSendMMI({}, "NO_VALID_MMI_STRING");
|
||||
testSendMMI({}, MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_invalid() {
|
||||
testSendMMI("**", "NO_VALID_MMI_STRING");
|
||||
testSendMMI("**", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_dial_string() {
|
||||
testSendMMI("123", "NO_VALID_MMI_STRING");
|
||||
testSendMMI("123", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
@ -417,8 +417,7 @@ add_test(function test_sendMMI_call_forwarding_interrogation_no_rules() {
|
|||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
|
||||
do_check_eq(postedMessage.errorMsg,
|
||||
"Invalid rule length while querying call forwarding status.");
|
||||
do_check_eq(postedMessage.errorMsg, GECKO_ERROR_GENERIC_FAILURE);
|
||||
do_check_false(postedMessage.success);
|
||||
|
||||
run_next_test();
|
||||
|
@ -488,25 +487,25 @@ add_test(function test_sendMMI_change_PIN() {
|
|||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN_no_new_PIN() {
|
||||
testSendMMI("**04*1234**4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**04*1234**4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN_no_old_PIN() {
|
||||
testSendMMI("**04**1234*4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**04**1234*4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN_wrong_procedure() {
|
||||
testSendMMI("*04*1234*4567*4567#", "WRONG_MMI_PROCEDURE");
|
||||
testSendMMI("*04*1234*4567*4567#", MMI_ERROR_KS_INVALID_ACTION);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN_new_PIN_mismatch() {
|
||||
testSendMMI("**04*4567*1234*4567#", "NEW_PIN_MISMATCH");
|
||||
testSendMMI("**04*4567*1234*4567#", MMI_ERROR_KS_MISMATCH_PIN);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
@ -532,25 +531,25 @@ add_test(function test_sendMMI_change_PIN2() {
|
|||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN2_no_new_PIN2() {
|
||||
testSendMMI("**042*1234**4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**042*1234**4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN2_no_old_PIN2() {
|
||||
testSendMMI("**042**1234*4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**042**1234*4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN2_wrong_procedure() {
|
||||
testSendMMI("*042*1234*4567*4567#", "WRONG_MMI_PROCEDURE");
|
||||
testSendMMI("*042*1234*4567*4567#", MMI_ERROR_KS_INVALID_ACTION);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_change_PIN2_new_PIN2_mismatch() {
|
||||
testSendMMI("**042*4567*1234*4567#", "NEW_PIN_MISMATCH");
|
||||
testSendMMI("**042*4567*1234*4567#", MMI_ERROR_KS_MISMATCH_PIN);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
@ -576,25 +575,25 @@ add_test(function test_sendMMI_unblock_PIN() {
|
|||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN_no_new_PIN() {
|
||||
testSendMMI("**05*1234**4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**05*1234**4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN_no_PUK() {
|
||||
testSendMMI("**05**1234*4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**05**1234*4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN_wrong_procedure() {
|
||||
testSendMMI("*05*1234*4567*4567#", "WRONG_MMI_PROCEDURE");
|
||||
testSendMMI("*05*1234*4567*4567#", MMI_ERROR_KS_INVALID_ACTION);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN_new_PIN_mismatch() {
|
||||
testSendMMI("**05*4567*1234*4567#", "NEW_PIN_MISMATCH");
|
||||
testSendMMI("**05*4567*1234*4567#", MMI_ERROR_KS_MISMATCH_PIN);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
@ -620,25 +619,25 @@ add_test(function test_sendMMI_unblock_PIN2() {
|
|||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN2_no_new_PIN2() {
|
||||
testSendMMI("**052*1234**4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**052*1234**4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN2_no_PUK2() {
|
||||
testSendMMI("**052**1234*4567#", "MISSING_SUPPLEMENTARY_INFORMATION");
|
||||
testSendMMI("**052**1234*4567#", MMI_ERROR_KS_ERROR);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN2_wrong_procedure() {
|
||||
testSendMMI("*052*1234*4567*4567#", "WRONG_MMI_PROCEDURE");
|
||||
testSendMMI("*052*1234*4567*4567#", MMI_ERROR_KS_INVALID_ACTION);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_unblock_PIN2_new_PIN_mismatch() {
|
||||
testSendMMI("**052*4567*1234*4567#", "NEW_PIN_MISMATCH");
|
||||
testSendMMI("**052*4567*1234*4567#", MMI_ERROR_KS_MISMATCH_PIN);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
@ -690,13 +689,13 @@ add_test(function test_sendMMI_get_IMEI_error() {
|
|||
});
|
||||
|
||||
add_test(function test_sendMMI_call_barring() {
|
||||
testSendMMI("*33#", "CALL_BARRING_NOT_SUPPORTED_VIA_MMI");
|
||||
testSendMMI("*33#", MMI_ERROR_KS_NOT_SUPPORTED);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_sendMMI_call_waiting() {
|
||||
testSendMMI("*43#", "CALL_WAITING_NOT_SUPPORTED_VIA_MMI");
|
||||
testSendMMI("*43#", MMI_ERROR_KS_NOT_SUPPORTED);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче