Bug 804671 - Part 4: marrionette tests for PROVIDE_LOCAL_INFORMATION. r=allstars.chh
authorEdgar Chen <echen@mozilla.com>
Mon, 26 Nov 2012 16:37:35 +0800
changeset 124563 e5e4ea3327df1d5103afd699179dcc1f100b759b
parent 124562 7169b3dfe53a7ebe96160b2f5963ee122bee34f9
child 124564 0770315e3538430d517efbb584fce361f79a823b
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersallstars
bugs804671
milestone20.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 804671 - Part 4: marrionette tests for PROVIDE_LOCAL_INFORMATION. r=allstars.chh
dom/icc/tests/marionette/test_stk_proactive_command.js
--- a/dom/icc/tests/marionette/test_stk_proactive_command.js
+++ b/dom/icc/tests/marionette/test_stk_proactive_command.js
@@ -12,19 +12,67 @@ function testDisplayTextGsm7BitEncoding(
   log("STK CMD " + JSON.stringify(cmd));
   is(cmd.typeOfCommand, icc.STK_CMD_DISPLAY_TEXT);
   is(cmd.options.userClear, true);
   is(cmd.options.text, "Saldo 2.04 E. Validez 20/05/13. ");
 
   runNextTest();
 }
 
+function testLocalInfoLocation(cmd) {
+  log("STK CMD " + JSON.stringify(cmd));
+  is(cmd.typeOfCommand, icc.STK_CMD_PROVIDE_LOCAL_INFO);
+  is(cmd.commandNumber, 0x01);
+  is(cmd.commandQualifier, icc.STK_LOCAL_INFO_LOCATION_INFO);
+  is(cmd.options.localInfoType, icc.STK_LOCAL_INFO_LOCATION_INFO);
+
+  runNextTest();
+}
+
+function testLocalInfoImei(cmd) {
+  log("STK CMD " + JSON.stringify(cmd));
+  is(cmd.typeOfCommand, icc.STK_CMD_PROVIDE_LOCAL_INFO);
+  is(cmd.commandNumber, 0x01);
+  is(cmd.commandQualifier, icc.STK_LOCAL_INFO_IMEI);
+  is(cmd.options.localInfoType, icc.STK_LOCAL_INFO_IMEI);
+
+  runNextTest();
+}
+
+function testLocalInfoDate(cmd) {
+  log("STK CMD " + JSON.stringify(cmd));
+  is(cmd.typeOfCommand, icc.STK_CMD_PROVIDE_LOCAL_INFO);
+  is(cmd.commandNumber, 0x01);
+  is(cmd.commandQualifier, icc.STK_LOCAL_INFO_DATE_TIME_ZONE);
+  is(cmd.options.localInfoType, icc.STK_LOCAL_INFO_DATE_TIME_ZONE);
+
+  runNextTest();
+}
+
+function testLocalInfoLanguage(cmd) {
+  log("STK CMD " + JSON.stringify(cmd));
+  is(cmd.typeOfCommand, icc.STK_CMD_PROVIDE_LOCAL_INFO);
+  is(cmd.commandNumber, 0x01);
+  is(cmd.commandQualifier, icc.STK_LOCAL_INFO_LANGUAGE);
+  is(cmd.options.localInfoType, icc.STK_LOCAL_INFO_LANGUAGE);
+
+  runNextTest();
+}
+
 let tests = [
   {command: "d0288103012180820281020d1d00d3309bfc06c95c301aa8e80259c3ec34b9ac07c9602f58ed159bb940",
    func: testDisplayTextGsm7BitEncoding},
+  {command: "d009810301260082028182",
+   func: testLocalInfoLocation},
+  {command: "d009810301260182028182",
+   func: testLocalInfoImei},
+  {command: "d009810301260382028182",
+   func: testLocalInfoDate},
+  {command: "d009810301260482028182",
+   func: testLocalInfoLanguage},
 ];
 
 let pendingEmulatorCmdCount = 0;
 function sendStkPduToEmulator(cmd, func) {
   ++pendingEmulatorCmdCount;
 
   runEmulatorCmd(cmd, function (result) {
     --pendingEmulatorCmdCount;