From 0dfb723b6248ce4898686cfe57147703108f099f Mon Sep 17 00:00:00 2001 From: Chuck Lee Date: Wed, 26 Dec 2012 18:49:10 +0800 Subject: [PATCH] Bug 820762 - 0003.Test if voicemailInfo is exposed. r=hsinyi --- dom/system/gonk/tests/marionette/manifest.ini | 2 +- .../marionette/test_get_voicemailInfo.js | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 dom/system/gonk/tests/marionette/test_get_voicemailInfo.js diff --git a/dom/system/gonk/tests/marionette/manifest.ini b/dom/system/gonk/tests/marionette/manifest.ini index 2bb77dab4c9..0499a55955e 100644 --- a/dom/system/gonk/tests/marionette/manifest.ini +++ b/dom/system/gonk/tests/marionette/manifest.ini @@ -5,4 +5,4 @@ qemu = true [test_geolocation.js] disabled = Bug 808783 - +[test_get_voicemailInfo.js] diff --git a/dom/system/gonk/tests/marionette/test_get_voicemailInfo.js b/dom/system/gonk/tests/marionette/test_get_voicemailInfo.js new file mode 100644 index 00000000000..74bb3582baf --- /dev/null +++ b/dom/system/gonk/tests/marionette/test_get_voicemailInfo.js @@ -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();