Bug 782603 - Part 4: Marionette unit tests for exposing MCC/MNC codes. r=marshall_law

This commit is contained in:
Jose Antonio Olivera Ortega 2012-09-03 17:44:34 -04:00
parent fd03e654fa
commit 0ab2881221
2 changed files with 23 additions and 0 deletions

View File

@ -8,3 +8,8 @@ qemu = true
b2g = true
browser = false
qemu = true
[test_mobile_iccinfo.js]
b2g = true
browser = false
qemu = true

View File

@ -0,0 +1,18 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000;
SpecialPowers.addPermission("mobileconnection", true, document);
let connection = navigator.mozMobileConnection;
ok(connection instanceof MozMobileConnection,
"connection is instanceof " + connection.constructor);
// The emulator's hard coded mcc and mnc codes.
// See it here {B2G_HOME}/external/qemu/telephony/android_modem.c#L2465.
is(connection.iccInfo.mcc, 310);
is(connection.iccInfo.mnc, 260);
SpecialPowers.removePermission("mobileconnection", document);
finish();