dom/telephony/test/marionette/test_emergency_badNumber.js

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:bbd9530585fe
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 });

mercurial