michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: MARIONETTE_TIMEOUT = 60000; michael@0: MARIONETTE_HEAD_JS = 'head.js'; michael@0: michael@0: let number = "not a valid emergency number"; michael@0: michael@0: function dial() { michael@0: log("Make an outgoing call to an invalid number."); michael@0: michael@0: telephony.dialEmergency(number).then(null, cause => { michael@0: log("Received promise 'reject'"); michael@0: michael@0: is(telephony.active, null); michael@0: is(telephony.calls.length, 0); michael@0: is(cause, "BadNumberError"); michael@0: michael@0: emulator.run("gsm list", function(result) { michael@0: log("Initial call list: " + result); michael@0: is(result[0], "OK"); michael@0: cleanUp(); michael@0: }); michael@0: }); michael@0: } michael@0: michael@0: function cleanUp() { michael@0: finish(); michael@0: } michael@0: michael@0: startTest(function() { michael@0: dial(); michael@0: });