Skip to content

Commit

Permalink
Bug 782603 - Part 4: Marionette unit tests for exposing MCC/MNC codes…
Browse files Browse the repository at this point in the history
…. r=marshall_law
  • Loading branch information
jaoo committed Sep 3, 2012
1 parent 5ef037a commit 0ebc307
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dom/network/tests/marionette/manifest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ qemu = true
b2g = true
browser = false
qemu = true

[test_mobile_iccinfo.js]
b2g = true
browser = false
qemu = true
18 changes: 18 additions & 0 deletions dom/network/tests/marionette/test_mobile_iccinfo.js
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 0ebc307

Please sign in to comment.