Bug 1064303 - After adding new SIM with MSISDN on device, the mobile ID dialog doesn't show up with "Get Assertion" with the new phone number. r=spenrose, a=lmandel
authorFernando Jiménez <ferjmoreno@gmail.com>
Tue, 09 Sep 2014 16:09:25 +0200
changeset 224974 a7eb702d7b04419203929a65efe5e45a0f35c75d
parent 224973 8c476a8907350129c4ea8bee67258da723eed901
child 224975 32c3c24b52d2f91877b2fd2df7901a3dbd3a7ecd
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersspenrose, lmandel
bugs1064303
milestone34.0a2
Bug 1064303 - After adding new SIM with MSISDN on device, the mobile ID dialog doesn't show up with "Get Assertion" with the new phone number. r=spenrose, a=lmandel
services/mobileid/MobileIdentityManager.jsm
services/mobileid/tests/xpcshell/test_mobileid_manager.js
--- a/services/mobileid/MobileIdentityManager.jsm
+++ b/services/mobileid/MobileIdentityManager.jsm
@@ -854,23 +854,23 @@ this.MobileIdentityManager = {
         log.debug("Looking for SIM changes. Credentials ICCS ${creds} " +
                   "Device ICCS ${device}", { creds: creds.deviceIccIds,
                                              device: this.iccIds });
         let simChanged = (creds.deviceIccIds == null && this.iccIds != null) ||
                          (creds.deviceIccIds != null && this.iccIds == null);
 
         if (!simChanged &&
             creds.deviceIccIds != null &&
-            this.IccIds != null) {
+            this.iccIds != null) {
           simChanged = creds.deviceIccIds.length != this.iccIds.length;
         }
 
         if (!simChanged &&
             creds.deviceIccIds != null &&
-            this.IccIds != null) {
+            this.iccIds != null) {
           let intersection = creds.deviceIccIds.filter((n) => {
             return this.iccIds.indexOf(n) != -1;
           });
           simChanged = intersection.length != creds.deviceIccIds.length ||
                        intersection.length != this.iccIds.length;
         }
 
         if (!simChanged) {
--- a/services/mobileid/tests/xpcshell/test_mobileid_manager.js
+++ b/services/mobileid/tests/xpcshell/test_mobileid_manager.js
@@ -893,16 +893,18 @@ add_test(function() {
       origin: ORIGIN,
       deviceIccIds: [ICC_ID]
     }
   });
   MobileIdentityManager.credStore = credStore;
   let client = new MockClient();
   MobileIdentityManager.client = client;
 
+  MobileIdentityManager.iccInfo = [];
+
   let promiseId = Date.now();
   let mm = {
     sendAsyncMessage: function(aMsg, aData) {
       do_print("sendAsyncMessage " + aMsg + " - " + JSON.stringify(aData));
 
       // Check result.
       do_check_eq(aMsg, GET_ASSERTION_RETURN_OK);
       do_check_eq(typeof aData, "object");
@@ -983,16 +985,18 @@ add_test(function() {
   let client = new MockClient({
     verifyCodeResult: ANOTHER_PHONE_NUMBER,
     registerResult: {
       msisdnSessionToken: _sessionToken
     }
   });
   MobileIdentityManager.client = client;
 
+  MobileIdentityManager.iccInfo = [];
+
   let promiseId = Date.now();
   let mm = {
     sendAsyncMessage: function(aMsg, aData) {
       do_print("sendAsyncMessage " + aMsg + " - " + JSON.stringify(aData));
 
       // Check result.
       do_check_eq(aMsg, GET_ASSERTION_RETURN_OK);
       do_check_eq(typeof aData, "object");