Bug 1033142 - Part 3: test cases for mvno type 'gid' in matchMvno() function. r=hsinyi
authorJessica Jong <jjong@mozilla.com>
Fri, 18 Jul 2014 11:41:38 +0800
changeset 216692 8a76262cd5f0a7420ff1d7d7980922ecd95bf45c
parent 216691 6b72a8cb2e98e46b35838bbf29010016ac3dbced
child 216693 d5d7966424b70d22ea836b296ee7c774ceafff5a
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsinyi
bugs1033142
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1033142 - Part 3: test cases for mvno type 'gid' in matchMvno() function. r=hsinyi
dom/icc/tests/marionette/test_icc_match_mvno.js
--- a/dom/icc/tests/marionette/test_icc_match_mvno.js
+++ b/dom/icc/tests/marionette/test_icc_match_mvno.js
@@ -1,32 +1,39 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 MARIONETTE_TIMEOUT = 30000;
 MARIONETTE_HEAD_JS = "icc_header.js";
 
-// Emulator's hard coded IMSI: 310260000000000
 let testCases = [
   // mvno type, mvno data, request success, expected result
+  // Emulator's hard coded IMSI: 310260000000000
   ["imsi", "3102600",            true, true               ],
   // x and X means skip the comparison.
   ["imsi", "31026xx0",           true, true               ],
   ["imsi", "310260x0x",          true, true               ],
   ["imsi", "310260X00",          true, true               ],
   ["imsi", "310260XX1",          true, false              ],
   ["imsi", "31026012",           true, false              ],
   ["imsi", "310260000000000",    true, true               ],
   ["imsi", "310260000000000123", true, false              ],
   ["imsi", "",                   false, "InvalidParameter"],
+  // Emulator's hard coded SPN:  Android
   ["spn",  "Android",            true, true               ],
   ["spn",  "",                   false, "InvalidParameter"],
   ["spn",  "OneTwoThree",        true, false              ],
-  // mvno type gid is not supported yet.
-  ["gid",  "A1",                 false, "ModeNotSupported"]
+  // Emulator's hard coded GID1: 5a4d
+  ["gid",  "",                   false, "InvalidParameter"],
+  ["gid",  "A1",                 true, false              ],
+  ["gid",  "5A",                 true, true               ],
+  ["gid",  "5a",                 true, true               ],
+  ["gid",  "5a4d",               true, true               ],
+  ["gid",  "5A4D",               true, true               ],
+  ["gid",  "5a4d6c",             true, false              ]
 ];
 
 function matchMvno(mvnoType, mvnoData, success, expectedResult) {
   log("matchMvno: " + mvnoType + ", " + mvnoData);
   let request = icc.matchMvno(mvnoType, mvnoData);
   request.onsuccess = function onsuccess() {
     log("onsuccess: " + request.result);
     ok(success, "onsuccess while error expected");