|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 * http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 MARIONETTE_TIMEOUT = 60000; |
|
5 MARIONETTE_HEAD_JS = 'head.js'; |
|
6 |
|
7 let number = "not a valid emergency number"; |
|
8 |
|
9 function dial() { |
|
10 log("Make an outgoing call to an invalid number."); |
|
11 |
|
12 telephony.dialEmergency(number).then(null, cause => { |
|
13 log("Received promise 'reject'"); |
|
14 |
|
15 is(telephony.active, null); |
|
16 is(telephony.calls.length, 0); |
|
17 is(cause, "BadNumberError"); |
|
18 |
|
19 emulator.run("gsm list", function(result) { |
|
20 log("Initial call list: " + result); |
|
21 is(result[0], "OK"); |
|
22 cleanUp(); |
|
23 }); |
|
24 }); |
|
25 } |
|
26 |
|
27 function cleanUp() { |
|
28 finish(); |
|
29 } |
|
30 |
|
31 startTest(function() { |
|
32 dial(); |
|
33 }); |