From d2cbb41be876281a96261c91cb53065ab1d63272 Mon Sep 17 00:00:00 2001 From: Edgar Chen Date: Mon, 12 May 2014 13:00:14 +0800 Subject: [PATCH] Bug 898445 - Part 7: RIL xpcshell test changes. r=hsinyi --- dom/system/gonk/tests/test_ril_worker_cf.js | 13 ++++++------- dom/system/gonk/tests/test_ril_worker_mmi.js | 5 ++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dom/system/gonk/tests/test_ril_worker_cf.js b/dom/system/gonk/tests/test_ril_worker_cf.js index 81bd61ac956..f3db4f26e34 100644 --- a/dom/system/gonk/tests/test_ril_worker_cf.js +++ b/dom/system/gonk/tests/test_ril_worker_cf.js @@ -83,8 +83,8 @@ add_test(function test_setCallForward_unconditional() { }; context.RIL.setCallForward({ - action: Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_ACTION_REGISTRATION, - reason: Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL, + action: CALL_FORWARD_ACTION_REGISTRATION, + reason: CALL_FORWARD_REASON_UNCONDITIONAL, serviceClass: ICC_SERVICE_CLASS_VOICE, number: "666222333", timeSeconds: 10 @@ -122,7 +122,7 @@ add_test(function test_queryCallForwardStatus_unconditional() { 0, // rules.timeSeconds 145, // rules.toa 49, // rules.serviceClass - Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL, // rules.reason + CALL_FORWARD_REASON_UNCONDITIONAL, // rules.reason 1, // rules.active 1 // rulesLength ]; @@ -132,8 +132,8 @@ add_test(function test_queryCallForwardStatus_unconditional() { }; context.RIL.queryCallForwardStatus({ - action: Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_ACTION_QUERY_STATUS, - reason: Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL, + action: CALL_FORWARD_ACTION_QUERY_STATUS, + reason: CALL_FORWARD_REASON_UNCONDITIONAL, serviceClass: ICC_SERVICE_CLASS_VOICE, number: "666222333", timeSeconds: 10 @@ -147,8 +147,7 @@ add_test(function test_queryCallForwardStatus_unconditional() { do_print(postedMessage.rules.length); do_check_eq(postedMessage.rules.length, 1); do_check_true(postedMessage.rules[0].active); - do_check_eq(postedMessage.rules[0].reason, - Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL); + do_check_eq(postedMessage.rules[0].reason, CALL_FORWARD_REASON_UNCONDITIONAL); do_check_eq(postedMessage.rules[0].number, "+34666222333"); run_next_test(); }); diff --git a/dom/system/gonk/tests/test_ril_worker_mmi.js b/dom/system/gonk/tests/test_ril_worker_mmi.js index af9e13e4016..00d9b6a1c95 100644 --- a/dom/system/gonk/tests/test_ril_worker_mmi.js +++ b/dom/system/gonk/tests/test_ril_worker_mmi.js @@ -453,7 +453,7 @@ add_test(function test_sendMMI_call_forwarding_interrogation() { 0, // rules.timeSeconds 145, // rules.toa 49, // rules.serviceClass - Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL, // rules.reason + CALL_FORWARD_REASON_UNCONDITIONAL, // rules.reason 1, // rules.active 1 // rulesLength ]; @@ -472,8 +472,7 @@ add_test(function test_sendMMI_call_forwarding_interrogation() { do_check_true(Array.isArray(postedMessage.rules)); do_check_eq(postedMessage.rules.length, 1); do_check_true(postedMessage.rules[0].active); - do_check_eq(postedMessage.rules[0].reason, - Ci.nsIDOMMozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL); + do_check_eq(postedMessage.rules[0].reason, CALL_FORWARD_REASON_UNCONDITIONAL); do_check_eq(postedMessage.rules[0].number, "+34666222333"); run_next_test(); });