diff --git a/dom/telephony/test/marionette/head.js b/dom/telephony/test/marionette/head.js index 93e8fd95a3eb..1e23d7d52f65 100644 --- a/dom/telephony/test/marionette/head.js +++ b/dom/telephony/test/marionette/head.js @@ -288,6 +288,38 @@ let emulator = (function() { }; } + /** + * Convenient helper to check the expected call number and name. + * + * @param number + * A string sent to modem. + * @param numberPresentation + * An unsigned short integer sent to modem. + * @param name + * A string sent to modem. + * @param namePresentation + * An unsigned short integer sent to modem. + * @param receivedNumber + * A string exposed by Telephony API. + * @param receivedName + * A string exposed by Telephony API. + */ + function checkCallId(number, numberPresentation, name, namePresentation, + receivedNumber, receivedName) { + let expectedNum = !numberPresentation ? number : ""; + is(receivedNumber, expectedNum, "check number per numberPresentation"); + + let expectedName; + if (numberPresentation) { + expectedName = ""; + } else if (!namePresentation) { + expectedName = name ? name : ""; + } else { + expectedName = ""; + } + is(receivedName, expectedName, "check name per number/namePresentation"); + } + /** * Convenient helper to check the call list existing in the emulator. * @@ -394,7 +426,7 @@ let emulator = (function() { telephony.dial(number, serviceId).then(call => { ok(call); - is(call.number, number); + is(call.id.number, number); is(call.state, "dialing"); is(call.serviceId, serviceId); @@ -497,14 +529,41 @@ let emulator = (function() { return deferred.promise; } + /** + * Locally hang up a call. + * + * @param call + * A TelephonyCall object. + * @return A deferred promise. + */ + function hangUp(call) { + let deferred = Promise.defer(); + + call.ondisconnected = function(event) { + log("Received 'disconnected' call event"); + call.ondisconnected = null; + checkEventCallState(event, call, "disconnected"); + deferred.resolve(call); + }; + call.hangUp(); + + return deferred.promise; + } + /** * Simulate an incoming call. * * @param number * A string. + * @param numberPresentation [optional] + * An unsigned short integer. + * @param name [optional] + * A string. + * @param namePresentation [optional] + * An unsigned short integer. * @return A deferred promise. */ - function remoteDial(number) { + function remoteDial(number, numberPresentation, name, namePresentation) { log("Simulating an incoming call."); let deferred = Promise.defer(); @@ -516,13 +575,17 @@ let emulator = (function() { let call = event.call; ok(call); - is(call.number, number); is(call.state, "incoming"); - + checkCallId(number, numberPresentation, name, namePresentation, + call.id.number, call.id.name); deferred.resolve(call); }; - emulator.run("gsm call " + number); + numberPresentation = numberPresentation || ""; + name = name || ""; + namePresentation = namePresentation || ""; + emulator.run("gsm call " + number + "," + numberPresentation + "," + name + + "," + namePresentation); return deferred.promise; } @@ -544,7 +607,7 @@ let emulator = (function() { checkEventCallState(event, call, "connected"); deferred.resolve(call); }; - emulator.run("gsm accept " + call.number); + emulator.run("gsm accept " + call.id.number); return deferred.promise; } @@ -567,7 +630,7 @@ let emulator = (function() { checkEventCallState(event, call, "disconnected"); deferred.resolve(call); }; - emulator.run("gsm cancel " + call.number); + emulator.run("gsm cancel " + call.id.number); return deferred.promise; } @@ -616,7 +679,7 @@ let emulator = (function() { let check_onconnected = StateEventChecker('connected', 'onresuming'); for (let call of callsToAdd) { - let callName = "callToAdd (" + call.number + ')'; + let callName = "callToAdd (" + call.id.number + ')'; let ongroupchange = callName + ".ongroupchange"; pending.push(ongroupchange); @@ -677,7 +740,7 @@ let emulator = (function() { let check_onheld = StateEventChecker('held', 'onholding'); for (let call of calls) { - let callName = "call (" + call.number + ')'; + let callName = "call (" + call.id.number + ')'; let onholding = callName + ".onholding"; pending.push(onholding); @@ -730,7 +793,7 @@ let emulator = (function() { let check_onconnected = StateEventChecker('connected', 'onresuming'); for (let call of calls) { - let callName = "call (" + call.number + ')'; + let callName = "call (" + call.id.number + ')'; let onresuming = callName + ".onresuming"; pending.push(onresuming); @@ -789,7 +852,7 @@ let emulator = (function() { // Remained call in conference will be held. for (let call of remainedCalls) { - let callName = "remainedCall (" + call.number + ')'; + let callName = "remainedCall (" + call.id.number + ')'; let onstatechange = callName + ".onstatechange"; pending.push(onstatechange); @@ -800,7 +863,7 @@ let emulator = (function() { // When a call is removed from conference with 2 calls, another one will be // automatically removed from group and be put on hold. for (let call of autoRemovedCalls) { - let callName = "autoRemovedCall (" + call.number + ')'; + let callName = "autoRemovedCall (" + call.id.number + ')'; let ongroupchange = callName + ".ongroupchange"; pending.push(ongroupchange); @@ -873,7 +936,7 @@ let emulator = (function() { // When a call is hang up from conference with 2 calls, another one will be // automatically removed from group. for (let call of autoRemovedCalls) { - let callName = "autoRemovedCall (" + call.number + ')'; + let callName = "autoRemovedCall (" + call.id.number + ')'; let ongroupchange = callName + ".ongroupchange"; pending.push(ongroupchange); @@ -962,8 +1025,8 @@ let emulator = (function() { function createCallAndAddToConference(inNumber, conferenceCalls) { // Create an info array. allInfo = [info1, info2, ...]. let allInfo = conferenceCalls.map(function(call, i) { - return (i === 0) ? outCallStrPool(call.number) - : inCallStrPool(call.number); + return (i === 0) ? outCallStrPool(call.id.number) + : inCallStrPool(call.id.number); }); // Define state property of the info array. @@ -1042,6 +1105,7 @@ let emulator = (function() { this.gCheckAll = checkAll; this.gDial = dial; this.gAnswer = answer; + this.gHangUp = hangUp; this.gHold = hold; this.gRemoteDial = remoteDial; this.gRemoteAnswer = remoteAnswer; diff --git a/dom/telephony/test/marionette/manifest.ini b/dom/telephony/test/marionette/manifest.ini index 17bbdb91ae4d..25a593c4c6b4 100644 --- a/dom/telephony/test/marionette/manifest.ini +++ b/dom/telephony/test/marionette/manifest.ini @@ -57,3 +57,4 @@ disabled = Bug 821958 [test_conference_three_hangup_one.js] [test_conference_three_remove_one.js] [test_outgoing_when_two_calls_on_line.js] +[test_call_presentation.js] diff --git a/dom/telephony/test/marionette/test_call_presentation.js b/dom/telephony/test/marionette/test_call_presentation.js new file mode 100644 index 000000000000..67b5c330fa8f --- /dev/null +++ b/dom/telephony/test/marionette/test_call_presentation.js @@ -0,0 +1,71 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +MARIONETTE_TIMEOUT = 60000; +MARIONETTE_HEAD_JS = 'head.js'; + +const ALLOWED = 0; +const RESTRICTED = 1; +const UNKNOWN = 2; +const PAYPHONE =3; + +function getPresentationStr(presentation) { + let str; + switch (presentation) { + case ALLOWED: + str = "allowed"; + break; + case RESTRICTED: + str = "restricted"; + break; + case UNKNOWN: + str = "unknown"; + break; + case PAYPHONE: + str = "payphone"; + break; + } + return str; +} + +function getNamePresentation(numberPresentation, namePresentation) { + // See TS 23.096 Figure 3a and Annex A Note 1. + if (!numberPresentation) { + if (namePresentation == undefined) { + namePresentation = ALLOWED; + } + } else { + namePresentation = ALLOWED; + } + return getPresentationStr(namePresentation); +} + +function test(number, numberPresentation, name, namePresentation) { + return gRemoteDial(number, numberPresentation, name, namePresentation) + .then(call => { + is(call.id.numberPresentation, getPresentationStr(numberPresentation), + "check numberPresentation"); + is(call.id.namePresentation, + getNamePresentation(numberPresentation, namePresentation), + "check namePresentation"); + return call; + }) + .then(gHangUp); +} + +startTest(function() { + let inNumber = "5555550201"; + Promise.resolve() + .then(() => test(inNumber, ALLOWED)) + .then(() => test(inNumber, RESTRICTED)) + .then(() => test(inNumber, UNKNOWN)) + .then(() => test(inNumber, PAYPHONE)) + .then(() => test(inNumber, ALLOWED, "TestName")) + .then(() => test(inNumber, ALLOWED, "TestName", ALLOWED)) + .then(() => test(inNumber, ALLOWED, "TestName", RESTRICTED)) + .then(() => test(inNumber, ALLOWED, "TestName", UNKNOWN)) + .then(() => test(inNumber, RESTRICTED, "TestName", ALLOWED)) + .then(() => test(inNumber, RESTRICTED, "TestName", RESTRICTED)) + .then(() => test(inNumber, RESTRICTED, "TestName", UNKNOWN)) + .then(finish); +}); diff --git a/dom/telephony/test/marionette/test_emergency.js b/dom/telephony/test/marionette/test_emergency.js index d2776870adff..0dcd23ba1d4a 100644 --- a/dom/telephony/test/marionette/test_emergency.js +++ b/dom/telephony/test/marionette/test_emergency.js @@ -14,7 +14,7 @@ function dial() { telephony.dialEmergency(number).then(call => { outgoing = call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing.state, "dialing"); is(outgoing, telephony.active); diff --git a/dom/telephony/test/marionette/test_incoming_already_connected.js b/dom/telephony/test/marionette/test_incoming_already_connected.js index 6e29a7fbe789..33166b58b403 100644 --- a/dom/telephony/test/marionette/test_incoming_already_connected.js +++ b/dom/telephony/test/marionette/test_incoming_already_connected.js @@ -15,7 +15,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); @@ -74,7 +74,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); // Should be two calls now diff --git a/dom/telephony/test/marionette/test_incoming_already_held.js b/dom/telephony/test/marionette/test_incoming_already_held.js index eee889f8c926..689c6855f656 100644 --- a/dom/telephony/test/marionette/test_incoming_already_held.js +++ b/dom/telephony/test/marionette/test_incoming_already_held.js @@ -15,7 +15,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); @@ -105,7 +105,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); // Should be two calls now diff --git a/dom/telephony/test/marionette/test_incoming_answer_hangup.js b/dom/telephony/test/marionette/test_incoming_answer_hangup.js index 001dfcc05362..4ecafddd55b4 100644 --- a/dom/telephony/test/marionette/test_incoming_answer_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_answer_hangup.js @@ -15,7 +15,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incoming = event.call; ok(incoming); - is(incoming.number, number); + is(incoming.id.number, number); is(incoming.state, "incoming"); //ok(telephony.calls === calls); // bug 717414 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 d2d165f5f7bf..7a9c3ef69b15 100644 --- a/dom/telephony/test/marionette/test_incoming_answer_hangup_oncallschanged.js +++ b/dom/telephony/test/marionette/test_incoming_answer_hangup_oncallschanged.js @@ -22,7 +22,7 @@ function simulateIncoming() { incoming = event.call; ok(incoming); - is(incoming.number, number); + is(incoming.id.number, number); is(incoming.state, "incoming"); is(telephony.calls.length, 1); 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 3a02fee00dd7..28832dba61c3 100644 --- a/dom/telephony/test/marionette/test_incoming_answer_remote_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_answer_remote_hangup.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); diff --git a/dom/telephony/test/marionette/test_incoming_connecting_hangup.js b/dom/telephony/test/marionette/test_incoming_connecting_hangup.js index 1e9f30900e1a..9ccba0fbe681 100644 --- a/dom/telephony/test/marionette/test_incoming_connecting_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_connecting_hangup.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); 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 5116123eb69e..e45906823c4b 100644 --- a/dom/telephony/test/marionette/test_incoming_connecting_remote_hangup.js +++ b/dom/telephony/test/marionette/test_incoming_connecting_remote_hangup.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); diff --git a/dom/telephony/test/marionette/test_incoming_hangup_held.js b/dom/telephony/test/marionette/test_incoming_hangup_held.js index c0dac6710f70..e520eab6c78d 100644 --- a/dom/telephony/test/marionette/test_incoming_hangup_held.js +++ b/dom/telephony/test/marionette/test_incoming_hangup_held.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); diff --git a/dom/telephony/test/marionette/test_incoming_hold_resume.js b/dom/telephony/test/marionette/test_incoming_hold_resume.js index ef80c2a4f316..3280d56dc31b 100644 --- a/dom/telephony/test/marionette/test_incoming_hold_resume.js +++ b/dom/telephony/test/marionette/test_incoming_hold_resume.js @@ -15,7 +15,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, number); + is(incomingCall.id.number, number); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); diff --git a/dom/telephony/test/marionette/test_incoming_onstatechange.js b/dom/telephony/test/marionette/test_incoming_onstatechange.js index 3bf83917df94..4040971f0170 100644 --- a/dom/telephony/test/marionette/test_incoming_onstatechange.js +++ b/dom/telephony/test/marionette/test_incoming_onstatechange.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); diff --git a/dom/telephony/test/marionette/test_incoming_reject.js b/dom/telephony/test/marionette/test_incoming_reject.js index d33328d9b252..5cbe3df4b22b 100644 --- a/dom/telephony/test/marionette/test_incoming_reject.js +++ b/dom/telephony/test/marionette/test_incoming_reject.js @@ -15,7 +15,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incoming = event.call; ok(incoming); - is(incoming.number, number); + is(incoming.id.number, number); is(incoming.state, "incoming"); //ok(telephony.calls === calls); // bug 717414 diff --git a/dom/telephony/test/marionette/test_incoming_remote_cancel.js b/dom/telephony/test/marionette/test_incoming_remote_cancel.js index d57507cd57c6..1a1301cd98f5 100644 --- a/dom/telephony/test/marionette/test_incoming_remote_cancel.js +++ b/dom/telephony/test/marionette/test_incoming_remote_cancel.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); 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 5668e09da75e..f0318d5c4bae 100644 --- a/dom/telephony/test/marionette/test_incoming_remote_hangup_held.js +++ b/dom/telephony/test/marionette/test_incoming_remote_hangup_held.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); diff --git a/dom/telephony/test/marionette/test_multiple_hold.js b/dom/telephony/test/marionette/test_multiple_hold.js index 3ae35f1608ba..84df513bb915 100644 --- a/dom/telephony/test/marionette/test_multiple_hold.js +++ b/dom/telephony/test/marionette/test_multiple_hold.js @@ -16,7 +16,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); @@ -99,7 +99,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); is(telephony.calls.length, 2); diff --git a/dom/telephony/test/marionette/test_outgoing_already_held.js b/dom/telephony/test/marionette/test_outgoing_already_held.js index ca7ff2b6c0e5..4c5b0c8a4168 100644 --- a/dom/telephony/test/marionette/test_outgoing_already_held.js +++ b/dom/telephony/test/marionette/test_outgoing_already_held.js @@ -16,7 +16,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); @@ -112,7 +112,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); diff --git a/dom/telephony/test/marionette/test_outgoing_answer_hangup.js b/dom/telephony/test/marionette/test_outgoing_answer_hangup.js index 366edd409836..1b1722afede0 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_hangup.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_hangup.js @@ -14,7 +14,7 @@ function dial() { telephony.dial(number).then(call => { outgoing = call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing.state, "dialing"); is(outgoing, telephony.active); 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 bbf2247c531d..7c44ea077d59 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_hangup_oncallschanged.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_hangup_oncallschanged.js @@ -25,7 +25,7 @@ function dial() { if (event.call.state == "dialing") { outgoing = event.call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing, telephony.active); is(telephony.calls.length, 1); 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 15cc85ec8b0d..f936f95e53c9 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_local_hangup.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_local_hangup.js @@ -13,7 +13,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); 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 3696e89c7d8f..238d10d9f126 100644 --- a/dom/telephony/test/marionette/test_outgoing_answer_radio_off.js +++ b/dom/telephony/test/marionette/test_outgoing_answer_radio_off.js @@ -32,7 +32,7 @@ function dial(number) { let deferred = Promise.defer(); telephony.dial(number).then(call => { ok(call); - is(call.number, number); + is(call.id.number, number); is(call.state, "dialing"); call.onalerting = function(event) { @@ -59,7 +59,7 @@ function remoteAnswer(call) { is(call.state, "connected"); deferred.resolve(call); }; - emulator.run("gsm accept " + call.number); + emulator.run("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 c02d746b925b..f7f937547fa5 100644 --- a/dom/telephony/test/marionette/test_outgoing_badNumber.js +++ b/dom/telephony/test/marionette/test_outgoing_badNumber.js @@ -17,7 +17,7 @@ function dial() { telephony.dial(number).then(call => { outgoing = call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing.state, "dialing"); is(outgoing, telephony.active); diff --git a/dom/telephony/test/marionette/test_outgoing_busy.js b/dom/telephony/test/marionette/test_outgoing_busy.js index d97ca064e9b0..fc8c7de669ed 100644 --- a/dom/telephony/test/marionette/test_outgoing_busy.js +++ b/dom/telephony/test/marionette/test_outgoing_busy.js @@ -13,7 +13,7 @@ function dial() { telephony.dial(number).then(call => { outgoing = call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing.state, "dialing"); is(outgoing, telephony.active); diff --git a/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js b/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js index 2299014284aa..183ba64bfcd8 100644 --- a/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js +++ b/dom/telephony/test/marionette/test_outgoing_hangup_alerting.js @@ -14,7 +14,7 @@ function dial() { telephony.dial(number).then(call => { outgoing = call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing.state, "dialing"); is(outgoing, telephony.active); diff --git a/dom/telephony/test/marionette/test_outgoing_hangup_held.js b/dom/telephony/test/marionette/test_outgoing_hangup_held.js index 97293a71e6bd..2de96750fadf 100644 --- a/dom/telephony/test/marionette/test_outgoing_hangup_held.js +++ b/dom/telephony/test/marionette/test_outgoing_hangup_held.js @@ -14,7 +14,7 @@ function dial() { telephony.dial(number).then(call => { outgoing = call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing.state, "dialing"); is(outgoing, telephony.active); //ok(telephony.calls === calls); // bug 717414 diff --git a/dom/telephony/test/marionette/test_outgoing_hold_resume.js b/dom/telephony/test/marionette/test_outgoing_hold_resume.js index 6f6edd0c7527..324ab1031466 100644 --- a/dom/telephony/test/marionette/test_outgoing_hold_resume.js +++ b/dom/telephony/test/marionette/test_outgoing_hold_resume.js @@ -14,7 +14,7 @@ function dial() { telephony.dial(number).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, number); + is(outgoingCall.id.number, number); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); diff --git a/dom/telephony/test/marionette/test_outgoing_onstatechange.js b/dom/telephony/test/marionette/test_outgoing_onstatechange.js index 5ef462610633..947c6f1fffc7 100644 --- a/dom/telephony/test/marionette/test_outgoing_onstatechange.js +++ b/dom/telephony/test/marionette/test_outgoing_onstatechange.js @@ -13,7 +13,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); diff --git a/dom/telephony/test/marionette/test_outgoing_reject.js b/dom/telephony/test/marionette/test_outgoing_reject.js index 915623bec614..6a7630875593 100644 --- a/dom/telephony/test/marionette/test_outgoing_reject.js +++ b/dom/telephony/test/marionette/test_outgoing_reject.js @@ -13,7 +13,7 @@ function dial() { telephony.dial(number).then(call => { outgoing = call; ok(outgoing); - is(outgoing.number, number); + is(outgoing.id.number, number); is(outgoing.state, "dialing"); is(outgoing, telephony.active); 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 8d56b990df75..3a03267c2dad 100644 --- a/dom/telephony/test/marionette/test_outgoing_remote_hangup_held.js +++ b/dom/telephony/test/marionette/test_outgoing_remote_hangup_held.js @@ -12,7 +12,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); is(outgoingCall, telephony.active); diff --git a/dom/telephony/test/marionette/test_redundant_operations.js b/dom/telephony/test/marionette/test_redundant_operations.js index 9ee7bb286c3a..4e07ac8e6305 100644 --- a/dom/telephony/test/marionette/test_redundant_operations.js +++ b/dom/telephony/test/marionette/test_redundant_operations.js @@ -14,7 +14,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); is(telephony.calls.length, 1); 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 a304667f54ae..a4a5f97cf812 100644 --- a/dom/telephony/test/marionette/test_swap_held_and_active.js +++ b/dom/telephony/test/marionette/test_swap_held_and_active.js @@ -17,7 +17,7 @@ function dial() { telephony.dial(outNumber).then(call => { outgoingCall = call; ok(outgoingCall); - is(outgoingCall.number, outNumber); + is(outgoingCall.id.number, outNumber); is(outgoingCall.state, "dialing"); outgoingCall.onalerting = function onalerting(event) { @@ -107,7 +107,7 @@ function simulateIncoming() { log("Received 'incoming' call event."); incomingCall = event.call; ok(incomingCall); - is(incomingCall.number, inNumber); + is(incomingCall.id.number, inNumber); is(incomingCall.state, "incoming"); // Should be two calls now