Bug 820762 - 0003.Test if voicemailInfo is exposed. r=hsinyi

This commit is contained in:
Chuck Lee 2012-12-26 18:49:10 +08:00
parent d0b94c7804
commit 0dfb723b62
2 changed files with 27 additions and 1 deletions

View File

@ -5,4 +5,4 @@ qemu = true
[test_geolocation.js]
disabled = Bug 808783
[test_get_voicemailInfo.js]

View File

@ -0,0 +1,26 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 10000;
let Cc = SpecialPowers.Cc;
let Ci = SpecialPowers.Ci;
// Get system worker manager.
let systemWorkerManager = Cc["@mozilla.org/telephony/system-worker-manager;1"];
ok(systemWorkerManager);
// Get RadioIntefaceLayer interface.
let RIL = systemWorkerManager.getService(Ci.nsIInterfaceRequestor).
getInterface(Ci.nsIRadioInterfaceLayer);
ok(RIL);
// Check voicemail information accessible.
ok(RIL.voicemailInfo);
ok(RIL.voicemailInfo.number);
ok(RIL.voicemailInfo.displayName);
// These are the emulator's hard coded voicemail number and alphaId.
is(RIL.voicemailInfo.number, "+15552175049");
is(RIL.voicemailInfo.displayName, "Voicemail");
finish();