Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bug 825121 - [Lockscreen] service provider shown wrongly when roaming

  • Loading branch information...
commit 6c1de8106e36b9a24b1cb1ac9033da9a73d4a841 1 parent 8ab069f
Anthony Ricaud authored January 08, 2013
15  apps/system/test/unit/mobile_operator_test.js
@@ -52,6 +52,21 @@ suite('shared/MobileOperator', function() {
52 52
       assert.isUndefined(infos.carrier);
53 53
       assert.isUndefined(infos.region);
54 54
     });
  55
+    test('Connection with roaming', function() {
  56
+      MockMobileConnection.voice.roaming = true;
  57
+      var infos = MobileOperator.userFacingInfo(MockMobileConnection);
  58
+      assert.equal(infos.operator, 'Fake short');
  59
+      assert.isUndefined(infos.carrier);
  60
+      assert.isUndefined(infos.region);
  61
+    });
  62
+    test('Connection with roaming and SPN display', function() {
  63
+      MockMobileConnection.voice.roaming = true;
  64
+      MockMobileConnection.iccInfo.isDisplaySpnRequired = true;
  65
+      var infos = MobileOperator.userFacingInfo(MockMobileConnection);
  66
+      assert.equal(infos.operator, 'Fake short');
  67
+      assert.isUndefined(infos.carrier);
  68
+      assert.isUndefined(infos.region);
  69
+    });
55 70
   });
56 71
   suite('Brazilian connection', function() {
57 72
     test('Connection ', function() {
3  shared/js/mobile_operator.js
@@ -9,7 +9,8 @@ var MobileOperator = {
9 9
     var iccInfo = mobileConnection.iccInfo;
10 10
     var operator = network.shortName || network.longName;
11 11
 
12  
-    if (iccInfo.isDisplaySpnRequired && iccInfo.spn) {
  12
+    if (iccInfo.isDisplaySpnRequired && iccInfo.spn
  13
+        && !mobileConnection.voice.roaming) {
13 14
       if (iccInfo.isDisplayNetworkNameRequired) {
14 15
         operator = operator + ' ' + iccInfo.spn;
15 16
       } else {

0 notes on commit 6c1de81

Please sign in to comment.
Something went wrong with that request. Please try again.