From 79fa19386be3167994efa82e3d08bf903e9bc2fa Mon Sep 17 00:00:00 2001 From: Hsin-Yi Tsai Date: Tue, 24 Jun 2014 18:36:59 +0800 Subject: [PATCH 01/13] Bug 1023141 - query ril.ecclist per dial request - part 0 - rename. r=aknow --- dom/telephony/test/marionette/head.js | 22 +++++++++---------- .../test/marionette/test_crash_emulator.js | 2 +- .../test_dsds_connection_conflict.js | 2 +- .../test/marionette/test_dsds_normal_call.js | 2 +- .../test/marionette/test_emergency.js | 10 ++++----- .../marionette/test_emergency_badNumber.js | 2 +- .../test_incoming_already_connected.js | 16 +++++++------- .../marionette/test_incoming_already_held.js | 18 +++++++-------- .../marionette/test_incoming_answer_hangup.js | 8 +++---- ...t_incoming_answer_hangup_oncallschanged.js | 8 +++---- .../test_incoming_answer_remote_hangup.js | 10 ++++----- .../test_incoming_connecting_hangup.js | 6 ++--- .../test_incoming_connecting_remote_hangup.js | 8 +++---- .../marionette/test_incoming_hangup_held.js | 10 ++++----- .../marionette/test_incoming_hold_resume.js | 12 +++++----- .../marionette/test_incoming_onstatechange.js | 12 +++++----- .../test/marionette/test_incoming_reject.js | 6 ++--- .../marionette/test_incoming_remote_cancel.js | 8 +++---- .../test_incoming_remote_hangup_held.js | 12 +++++----- .../test/marionette/test_multiple_hold.js | 20 ++++++++--------- .../marionette/test_outgoing_already_held.js | 18 +++++++-------- .../marionette/test_outgoing_answer_hangup.js | 10 ++++----- ...t_outgoing_answer_hangup_oncallschanged.js | 8 +++---- .../test_outgoing_answer_local_hangup.js | 8 +++---- .../test_outgoing_answer_radio_off.js | 2 +- .../marionette/test_outgoing_badNumber.js | 2 +- .../test/marionette/test_outgoing_busy.js | 6 ++--- .../test_outgoing_hangup_alerting.js | 4 ++-- .../marionette/test_outgoing_hangup_held.js | 10 ++++----- .../marionette/test_outgoing_hold_resume.js | 12 +++++----- .../marionette/test_outgoing_onstatechange.js | 12 +++++----- .../marionette/test_outgoing_radio_off.js | 2 +- .../test/marionette/test_outgoing_reject.js | 6 ++--- .../test_outgoing_remote_hangup_held.js | 12 +++++----- .../marionette/test_redundant_operations.js | 12 +++++----- .../marionette/test_swap_held_and_active.js | 20 ++++++++--------- 36 files changed, 169 insertions(+), 169 deletions(-) diff --git a/dom/telephony/test/marionette/head.js b/dom/telephony/test/marionette/head.js index 2232abba2d5..dbf02e7053e 100644 --- a/dom/telephony/test/marionette/head.js +++ b/dom/telephony/test/marionette/head.js @@ -16,10 +16,10 @@ let emulator = (function() { // Overwritten it so people could not call this function directly. runEmulatorCmd = function() { - throw "Use emulator.runWithCallback(cmd, callback) instead of runEmulatorCmd"; + throw "Use emulator.runCmdWithCallback(cmd, callback) instead of runEmulatorCmd"; }; - function run(cmd) { + function runCmd(cmd) { let deferred = Promise.defer(); pendingCmdCount++; @@ -36,8 +36,8 @@ let emulator = (function() { return deferred.promise; } - function runWithCallback(cmd, callback) { - run(cmd).then(result => { + function runCmdWithCallback(cmd, callback) { + runCmd(cmd).then(result => { if (callback && typeof callback === "function") { callback(result); } @@ -60,8 +60,8 @@ let emulator = (function() { } return { - run: run, - runWithCallback: runWithCallback, + runCmd: runCmd, + runCmdWithCallback: runCmdWithCallback, waitFinish: waitFinish }; }()); @@ -123,7 +123,7 @@ let emulator = (function() { return Promise.all(hangUpPromises) .then(() => { - return emulator.run("gsm clear"); + return emulator.runCmd("gsm clear").then(waitForNoCall); }) .then(waitForNoCall); } @@ -361,7 +361,7 @@ let emulator = (function() { * @return A deferred promise. */ function checkEmulatorCallList(expectedCallList) { - return emulator.run("gsm list").then(result => { + return emulator.runCmd("gsm list").then(result => { log("Call list is now: " + result); for (let i = 0; i < expectedCallList.length; ++i) { is(result[i], expectedCallList[i], "emulator calllist"); @@ -611,7 +611,7 @@ let emulator = (function() { numberPresentation = numberPresentation || ""; name = name || ""; namePresentation = namePresentation || ""; - emulator.run("gsm call " + number + "," + numberPresentation + "," + name + + emulator.runCmd("gsm call " + number + "," + numberPresentation + "," + name + "," + namePresentation); return deferred.promise; } @@ -634,7 +634,7 @@ let emulator = (function() { checkEventCallState(event, call, "connected"); deferred.resolve(call); }; - emulator.run("gsm accept " + call.id.number); + emulator.runCmd("gsm accept " + call.id.number); return deferred.promise; } @@ -657,7 +657,7 @@ let emulator = (function() { checkEventCallState(event, call, "disconnected"); deferred.resolve(call); }; - emulator.run("gsm cancel " + call.id.number); + emulator.runCmd("gsm cancel " + call.id.number); return deferred.promise; } diff --git a/dom/telephony/test/marionette/test_crash_emulator.js b/dom/telephony/test/marionette/test_crash_emulator.js index e66a248bff3..29b29761f77 100644 --- a/dom/telephony/test/marionette/test_crash_emulator.js +++ b/dom/telephony/test/marionette/test_crash_emulator.js @@ -31,7 +31,7 @@ function answer() { return(callDuration >= 2000); }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } function cleanUp(){ diff --git a/dom/telephony/test/marionette/test_dsds_connection_conflict.js b/dom/telephony/test/marionette/test_dsds_connection_conflict.js index fa6a79bdad0..5ada8e48d74 100644 --- a/dom/telephony/test/marionette/test_dsds_connection_conflict.js +++ b/dom/telephony/test/marionette/test_dsds_connection_conflict.js @@ -7,7 +7,7 @@ MARIONETTE_HEAD_JS = 'head.js'; function muxModem(id) { let deferred = Promise.defer(); - emulator.runWithCallback("mux modem " + id, function() { + emulator.runCmdWithCallback("mux modem " + id, function() { deferred.resolve(); }); diff --git a/dom/telephony/test/marionette/test_dsds_normal_call.js b/dom/telephony/test/marionette/test_dsds_normal_call.js index 4aea2d179b3..ece526920ae 100644 --- a/dom/telephony/test/marionette/test_dsds_normal_call.js +++ b/dom/telephony/test/marionette/test_dsds_normal_call.js @@ -7,7 +7,7 @@ MARIONETTE_HEAD_JS = 'head.js'; function muxModem(id) { let deferred = Promise.defer(); - emulator.runWithCallback("mux modem " + id, function() { + emulator.runCmdWithCallback("mux modem " + id, function() { deferred.resolve(); }); diff --git a/dom/telephony/test/marionette/test_emergency.js b/dom/telephony/test/marionette/test_emergency.js index 009db2fbddb..9dd70776f7d 100644 --- a/dom/telephony/test/marionette/test_emergency.js +++ b/dom/telephony/test/marionette/test_emergency.js @@ -28,7 +28,7 @@ function dial() { is(outgoing.state, "alerting"); is(outgoing.emergency, true); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : ringing"); answer(); @@ -49,13 +49,13 @@ function answer() { is(outgoing, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : active"); hangUp(); }); }; - emulator.runWithCallback("gsm accept " + number); + emulator.runCmdWithCallback("gsm accept " + number); } function hangUp() { @@ -71,12 +71,12 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm cancel " + number); + emulator.runCmdWithCallback("gsm cancel " + number); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_emergency_badNumber.js b/dom/telephony/test/marionette/test_emergency_badNumber.js index c33e8e02b94..84afb568f43 100644 --- a/dom/telephony/test/marionette/test_emergency_badNumber.js +++ b/dom/telephony/test/marionette/test_emergency_badNumber.js @@ -16,7 +16,7 @@ function dial() { is(telephony.calls.length, 0); is(cause, "BadNumberError"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Initial call list: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_already_connected.js b/dom/telephony/test/marionette/test_incoming_already_connected.js index 0867813f46a..d7c3205989b 100644 --- a/dom/telephony/test/marionette/test_incoming_already_connected.js +++ b/dom/telephony/test/marionette/test_incoming_already_connected.js @@ -27,7 +27,7 @@ function dial() { is(outgoingCall, event.call); is(outgoingCall.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : ringing"); answer(); @@ -47,7 +47,7 @@ function answer() { is(outgoingCall.state, "connected"); is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); @@ -61,7 +61,7 @@ function answer() { } }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } // With one connected call already, simulate an incoming call @@ -80,14 +80,14 @@ function simulateIncoming() { is(telephony.calls[0], outgoingCall); is(telephony.calls[1], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); is(result[1], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } // Answer incoming call; original outgoing call should be held @@ -111,7 +111,7 @@ function answerIncoming() { is(incomingCall, telephony.active); is(outgoingCall.state, "held"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); is(result[1], "inbound from " + inNumber + " : active"); @@ -143,7 +143,7 @@ function hangUpOutgoing() { is(telephony.calls.length, 1); is(incomingCall.state, "connected"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); hangUpIncoming(); @@ -174,7 +174,7 @@ function hangUpIncoming() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_already_held.js b/dom/telephony/test/marionette/test_incoming_already_held.js index 601f8b1a499..6e37614c6fd 100644 --- a/dom/telephony/test/marionette/test_incoming_already_held.js +++ b/dom/telephony/test/marionette/test_incoming_already_held.js @@ -27,7 +27,7 @@ function dial() { is(outgoingCall, event.call); is(outgoingCall.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : ringing"); answer(); @@ -47,7 +47,7 @@ function answer() { is(outgoingCall.state, "connected"); is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); @@ -61,7 +61,7 @@ function answer() { } }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } function holdCall() { @@ -85,7 +85,7 @@ function holdCall() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); simulateIncoming(); @@ -110,14 +110,14 @@ function simulateIncoming() { is(telephony.calls[0], outgoingCall); is(telephony.calls[1], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); is(result[1], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } // Answer incoming call; original outgoing call should be held @@ -141,7 +141,7 @@ function answerIncoming() { is(incomingCall, telephony.active); is(outgoingCall.state, "held"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); is(result[1], "inbound from " + inNumber + " : active"); @@ -173,7 +173,7 @@ function hangUpOutgoing() { is(telephony.calls.length, 1); is(incomingCall.state, "connected"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); hangUpIncoming(); @@ -204,7 +204,7 @@ function hangUpIncoming() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_answer_hangup.js b/dom/telephony/test/marionette/test_incoming_answer_hangup.js index c5699786f5a..38c9c118ef4 100644 --- a/dom/telephony/test/marionette/test_incoming_answer_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_answer_hangup.js @@ -22,13 +22,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incoming); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : incoming"); answer(); }); }; - emulator.runWithCallback("gsm call " + number); + emulator.runCmdWithCallback("gsm call " + number); } function answer() { @@ -50,7 +50,7 @@ function answer() { is(incoming, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : active"); hangUp(); @@ -79,7 +79,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_answer_hangup_oncallschanged.js b/dom/telephony/test/marionette/test_incoming_answer_hangup_oncallschanged.js index 045554396d4..7dae153f5a9 100644 --- a/dom/telephony/test/marionette/test_incoming_answer_hangup_oncallschanged.js +++ b/dom/telephony/test/marionette/test_incoming_answer_hangup_oncallschanged.js @@ -28,14 +28,14 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incoming); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : incoming"); answer(); }); }; - emulator.runWithCallback("gsm call " + number); + emulator.runCmdWithCallback("gsm call " + number); } function answer() { @@ -60,7 +60,7 @@ function answer() { is(incoming, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : active"); hangUp(); @@ -109,7 +109,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_answer_remote_hangup.js b/dom/telephony/test/marionette/test_incoming_answer_remote_hangup.js index 917884eba9a..86a3a1dd79a 100644 --- a/dom/telephony/test/marionette/test_incoming_answer_remote_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_answer_remote_hangup.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -48,7 +48,7 @@ function answerIncoming() { is(incomingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); remoteHangUp(); @@ -70,12 +70,12 @@ function remoteHangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm cancel " + inNumber); + emulator.runCmdWithCallback("gsm cancel " + inNumber); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_incoming_connecting_hangup.js b/dom/telephony/test/marionette/test_incoming_connecting_hangup.js index 2b283e4dbae..4df52b854bc 100644 --- a/dom/telephony/test/marionette/test_incoming_connecting_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_connecting_hangup.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -77,7 +77,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_connecting_remote_hangup.js b/dom/telephony/test/marionette/test_incoming_connecting_remote_hangup.js index 91426625c47..75ebe1f3b8e 100644 --- a/dom/telephony/test/marionette/test_incoming_connecting_remote_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_connecting_remote_hangup.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -59,12 +59,12 @@ function remoteHangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm cancel " + inNumber); + emulator.runCmdWithCallback("gsm cancel " + inNumber); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_incoming_hangup_held.js b/dom/telephony/test/marionette/test_incoming_hangup_held.js index e2edf605b2a..436614ec01b 100644 --- a/dom/telephony/test/marionette/test_incoming_hangup_held.js +++ b/dom/telephony/test/marionette/test_incoming_hangup_held.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -48,7 +48,7 @@ function answerIncoming() { is(incomingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); hold(); @@ -78,7 +78,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); hangUp(); @@ -107,7 +107,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_hold_resume.js b/dom/telephony/test/marionette/test_incoming_hold_resume.js index 723be17e425..f7ce52d31fb 100644 --- a/dom/telephony/test/marionette/test_incoming_hold_resume.js +++ b/dom/telephony/test/marionette/test_incoming_hold_resume.js @@ -21,13 +21,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : incoming"); answer(); }); }; - emulator.runWithCallback("gsm call " + number); + emulator.runCmdWithCallback("gsm call " + number); } function answer() { @@ -49,7 +49,7 @@ function answer() { is(incomingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : active"); hold(); @@ -79,7 +79,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : held"); // Wait on hold for a couple of seconds @@ -111,7 +111,7 @@ function resume() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : active"); hangUp(); @@ -140,7 +140,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_onstatechange.js b/dom/telephony/test/marionette/test_incoming_onstatechange.js index 1f621867062..6316bd85a1d 100644 --- a/dom/telephony/test/marionette/test_incoming_onstatechange.js +++ b/dom/telephony/test/marionette/test_incoming_onstatechange.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -45,7 +45,7 @@ function answerIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); hold(); @@ -71,7 +71,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); resume(); @@ -97,7 +97,7 @@ function resume() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); hangUp(); @@ -122,7 +122,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_reject.js b/dom/telephony/test/marionette/test_incoming_reject.js index 618f351e889..c3c2c20dc96 100644 --- a/dom/telephony/test/marionette/test_incoming_reject.js +++ b/dom/telephony/test/marionette/test_incoming_reject.js @@ -22,13 +22,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incoming); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + number + " : incoming"); reject(); }); }; - emulator.runWithCallback("gsm call " + number); + emulator.runCmdWithCallback("gsm call " + number); } function reject() { @@ -51,7 +51,7 @@ function reject() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_incoming_remote_cancel.js b/dom/telephony/test/marionette/test_incoming_remote_cancel.js index 90887d96842..269dd08cd57 100644 --- a/dom/telephony/test/marionette/test_incoming_remote_cancel.js +++ b/dom/telephony/test/marionette/test_incoming_remote_cancel.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); cancelIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function cancelIncoming(){ @@ -42,12 +42,12 @@ function cancelIncoming(){ is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm cancel " + inNumber); + emulator.runCmdWithCallback("gsm cancel " + inNumber); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_incoming_remote_hangup_held.js b/dom/telephony/test/marionette/test_incoming_remote_hangup_held.js index 6df36a52531..5d3fa235401 100644 --- a/dom/telephony/test/marionette/test_incoming_remote_hangup_held.js +++ b/dom/telephony/test/marionette/test_incoming_remote_hangup_held.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -48,7 +48,7 @@ function answerIncoming() { is(incomingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); hold(); @@ -78,7 +78,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); hangUp(); @@ -100,12 +100,12 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm cancel " + inNumber); + emulator.runCmdWithCallback("gsm cancel " + inNumber); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_multiple_hold.js b/dom/telephony/test/marionette/test_multiple_hold.js index fffaf8deb78..063760f2e63 100644 --- a/dom/telephony/test/marionette/test_multiple_hold.js +++ b/dom/telephony/test/marionette/test_multiple_hold.js @@ -22,13 +22,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -49,7 +49,7 @@ function answerIncoming() { ok(gotConnecting); is(incomingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); holdCall(); @@ -80,7 +80,7 @@ function holdCall() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); dial(); @@ -108,7 +108,7 @@ function dial() { is(outgoingCall, event.call); is(outgoingCall.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); is(result[1], "outbound to " + outNumber + " : ringing"); @@ -129,14 +129,14 @@ function answerOutgoing() { is(outgoingCall.state, "connected"); is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); is(result[1], "outbound to " + outNumber + " : active"); holdSecondCall(); }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } // With one held call and one active, hold the active one; expect the first @@ -187,7 +187,7 @@ function verifyCalls() { is(telephony.calls[0], incomingCall); is(telephony.calls[1], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); is(result[1], "outbound to " + outNumber + " : held"); @@ -218,7 +218,7 @@ function hangUpIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); hangUpOutgoing(); @@ -249,7 +249,7 @@ function hangUpOutgoing() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_already_held.js b/dom/telephony/test/marionette/test_outgoing_already_held.js index 2708f8cc31b..e1d45a9c71c 100644 --- a/dom/telephony/test/marionette/test_outgoing_already_held.js +++ b/dom/telephony/test/marionette/test_outgoing_already_held.js @@ -29,13 +29,13 @@ function simulateIncoming() { }; let rcvdEmulatorCallback = false; - emulator.runWithCallback("gsm call " + inNumber, function(result) { + emulator.runCmdWithCallback("gsm call " + inNumber, function(result) { rcvdEmulatorCallback = true; }); } function verifyCallList(){ - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); @@ -61,7 +61,7 @@ function answerIncoming() { is(incomingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); holdCall(); @@ -92,7 +92,7 @@ function holdCall(){ is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); dial(); @@ -121,7 +121,7 @@ function dial() { is(outgoingCall, event.call); is(outgoingCall.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); is(result[1], "outbound to " + outNumber + " : ringing"); @@ -150,13 +150,13 @@ function answerOutgoing() { }; let rcvdEmulatorCallback = false; - emulator.runWithCallback("gsm accept " + outNumber, function(result) { + emulator.runCmdWithCallback("gsm accept " + outNumber, function(result) { rcvdEmulatorCallback = true; }); } function checkCallList(){ - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); is(result[1], "outbound to " + outNumber + " : active"); @@ -187,7 +187,7 @@ function hangUpIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); hangUpOutgoing(); @@ -218,7 +218,7 @@ function hangUpOutgoing() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_answer_hangup.js b/dom/telephony/test/marionette/test_outgoing_answer_hangup.js index 83976145967..38907ac5cc5 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_hangup.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_hangup.js @@ -27,7 +27,7 @@ function dial() { is(outgoing, event.call); is(outgoing.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : ringing"); answer(); @@ -48,13 +48,13 @@ function answer() { is(outgoing, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : active"); hangUp(); }); }; - emulator.runWithCallback("gsm accept " + number); + emulator.runCmdWithCallback("gsm accept " + number); } function hangUp() { @@ -70,12 +70,12 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm cancel " + number); + emulator.runCmdWithCallback("gsm cancel " + number); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_outgoing_answer_hangup_oncallschanged.js b/dom/telephony/test/marionette/test_outgoing_answer_hangup_oncallschanged.js index 2a19b6598de..7a79472232c 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_hangup_oncallschanged.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_hangup_oncallschanged.js @@ -46,7 +46,7 @@ function dial() { } function checkCallList() { - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); if (((result[0] == "outbound to " + number + " : unknown") || (result[0] == "outbound to " + number + " : dialing"))) { @@ -69,19 +69,19 @@ function answer() { is(outgoing, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list (after 'connected' event) is now: " + result); is(result[0], "outbound to " + number + " : active"); hangUp(); }); }; - emulator.runWithCallback("gsm accept " + number); + emulator.runCmdWithCallback("gsm accept " + number); } function hangUp() { log("Hanging up the outgoing call."); - emulator.runWithCallback("gsm cancel " + number); + emulator.runCmdWithCallback("gsm cancel " + number); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_outgoing_answer_local_hangup.js b/dom/telephony/test/marionette/test_outgoing_answer_local_hangup.js index aec488255ec..766ebe9330a 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_local_hangup.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_local_hangup.js @@ -26,7 +26,7 @@ function dial() { is(outgoingCall, event.call); is(outgoingCall.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : ringing"); answer(); @@ -47,13 +47,13 @@ function answer() { is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); hangUp(); }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } function hangUp() { @@ -76,7 +76,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_answer_radio_off.js b/dom/telephony/test/marionette/test_outgoing_answer_radio_off.js index 78fd30d3c4f..437d30c0f85 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_radio_off.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_radio_off.js @@ -59,7 +59,7 @@ function remoteAnswer(call) { is(call.state, "connected"); deferred.resolve(call); }; - emulator.runWithCallback("gsm accept " + call.id.number); + emulator.runCmdWithCallback("gsm accept " + call.id.number); return deferred.promise; } diff --git a/dom/telephony/test/marionette/test_outgoing_badNumber.js b/dom/telephony/test/marionette/test_outgoing_badNumber.js index 26fda57300e..6bd0c198dae 100644 --- a/dom/telephony/test/marionette/test_outgoing_badNumber.js +++ b/dom/telephony/test/marionette/test_outgoing_badNumber.js @@ -30,7 +30,7 @@ function dial() { ok(event.call.error); is(event.call.error.name, "BadNumberError"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Initial call list: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_busy.js b/dom/telephony/test/marionette/test_outgoing_busy.js index 7886a8968bf..853a390f99b 100644 --- a/dom/telephony/test/marionette/test_outgoing_busy.js +++ b/dom/telephony/test/marionette/test_outgoing_busy.js @@ -25,7 +25,7 @@ function dial() { is(outgoing, event.call); is(outgoing.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : ringing"); busy(); @@ -42,13 +42,13 @@ function busy() { is(outgoing, event.call); is(event.call.error.name, "BusyError"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm busy " + number); + emulator.runCmdWithCallback("gsm busy " + number); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js b/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js index cf03e822bc0..bf75e3833de 100644 --- a/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js +++ b/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js @@ -24,7 +24,7 @@ function dial() { outgoing.onalerting = function onalerting(event) { log("Received 'alerting' call event."); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : ringing"); hangUp(); @@ -54,7 +54,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_hangup_held.js b/dom/telephony/test/marionette/test_outgoing_hangup_held.js index 5f8855ec044..87a5ecf9f44 100644 --- a/dom/telephony/test/marionette/test_outgoing_hangup_held.js +++ b/dom/telephony/test/marionette/test_outgoing_hangup_held.js @@ -26,7 +26,7 @@ function dial() { is(outgoing, event.call); is(outgoing.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : ringing"); answer(); @@ -47,13 +47,13 @@ function answer() { is(outgoing, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : active"); hold(); }); }; - emulator.runWithCallback("gsm accept " + number); + emulator.runCmdWithCallback("gsm accept " + number); } function hold() { @@ -75,7 +75,7 @@ function hold() { is(telephony.active, null); is(telephony.calls.length, 1); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : held"); hangUp(); @@ -104,7 +104,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_hold_resume.js b/dom/telephony/test/marionette/test_outgoing_hold_resume.js index ad2b7e0e998..18258075377 100644 --- a/dom/telephony/test/marionette/test_outgoing_hold_resume.js +++ b/dom/telephony/test/marionette/test_outgoing_hold_resume.js @@ -26,7 +26,7 @@ function dial() { is(outgoingCall, event.call); is(outgoingCall.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : ringing"); answer(); @@ -47,13 +47,13 @@ function answer() { is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : active"); hold(); }); }; - emulator.runWithCallback("gsm accept " + number); + emulator.runCmdWithCallback("gsm accept " + number); } function hold() { @@ -77,7 +77,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : held"); // Bug 781604: emulator assertion if outgoing call kept on hold @@ -111,7 +111,7 @@ function resume() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : active"); hangUp(); @@ -140,7 +140,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_onstatechange.js b/dom/telephony/test/marionette/test_outgoing_onstatechange.js index 8aa850b2ea8..a0c984d30d2 100644 --- a/dom/telephony/test/marionette/test_outgoing_onstatechange.js +++ b/dom/telephony/test/marionette/test_outgoing_onstatechange.js @@ -28,7 +28,7 @@ function dial() { ok(expectedStates.indexOf(event.call.state) != -1); if (event.call.state == "alerting") { - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : ringing"); answer(); @@ -49,13 +49,13 @@ function answer() { is(outgoingCall.state, "connected"); is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); hold(); }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } function hold() { @@ -74,7 +74,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); resume(); @@ -100,7 +100,7 @@ function resume() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); hangUp(); @@ -125,7 +125,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_radio_off.js b/dom/telephony/test/marionette/test_outgoing_radio_off.js index 17334beb555..92de9015567 100644 --- a/dom/telephony/test/marionette/test_outgoing_radio_off.js +++ b/dom/telephony/test/marionette/test_outgoing_radio_off.js @@ -47,7 +47,7 @@ function dial(number) { is(telephony.calls.length, 0); is(cause, "RadioNotAvailable"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Initial call list: " + result); setRadioEnabled(true, cleanUp); diff --git a/dom/telephony/test/marionette/test_outgoing_reject.js b/dom/telephony/test/marionette/test_outgoing_reject.js index 1dfe738065d..fe5ab199f69 100644 --- a/dom/telephony/test/marionette/test_outgoing_reject.js +++ b/dom/telephony/test/marionette/test_outgoing_reject.js @@ -25,7 +25,7 @@ function dial() { is(outgoing, event.call); is(outgoing.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + number + " : ringing"); reject(); @@ -53,13 +53,13 @@ function reject() { }; let rcvdEmulatorCallback = false; - emulator.runWithCallback("gsm cancel " + number, function(result) { + emulator.runCmdWithCallback("gsm cancel " + number, function(result) { rcvdEmulatorCallback = true; }); } function verifyCallList(){ - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); diff --git a/dom/telephony/test/marionette/test_outgoing_remote_hangup_held.js b/dom/telephony/test/marionette/test_outgoing_remote_hangup_held.js index c4ed18e9e76..b8fc026a66c 100644 --- a/dom/telephony/test/marionette/test_outgoing_remote_hangup_held.js +++ b/dom/telephony/test/marionette/test_outgoing_remote_hangup_held.js @@ -25,7 +25,7 @@ function dial() { is(outgoingCall, event.call); is(outgoingCall.state, "alerting"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : ringing"); answer(); @@ -46,13 +46,13 @@ function answer() { is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); hold(); }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } function hold() { @@ -75,7 +75,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); hangUp(); @@ -97,12 +97,12 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); }; - emulator.runWithCallback("gsm cancel " + outNumber); + emulator.runCmdWithCallback("gsm cancel " + outNumber); } function cleanUp() { diff --git a/dom/telephony/test/marionette/test_redundant_operations.js b/dom/telephony/test/marionette/test_redundant_operations.js index 6a607894f21..671fee935df 100644 --- a/dom/telephony/test/marionette/test_redundant_operations.js +++ b/dom/telephony/test/marionette/test_redundant_operations.js @@ -20,13 +20,13 @@ function simulateIncoming() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } function answerIncoming() { @@ -48,7 +48,7 @@ function answerIncoming() { is(incomingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); answerAlreadyConnected(); @@ -100,7 +100,7 @@ function hold() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); holdAlreadyHeld(); @@ -176,7 +176,7 @@ function resume() { is(telephony.calls.length, 1); is(telephony.calls[0], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : active"); resumeNonHeld(); @@ -227,7 +227,7 @@ function hangUp() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); answerDisconnected(); }); diff --git a/dom/telephony/test/marionette/test_swap_held_and_active.js b/dom/telephony/test/marionette/test_swap_held_and_active.js index 7233141b7dd..946c59cfb7d 100644 --- a/dom/telephony/test/marionette/test_swap_held_and_active.js +++ b/dom/telephony/test/marionette/test_swap_held_and_active.js @@ -29,7 +29,7 @@ function dial() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : ringing"); answer(); @@ -49,7 +49,7 @@ function answer() { is(outgoingCall.state, "connected"); is(outgoingCall, telephony.active); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); @@ -63,7 +63,7 @@ function answer() { } }); }; - emulator.runWithCallback("gsm accept " + outNumber); + emulator.runCmdWithCallback("gsm accept " + outNumber); } function holdCall() { @@ -87,7 +87,7 @@ function holdCall() { is(telephony.calls.length, 1); is(telephony.calls[0], outgoingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); simulateIncoming(); @@ -112,14 +112,14 @@ function simulateIncoming() { is(telephony.calls[0], outgoingCall); is(telephony.calls[1], incomingCall); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); is(result[1], "inbound from " + inNumber + " : incoming"); answerIncoming(); }); }; - emulator.runWithCallback("gsm call " + inNumber); + emulator.runCmdWithCallback("gsm call " + inNumber); } // Answer incoming call; original outgoing call should be held @@ -145,7 +145,7 @@ function answerIncoming() { is(outgoingCall.state, "held"); is(incomingCall.state, "connected"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : held"); is(result[1], "inbound from " + inNumber + " : active"); @@ -198,7 +198,7 @@ function verifySwap() { is(outgoingCall.state, "connected"); is(incomingCall.state, "held"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "outbound to " + outNumber + " : active"); is(result[1], "inbound from " + inNumber + " : held"); @@ -230,7 +230,7 @@ function hangUpOutgoing() { is(telephony.calls.length, 1); is(incomingCall.state, "held"); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); is(result[0], "inbound from " + inNumber + " : held"); hangUpIncoming(); @@ -261,7 +261,7 @@ function hangUpIncoming() { is(telephony.active, null); is(telephony.calls.length, 0); - emulator.runWithCallback("gsm list", function(result) { + emulator.runCmdWithCallback("gsm list", function(result) { log("Call list is now: " + result); cleanUp(); }); From 9fdd9aeaf947ecc153a95ea3e77ecd2cce08eac4 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Tsai Date: Tue, 24 Jun 2014 18:32:41 +0800 Subject: [PATCH 02/13] Bug 1023141 - query ril.ecclist per dial request - part 1 - fix. r=aknow --- dom/system/gonk/RadioInterfaceLayer.js | 4 +- dom/system/gonk/ril_worker.js | 132 +++++++++++-------------- dom/telephony/gonk/TelephonyService.js | 30 +++++- 3 files changed, 86 insertions(+), 80 deletions(-) diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index afe9bb76813..55520bce7c1 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -1629,9 +1629,7 @@ WorkerMessenger.prototype = { libcutils.property_get("ro.moz.ril.send_stk_profile_dl", "false") == "true", dataRegistrationOnDemand: RILQUIRKS_DATA_REGISTRATION_ON_DEMAND, subscriptionControl: RILQUIRKS_SUBSCRIPTION_CONTROL - }, - rilEmergencyNumbers: libcutils.property_get("ril.ecclist") || - libcutils.property_get("ro.ril.ecclist") + } }; this.send(null, "setInitialOptions", options); diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 40998f4353c..70b86f66ff1 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -52,9 +52,6 @@ if (!this.debug) { }; } -let RIL_EMERGENCY_NUMBERS; -const DEFAULT_EMERGENCY_NUMBERS = ["112", "911"]; - // Timeout value for emergency callback mode. const EMERGENCY_CB_MODE_TIMEOUT_MS = 300000; // 5 mins = 300000 ms. @@ -1555,7 +1552,7 @@ RilObject.prototype = { cachedDialRequest : null, /** - * Dial the phone. + * Dial a non-emergency number. * * @param number * String containing the number to dial. @@ -1564,34 +1561,13 @@ RilObject.prototype = { * @param uusInfo * Integer doing something XXX TODO */ - dial: function(options) { + dialNonEmergencyNumber: function(options) { let onerror = (function onerror(options, errorMsg) { options.success = false; options.errorMsg = errorMsg; this.sendChromeMessage(options); }).bind(this, options); - if (this._isEmergencyNumber(options.number)) { - this.dialEmergencyNumber(options, onerror); - } else { - if (!this._isCdma) { - // TODO: Both dial() and sendMMI() functions should be unified at some - // point in the future. In the mean time we handle temporary CLIR MMI - // commands through the dial() function. Please see bug 889737. - let mmi = this._parseMMI(options.number); - if (mmi && this._isTemporaryModeCLIR(mmi)) { - options.number = mmi.dialNumber; - // In temporary mode, MMI_PROCEDURE_ACTIVATION means allowing CLI - // presentation, i.e. CLIR_SUPPRESSION. See TS 22.030, Annex B. - options.clirMode = mmi.procedure == MMI_PROCEDURE_ACTIVATION ? - CLIR_SUPPRESSION : CLIR_INVOCATION; - } - } - this.dialNonEmergencyNumber(options, onerror); - } - }, - - dialNonEmergencyNumber: function(options, onerror) { if (this.radioState == GECKO_RADIOSTATE_OFF) { // Notify error in establishing the call without radio. onerror(GECKO_ERROR_RADIO_NOT_AVAILABLE); @@ -1609,17 +1585,41 @@ RilObject.prototype = { this.exitEmergencyCbMode(); } - if (this._isCdma && Object.keys(this.currentCalls).length == 1) { - // Make a Cdma 3way call. - options.featureStr = options.number; - this.sendCdmaFlashCommand(options); - } else { - options.request = REQUEST_DIAL; - this.sendDialRequest(options); + if (!this._isCdma) { + // TODO: Both dial() and sendMMI() functions should be unified at some + // point in the future. In the mean time we handle temporary CLIR MMI + // commands through the dial() function. Please see bug 889737. + let mmi = this._parseMMI(options.number); + if (mmi && this._isTemporaryModeCLIR(mmi)) { + options.number = mmi.dialNumber; + // In temporary mode, MMI_PROCEDURE_ACTIVATION means allowing CLI + // presentation, i.e. CLIR_SUPPRESSION. See TS 22.030, Annex B. + options.clirMode = mmi.procedure == MMI_PROCEDURE_ACTIVATION ? + CLIR_SUPPRESSION : CLIR_INVOCATION; + } } + + options.request = REQUEST_DIAL; + this.sendDialRequest(options); }, - dialEmergencyNumber: function(options, onerror) { + /** + * Dial an emergency number. + * + * @param number + * String containing the number to dial. + * @param clirMode + * Integer for showing/hidding the caller Id to the called party. + * @param uusInfo + * Integer doing something XXX TODO + */ + dialEmergencyNumber: function(options) { + let onerror = (function onerror(options, errorMsg) { + options.success = false; + options.errorMsg = errorMsg; + this.sendChromeMessage(options); + }).bind(this, options); + options.request = RILQUIRKS_REQUEST_USE_DIAL_EMERGENCY_CALL ? REQUEST_DIAL_EMERGENCY_CALL : REQUEST_DIAL; if (this.radioState == GECKO_RADIOSTATE_OFF) { @@ -1636,20 +1636,20 @@ RilObject.prototype = { return; } + this.sendDialRequest(options); + }, + + sendDialRequest: function(options) { if (this._isCdma && Object.keys(this.currentCalls).length == 1) { // Make a Cdma 3way call. options.featureStr = options.number; this.sendCdmaFlashCommand(options); } else { - this.sendDialRequest(options); + this.telephonyRequestQueue.push(options.request, this.sendRilRequestDial, + options); } }, - sendDialRequest: function(options) { - this.telephonyRequestQueue.push(options.request, this.sendRilRequestDial, - options); - }, - sendRilRequestDial: function(options) { let Buf = this.context.Buf; Buf.newParcel(options.request, options); @@ -2417,9 +2417,8 @@ RilObject.prototype = { return false; } - if (this._isEmergencyNumber(mmiString)) { - return false; - } + // TODO: Should take care of checking if the string is an emergency number + // in Bug 889737. See Bug 1023141 for more background. // In a call case. if (Object.getOwnPropertyNames(this.currentCalls).length > 0) { @@ -3309,38 +3308,18 @@ RilObject.prototype = { }, /** - * Check a given number against the list of emergency numbers provided by the RIL. + * Checks whether to temporarily suppress caller id for the call. * - * @param number - * The number to look up. + * @param mmi + * MMI full object. */ - _isEmergencyNumber: function(number) { - // Check ril provided numbers first. - let numbers = RIL_EMERGENCY_NUMBERS; - - if (numbers) { - numbers = numbers.split(","); - } else { - // No ecclist system property, so use our own list. - numbers = DEFAULT_EMERGENCY_NUMBERS; - } - - return numbers.indexOf(number) != -1; - }, - - /** - * Checks whether to temporarily suppress caller id for the call. - * - * @param mmi - * MMI full object. - */ - _isTemporaryModeCLIR: function(mmi) { - return (mmi && - mmi.serviceCode == MMI_SC_CLIR && - mmi.dialNumber && - (mmi.procedure == MMI_PROCEDURE_ACTIVATION || - mmi.procedure == MMI_PROCEDURE_DEACTIVATION)); - }, + _isTemporaryModeCLIR: function(mmi) { + return (mmi && + mmi.serviceCode == MMI_SC_CLIR && + mmi.dialNumber && + (mmi.procedure == MMI_PROCEDURE_ACTIVATION || + mmi.procedure == MMI_PROCEDURE_DEACTIVATION)); + }, /** * Report STK Service is running. @@ -4055,6 +4034,7 @@ RilObject.prototype = { for (let i in newCalls) { if (newCalls[i].state !== CALL_STATE_INCOMING) { callIndex = newCalls[i].callIndex; + newCalls[i].isEmergency = options.isEmergency; break; } } @@ -4105,9 +4085,9 @@ RilObject.prototype = { newCall.isOutgoing = true; } - // Set flag for outgoing emergency call. - newCall.isEmergency = newCall.isOutgoing && - this._isEmergencyNumber(newCall.number); + if (newCall.isEmergency === undefined) { + newCall.isEmergency = false; + } // Set flag for conference. newCall.isConference = newCall.isMpty ? true : false; diff --git a/dom/telephony/gonk/TelephonyService.js b/dom/telephony/gonk/TelephonyService.js index a10c4340b9c..03e5244ca5a 100644 --- a/dom/telephony/gonk/TelephonyService.js +++ b/dom/telephony/gonk/TelephonyService.js @@ -10,6 +10,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); +Cu.import("resource://gre/modules/systemlibs.js"); var RIL = {}; Cu.import("resource://gre/modules/ril_consts.js", RIL); @@ -47,6 +48,8 @@ const AUDIO_STATE_NAME = [ "PHONE_STATE_IN_CALL" ]; +const DEFAULT_EMERGENCY_NUMBERS = ["112", "911"]; + let DEBUG; function debug(s) { dump("TelephonyService: " + s + "\n"); @@ -327,6 +330,26 @@ TelephonyService.prototype = { }).bind(this)); }, + /** + * Check a given number against the list of emergency numbers provided by the + * RIL. + * + * @param aNumber + * The number to look up. + */ + _isEmergencyNumber: function(aNumber) { + // Check ril provided numbers first. + let numbers = libcutils.property_get("ril.ecclist") || + libcutils.property_get("ro.ril.ecclist"); + if (numbers) { + numbers = numbers.split(","); + } else { + // No ecclist system property, so use our own list. + numbers = DEFAULT_EMERGENCY_NUMBERS; + } + return numbers.indexOf(aNumber) != -1; + }, + /** * nsITelephonyService interface. */ @@ -474,9 +497,14 @@ TelephonyService.prototype = { this.notifyCallStateChanged(aClientId, parentCall); }; + let isEmergencyNumber = this._isEmergencyNumber(aNumber); + let msg = isEmergencyNumber ? + "dialEmergencyNumber" : + "dialNonEmergencyNumber"; this.isDialing = true; - this._getClient(aClientId).sendWorkerMessage("dial", { + this._getClient(aClientId).sendWorkerMessage(msg, { number: aNumber, + isEmergency: isEmergencyNumber, isDialEmergency: aIsEmergency }, (function(response) { this.isDialing = false; From 8933ead71dc864c3300044e211f05c6c9bcb16e3 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Tsai Date: Tue, 24 Jun 2014 18:47:12 +0800 Subject: [PATCH 03/13] Bug 1023141 - query ril.ecclist per dial request - part 2 - test case. r=aknow --- dom/telephony/test/marionette/head.js | 26 +++++++- .../test/marionette/test_emergency_label.js | 65 +++++++++++++++++-- 2 files changed, 83 insertions(+), 8 deletions(-) diff --git a/dom/telephony/test/marionette/head.js b/dom/telephony/test/marionette/head.js index dbf02e7053e..14edaa2e318 100644 --- a/dom/telephony/test/marionette/head.js +++ b/dom/telephony/test/marionette/head.js @@ -14,11 +14,19 @@ let emulator = (function() { let pendingCmdCount = 0; let originalRunEmulatorCmd = runEmulatorCmd; + let pendingShellCount = 0; + let originalRunEmulatorShell = runEmulatorShell; + // Overwritten it so people could not call this function directly. runEmulatorCmd = function() { throw "Use emulator.runCmdWithCallback(cmd, callback) instead of runEmulatorCmd"; }; + // Overwritten it so people could not call this function directly. + runEmulatorShell = function() { + throw "Use emulator.runShellCmd(cmd, callback) instead of runEmulatorShell"; + }; + function runCmd(cmd) { let deferred = Promise.defer(); @@ -44,6 +52,21 @@ let emulator = (function() { }); } + /** + * @return Promise + */ + function runShellCmd(aCommands) { + let deferred = Promise.defer(); + + ++pendingShellCount; + originalRunEmulatorShell(aCommands, function(aResult) { + --pendingShellCount; + deferred.resolve(aResult); + }); + + return deferred.promise; + } + /** * @return Promise */ @@ -53,7 +76,7 @@ let emulator = (function() { waitFor(function() { deferred.resolve(); }, function() { - return pendingCmdCount === 0; + return pendingCmdCount === 0 && pendingShellCount === 0; }); return deferred.promise; @@ -62,6 +85,7 @@ let emulator = (function() { return { runCmd: runCmd, runCmdWithCallback: runCmdWithCallback, + runShellCmd: runShellCmd, waitFinish: waitFinish }; }()); diff --git a/dom/telephony/test/marionette/test_emergency_label.js b/dom/telephony/test/marionette/test_emergency_label.js index caa92919632..41854468acd 100644 --- a/dom/telephony/test/marionette/test_emergency_label.js +++ b/dom/telephony/test/marionette/test_emergency_label.js @@ -4,7 +4,43 @@ MARIONETTE_TIMEOUT = 60000; MARIONETTE_HEAD_JS = 'head.js'; -function testEmergencyLabel(number, emergency) { +const DEFAULT_ECC_LIST = "112,911"; + +function setEccListProperty(list) { + log("Set property ril.ecclist: " + list); + + let deferred = Promise.defer(); + try { + emulator.runShellCmd(["setprop","ril.ecclist", list]).then(function() { + deferred.resolve(list); + }); + } catch (e) { + deferred.reject(e); + } + return deferred.promise; +} + +function getEccListProperty() { + log("Get property ril.ecclist."); + + let deferred = Promise.defer(); + try { + emulator.runShellCmd(["getprop","ril.ecclist"]).then(function(aResult) { + let list = !aResult.length ? "" : aResult[0]; + deferred.resolve(list); + }); + } catch (e) { + deferred.reject(e); + } + return deferred.promise; +} + +function testEmergencyLabel(number, list) { + if (!list) { + list = DEFAULT_ECC_LIST; + } + let index = list.split(",").indexOf(number); + let emergency = index != -1; log("= testEmergencyLabel = " + number + " should be " + (emergency ? "emergency" : "normal") + " call"); @@ -23,12 +59,27 @@ function testEmergencyLabel(number, emergency) { } startTest(function() { - testEmergencyLabel("112", true) - .then(() => testEmergencyLabel("911", true)) - .then(() => testEmergencyLabel("0912345678", false)) - .then(() => testEmergencyLabel("777", false)) - .then(null, () => { - ok(false, 'promise rejects during test.'); + let origEccList; + let eccList; + + getEccListProperty() + .then(list => { + origEccList = eccList = list; + }) + .then(() => testEmergencyLabel("112", eccList)) + .then(() => testEmergencyLabel("911", eccList)) + .then(() => testEmergencyLabel("0912345678", eccList)) + .then(() => testEmergencyLabel("777", eccList)) + .then(() => { + eccList = "777,119"; + return setEccListProperty(eccList); + }) + .then(() => testEmergencyLabel("777", eccList)) + .then(() => testEmergencyLabel("119", eccList)) + .then(() => testEmergencyLabel("112", eccList)) + .then(() => setEccListProperty(origEccList)) + .then(null, error => { + ok(false, 'promise rejects during test: ' + error); }) .then(finish); }); From 50446da4a01cf40127aac914d7df29186bb5cb39 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Jun 2014 21:35:23 -0700 Subject: [PATCH 04/13] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/ffb53607d294 Author: DouglasSherk Desc: Revert "bug 1021857 - Ensure z-index for AttentionScreen makes it top-most." This reverts commit 38a367ba17e8ce3f2a44884c584448f977a81eaf. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 71e0d1b9e83..98e342b8d6b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "b6c6dcfdef46399b88637c93a4f76d4425f7c096", + "revision": "ffb53607d2941324814de17e527531b7ae91df77", "repo_path": "/integration/gaia-central" } From 7d45a9e90451704bc5cc4b3f5ce6f9b569643f69 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Jun 2014 21:41:39 -0700 Subject: [PATCH 05/13] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 996fd0b7072..c6b706d3852 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index a5886edefca..8be9dccc068 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index ad638cc5972..34cbd0c5e99 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 996fd0b7072..c6b706d3852 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index fefa31b873d..9a4fd6f01f6 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 4183f922c93..1e82597625a 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 0bfb9bb09ec..d554a0720d2 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 12c1903b0fa..23a663bb945 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index be2cc1dee81..aa328b3e6e2 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 24d088957f06434bd49cf9b9c6c665474b4e7c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Wed, 7 May 2014 15:53:16 -0700 Subject: [PATCH 06/13] Bug 1024157 - Lazy load more js modules - part 1: NFC r=psiddh --- dom/apps/src/AppsUtils.jsm | 1 - dom/system/gonk/Nfc.js | 7 +++++-- dom/system/gonk/NfcContentHelper.js | 7 +++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dom/apps/src/AppsUtils.jsm b/dom/apps/src/AppsUtils.jsm index c18f0d6da8d..5ad40162333 100644 --- a/dom/apps/src/AppsUtils.jsm +++ b/dom/apps/src/AppsUtils.jsm @@ -11,7 +11,6 @@ const Cr = Components.results; Cu.import("resource://gre/modules/osfile.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Task.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); diff --git a/dom/system/gonk/Nfc.js b/dom/system/gonk/Nfc.js index c5c821f9362..9d41c32f091 100644 --- a/dom/system/gonk/Nfc.js +++ b/dom/system/gonk/Nfc.js @@ -22,8 +22,11 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -let NFC = {}; -Cu.import("resource://gre/modules/nfc_consts.js", NFC); +XPCOMUtils.defineLazyGetter(this, "NFC", function () { + let obj = {}; + Cu.import("resource://gre/modules/nfc_consts.js", obj); + return obj; +}); Cu.import("resource://gre/modules/systemlibs.js"); const NFC_ENABLED = libcutils.property_get("ro.moz.nfc.enabled", "false") === "true"; diff --git a/dom/system/gonk/NfcContentHelper.js b/dom/system/gonk/NfcContentHelper.js index b31879c747e..d55839be592 100644 --- a/dom/system/gonk/NfcContentHelper.js +++ b/dom/system/gonk/NfcContentHelper.js @@ -23,8 +23,11 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/DOMRequestHelper.jsm"); -let NFC = {}; -Cu.import("resource://gre/modules/nfc_consts.js", NFC); +XPCOMUtils.defineLazyGetter(this, "NFC", function () { + let obj = {}; + Cu.import("resource://gre/modules/nfc_consts.js", obj); + return obj; +}); Cu.import("resource://gre/modules/systemlibs.js"); const NFC_ENABLED = libcutils.property_get("ro.moz.nfc.enabled", "false") === "true"; From 481ef86e6dc01ee23f0f27ada38afef4045378b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Wed, 7 May 2014 15:53:16 -0700 Subject: [PATCH 07/13] Bug 1024157 - Lazy load more js modules - Part 2: contacts r=gwagner --- dom/contacts/fallback/ContactDB.jsm | 4 +++- dom/contacts/fallback/ContactService.jsm | 7 +++++-- dom/phonenumberutils/PhoneNumber.jsm | 8 ++++++-- dom/phonenumberutils/PhoneNumberUtils.jsm | 9 ++++++--- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dom/contacts/fallback/ContactDB.jsm b/dom/contacts/fallback/ContactDB.jsm index 8cc9737a9ea..0caad00b496 100644 --- a/dom/contacts/fallback/ContactDB.jsm +++ b/dom/contacts/fallback/ContactDB.jsm @@ -15,9 +15,11 @@ const Cu = Components.utils; const Cc = Components.classes; const Ci = Components.interfaces; +Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/IndexedDBHelper.jsm"); -Cu.import("resource://gre/modules/PhoneNumberUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberUtils", + "resource://gre/modules/PhoneNumberUtils.jsm"); Cu.importGlobalProperties(["indexedDB"]); /* all exported symbols need to be bound to this on B2G - Bug 961777 */ diff --git a/dom/contacts/fallback/ContactService.jsm b/dom/contacts/fallback/ContactService.jsm index 68f0dad9afe..8040e7d8dde 100644 --- a/dom/contacts/fallback/ContactService.jsm +++ b/dom/contacts/fallback/ContactService.jsm @@ -15,8 +15,11 @@ this.EXPORTED_SYMBOLS = ["ContactService"]; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/ContactDB.jsm"); -Cu.import("resource://gre/modules/PhoneNumberUtils.jsm"); + +XPCOMUtils.defineLazyModuleGetter(this, "ContactDB", + "resource://gre/modules/ContactDB.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberUtils", + "resource://gre/modules/PhoneNumberUtils.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "ppmm", "@mozilla.org/parentprocessmessagemanager;1", diff --git a/dom/phonenumberutils/PhoneNumber.jsm b/dom/phonenumberutils/PhoneNumber.jsm index 1b100eea35f..849fe639d2a 100644 --- a/dom/phonenumberutils/PhoneNumber.jsm +++ b/dom/phonenumberutils/PhoneNumber.jsm @@ -8,9 +8,13 @@ this.EXPORTED_SYMBOLS = ["PhoneNumber"]; -Components.utils.import("resource://gre/modules/PhoneNumberMetaData.jsm"); -Components.utils.import("resource://gre/modules/PhoneNumberNormalizer.jsm"); +const Cu = Components.utils; +Cu.import('resource://gre/modules/XPCOMUtils.jsm'); +XPCOMUtils.defineLazyModuleGetter(this, "PHONE_NUMBER_META_DATA", + "resource://gre/modules/PhoneNumberMetaData.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberNormalizer", + "resource://gre/modules/PhoneNumberNormalizer.jsm"); this.PhoneNumber = (function (dataBase) { // Use strict in our context only - users might not want it 'use strict'; diff --git a/dom/phonenumberutils/PhoneNumberUtils.jsm b/dom/phonenumberutils/PhoneNumberUtils.jsm index dcd4e9d453f..64ca55574ed 100644 --- a/dom/phonenumberutils/PhoneNumberUtils.jsm +++ b/dom/phonenumberutils/PhoneNumberUtils.jsm @@ -14,8 +14,10 @@ const Ci = Components.interfaces; Cu.import("resource://gre/modules/Services.jsm"); Cu.import('resource://gre/modules/XPCOMUtils.jsm'); -Cu.import("resource://gre/modules/PhoneNumberNormalizer.jsm"); -Cu.import("resource://gre/modules/mcc_iso3166_table.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumberNormalizer", + "resource://gre/modules/PhoneNumberNormalizer.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "MCC_ISO3166_TABLE", + "resource://gre/modules/mcc_iso3166_table.jsm"); #ifdef MOZ_B2G_RIL XPCOMUtils.defineLazyServiceGetter(this, "mobileConnection", @@ -196,7 +198,8 @@ this.PhoneNumberUtils = { let inParent = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime) .processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT; if (inParent) { - Cu.import("resource://gre/modules/PhoneNumber.jsm"); + XPCOMUtils.defineLazyModuleGetter(this, "PhoneNumber", + "resource://gre/modules/PhoneNumber.jsm"); XPCOMUtils.defineLazyServiceGetter(this, "ppmm", "@mozilla.org/parentprocessmessagemanager;1", "nsIMessageListenerManager"); From 6a00695aa4b91b50642c65a62e3ebbf5ed826b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Wed, 7 May 2014 15:53:17 -0700 Subject: [PATCH 08/13] Bug 1024157 - Lazy load more js modules - Part 3: RIL r=gene --- dom/mobilemessage/src/gonk/MobileMessageDB.jsm | 7 +++++-- dom/system/gonk/RILContentHelper.js | 7 +++++-- dom/system/gonk/RadioInterfaceLayer.js | 7 +++++-- dom/telephony/gonk/TelephonyService.js | 7 +++++-- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/dom/mobilemessage/src/gonk/MobileMessageDB.jsm b/dom/mobilemessage/src/gonk/MobileMessageDB.jsm index 2322e1646df..365f097197c 100644 --- a/dom/mobilemessage/src/gonk/MobileMessageDB.jsm +++ b/dom/mobilemessage/src/gonk/MobileMessageDB.jsm @@ -11,8 +11,11 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/PhoneNumberUtils.jsm"); Cu.importGlobalProperties(["indexedDB"]); -var RIL = {}; -Cu.import("resource://gre/modules/ril_consts.js", RIL); +XPCOMUtils.defineLazyGetter(this, "RIL", function () { + let obj = {}; + Cu.import("resource://gre/modules/ril_consts.js", obj); + return obj; +}); const RIL_GETMESSAGESCURSOR_CID = Components.ID("{484d1ad8-840e-4782-9dc4-9ebc4d914937}"); diff --git a/dom/system/gonk/RILContentHelper.js b/dom/system/gonk/RILContentHelper.js index cada95afd96..334942ba41e 100644 --- a/dom/system/gonk/RILContentHelper.js +++ b/dom/system/gonk/RILContentHelper.js @@ -21,8 +21,11 @@ Cu.import("resource://gre/modules/DOMRequestHelper.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -var RIL = {}; -Cu.import("resource://gre/modules/ril_consts.js", RIL); +XPCOMUtils.defineLazyGetter(this, "RIL", function () { + let obj = {}; + Cu.import("resource://gre/modules/ril_consts.js", obj); + return obj; +}); const NS_XPCOM_SHUTDOWN_OBSERVER_ID = "xpcom-shutdown"; diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index 55520bce7c1..98134c33327 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -24,8 +24,11 @@ Cu.import("resource://gre/modules/systemlibs.js"); Cu.import("resource://gre/modules/Promise.jsm"); Cu.import("resource://gre/modules/FileUtils.jsm"); -var RIL = {}; -Cu.import("resource://gre/modules/ril_consts.js", RIL); +XPCOMUtils.defineLazyGetter(this, "RIL", function () { + let obj = {}; + Cu.import("resource://gre/modules/ril_consts.js", obj); + return obj; +}); // Ril quirk to attach data registration on demand. let RILQUIRKS_DATA_REGISTRATION_ON_DEMAND = diff --git a/dom/telephony/gonk/TelephonyService.js b/dom/telephony/gonk/TelephonyService.js index 03e5244ca5a..b523d914a04 100644 --- a/dom/telephony/gonk/TelephonyService.js +++ b/dom/telephony/gonk/TelephonyService.js @@ -12,8 +12,11 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/Promise.jsm"); Cu.import("resource://gre/modules/systemlibs.js"); -var RIL = {}; -Cu.import("resource://gre/modules/ril_consts.js", RIL); +XPCOMUtils.defineLazyGetter(this, "RIL", function () { + let obj = {}; + Cu.import("resource://gre/modules/ril_consts.js", obj); + return obj; +}); const GONK_TELEPHONYSERVICE_CONTRACTID = "@mozilla.org/telephony/gonktelephonyservice;1"; From 6af25130b6e3e5bd9b1962af20f1a448c173b1f8 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Jun 2014 23:40:24 -0700 Subject: [PATCH 09/13] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d75252e83e48 Author: Rudy Lu Desc: Merge pull request #21101 from RudyLu/system/Bug1030058-remove_assets Bug 1030058 - apps/system/style/themes/default/images/ui/time_pattern.pn... r=pivanov ======== https://hg.mozilla.org/integration/gaia-central/rev/e17f6c52cc14 Author: Rudy Lu Desc: Bug 1030058 - apps/system/style/themes/default/images/ui/time_pattern.png should be removed. ======== https://hg.mozilla.org/integration/gaia-central/rev/7759d2755889 Author: steveck-chung Desc: Merge pull request #19991 from rnowm/1013296 Bug 1013296 - Compose. Change send button to an paper plane icon. r=steveck-chung ======== https://hg.mozilla.org/integration/gaia-central/rev/b48b7d480d04 Author: rnowm Desc: Bug 1013296 - Compose. Change send button to an paper plane icon --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 98e342b8d6b..15f72441d9a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "ffb53607d2941324814de17e527531b7ae91df77", + "revision": "d75252e83e48713c76466e299805ae2b35078e6a", "repo_path": "/integration/gaia-central" } From 3b220f6f8029a0fa00ae3927dbe08f15e6caa74e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Sun, 29 Jun 2014 23:41:46 -0700 Subject: [PATCH 10/13] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index c6b706d3852..7d97f6bfffe 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 8be9dccc068..48e26e1157c 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 34cbd0c5e99..3baa112c480 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index c6b706d3852..7d97f6bfffe 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 9a4fd6f01f6..0caac4398c5 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 1e82597625a..c09cc47ef24 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index d554a0720d2..b47f0cfb864 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 23a663bb945..f7b2f2ccba1 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index aa328b3e6e2..b8817809f74 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 28bdf2c297a65f0e3daae12ba40082244543d310 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 30 Jun 2014 00:50:26 -0700 Subject: [PATCH 11/13] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/2c2f2fa0a101 Author: chirarobert Desc: Merge pull request #21063 from zacc/bug_1005057_app_perms LGTM, merging as the failure from Travis is unrelated to the changes. ======== https://hg.mozilla.org/integration/gaia-central/rev/f132e488ea36 Author: Zac Desc: Bug 1005057 - Switch to system frame inside get/set permission test methods ======== https://hg.mozilla.org/integration/gaia-central/rev/3af7d2f1dc87 Author: steveck-chung Desc: Merge pull request #21100 from steveck-chung/bug-1021513 Bug 1021513 - [Messages] Recipients list container scroll up automatically when dragging down. r=azasypkin ======== https://hg.mozilla.org/integration/gaia-central/rev/3d93cbb9fa5c Author: Steve Chung Desc: Bug 1021513 - [Messages] Recipients list container scroll up automatically when dragging down the container for multiline recipients list mode --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 15f72441d9a..8e4c8d266bc 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d75252e83e48713c76466e299805ae2b35078e6a", + "revision": "2c2f2fa0a101f07cbb206cca2e69ef3a7b18244c", "repo_path": "/integration/gaia-central" } From 083f69fd599708b8c5acd75c5efa97c6547e18f4 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 30 Jun 2014 00:51:47 -0700 Subject: [PATCH 12/13] Bumping manifests a=b2g-bump --- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 7d97f6bfffe..e6a6a561d18 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 48e26e1157c..6b13719a6eb 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 3baa112c480..047d1a6aff7 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 7d97f6bfffe..e6a6a561d18 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 0caac4398c5..7d77041665e 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index c09cc47ef24..60b0ce04d13 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index b47f0cfb864..7dc63e1b46b 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index f7b2f2ccba1..7c25d9710cb 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index b8817809f74..8eda7941769 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 7c1eb4aff932b99ee9e7f4dd500d6b07e9e74337 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Tsai Date: Mon, 30 Jun 2014 14:48:41 +0800 Subject: [PATCH 13/13] Bug 1023141 - query ril.ecclist per dial request - part 3 - fix xpcshell. r=aknow --- dom/system/gonk/tests/test_ril_worker_ecm.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dom/system/gonk/tests/test_ril_worker_ecm.js b/dom/system/gonk/tests/test_ril_worker_ecm.js index 97627fa3600..2c6c88cf843 100644 --- a/dom/system/gonk/tests/test_ril_worker_ecm.js +++ b/dom/system/gonk/tests/test_ril_worker_ecm.js @@ -122,8 +122,9 @@ add_test(function test_request_exit_emergencyCbMode_when_dial() { }; // Dial non-emergency call. - context.RIL.dial({number: "0912345678", - isDialEmergency: false}); + context.RIL.dialNonEmergencyNumber({number: "0912345678", + isEmergency: false, + isDialEmergency: false}); // Should clear timeout event. do_check_eq(context.RIL._exitEmergencyCbModeTimeoutID, null);