Bug 900900 - Fix test_ril_worker_clir.js. r=hsinyi

---
 dom/system/gonk/tests/test_ril_worker_clir.js |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
This commit is contained in:
Szu-Yu Chen [:aknow] 2013-08-05 14:00:28 +08:00
parent 0f051f5724
commit 55fea9b523

View File

@ -41,6 +41,7 @@ add_test(function test_setCLIR_success() {
worker.RIL.setCLIR = function fakeSetCLIR(options) {
worker.RIL[REQUEST_SET_CLIR](0, {
rilMessageType: "setCLIR",
rilRequestError: ERROR_SUCCESS
});
};
@ -63,6 +64,7 @@ add_test(function test_setCLIR_generic_failure() {
worker.RIL.setCLIR = function fakeSetCLIR(options) {
worker.RIL[REQUEST_SET_CLIR](0, {
rilMessageType: "setCLIR",
rilRequestError: ERROR_GENERIC_FAILURE
});
};
@ -90,11 +92,12 @@ add_test(function test_getCLIR_n0_m1() {
worker.RIL.getCLIR = function fakeGetCLIR(options) {
worker.Buf.int32Array = [
1, // Presentation indicator is used according to the subscription
// of the CLIR service.
// of the CLIR service.
0, // CLIR provisioned in permanent mode.
2 // Length.
];
worker.RIL[REQUEST_GET_CLIR](1, {
rilMessageType: "setCLIR",
rilRequestError: ERROR_SUCCESS
});
};
@ -121,11 +124,12 @@ add_test(function test_getCLIR_error_generic_failure_invalid_length() {
worker.RIL.getCLIR = function fakeGetCLIR(options) {
worker.Buf.int32Array = [
1, // Presentation indicator is used according to the subscription
// of the CLIR service.
// of the CLIR service.
0, // CLIR provisioned in permanent mode.
0 // Length (invalid one).
];
worker.RIL[REQUEST_GET_CLIR](1, {
rilMessageType: "setCLIR",
rilRequestError: ERROR_SUCCESS
});
};