dom/icc/tests/marionette/test_stk_select_item.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 MARIONETTE_HEAD_JS = "stk_helper.js";
     6 function testSelectItem(command, expect) {
     7   log("STK CMD " + JSON.stringify(command));
     8   is(command.typeOfCommand, iccManager.STK_CMD_SELECT_ITEM, expect.name);
     9   is(command.commandQualifier, expect.commandQualifier, expect.name);
    10   is(command.options.title, expect.title, expect.name);
    11   for (let index in command.options.items) {
    12     is(command.options.items[index].identifier, expect.items[index].identifier, expect.name);
    13     is(command.options.items[index].text, expect.items[index].text, expect.name);
    14   }
    15   let length = command.options.nextActionList ? command.options.nextActionList.length : 0;
    16   for (let i = 0; i < length; i++) {
    17     is(command.options.nextActionList[i], expect.nextActionList[i], expect.name);
    18   }
    20   runNextTest();
    21 }
    23 let tests = [
    24   {command: "d03d810301240082028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d20338f07044974656d2034",
    25    func: testSelectItem,
    26    expect: {name: "select_item_cmd_1",
    27             commandQualifier: 0x00,
    28             title: "Toolkit Select",
    29             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}, {identifier: 4, text: "Item 4"}]}},
    30   {command: "d081fc810301240082028182850a4c617267654d656e75318f05505a65726f8f044f4f6e658f044e54776f8f064d54687265658f054c466f75728f054b466976658f044a5369788f0649536576656e8f064845696768748f05474e696e658f0646416c7068618f0645427261766f8f0844436861726c69658f064344656c74618f05424563686f8f0941466f782d74726f748f0640426c61636b8f063f42726f776e8f043e5265648f073d4f72616e67658f073c59656c6c6f778f063b477265656e8f053a426c75658f073956696f6c65748f0538477265798f063757686974658f06366d696c6c698f06356d6963726f8f05346e616e6f8f05337069636f",
    31    func: testSelectItem,
    32    expect: {name: "select_item_cmd_2",
    33             commandQualifier: 0x00,
    34             title: "LargeMenu1",
    35             items: [{identifier: 80, text: "Zero"}, {identifier: 79, text: "One"}, {identifier: 78, text: "Two"}, {identifier: 77, text: "Three"}, {identifier: 76, text: "Four"}, {identifier: 75, text: "Five"}, {identifier: 74, text: "Six"}, {identifier: 73, text: "Seven"}, {identifier: 72, text: "Eight"}, {identifier: 71, text: "Nine"}, {identifier: 70, text: "Alpha"}, {identifier: 69, text: "Bravo"}, {identifier: 68, text: "Charlie"}, {identifier: 67, text: "Delta"}, {identifier: 66, text: "Echo"}, {identifier: 65, text: "Fox-trot"}, {identifier: 64, text: "Black"}, {identifier: 63, text: "Brown"}, {identifier: 62, text: "Red"}, {identifier: 61, text: "Orange"}, {identifier: 60, text: "Yellow"}, {identifier: 59, text: "Green"}, {identifier: 58, text: "Blue"}, {identifier: 57, text: "Violet"}, {identifier: 56, text: "Grey"}, {identifier: 55, text: "White"}, {identifier: 54, text: "milli"}, {identifier: 53, text: "micro"}, {identifier: 52, text: "nano"}, {identifier: 51, text: "pico"}]}},
    36   {command: "d081fb810301240082028182850a4c617267654d656e75328f1eff43616c6c20466f7277617264696e6720556e636f6e646974696f6e616c8f1dfe43616c6c20466f7277617264696e67204f6e205573657220427573798f1cfd43616c6c20466f7277617264696e67204f6e204e6f205265706c798f26fc43616c6c20466f7277617264696e67204f6e2055736572204e6f7420526561636861626c658f1efb42617272696e67204f6620416c6c204f7574676f696e672043616c6c738f2cfa42617272696e67204f6620416c6c204f7574676f696e6720496e7465726e6174696f6e616c2043616c6c738f11f9434c492050726573656e746174696f6e",
    37    func: testSelectItem,
    38    expect: {name: "select_item_cmd_3",
    39             commandQualifier: 0x00,
    40             title: "LargeMenu2",
    41             items: [{identifier: 255, text: "Call Forwarding Unconditional"}, {identifier: 254, text: "Call Forwarding On User Busy"}, {identifier: 253, text: "Call Forwarding On No Reply"}, {identifier: 252, text: "Call Forwarding On User Not Reachable"}, {identifier: 251, text: "Barring Of All Outgoing Calls"}, {identifier: 250, text: "Barring Of All Outgoing International Calls"}, {identifier: 249, text: "CLI Presentation"}]}},
    42   {command: "d022810301240082028182850b53656c656374204974656d8f04114f6e658f041254776f",
    43    func: testSelectItem,
    44    expect: {name: "select_item_cmd_4",
    45             commandQualifier: 0x00,
    46             title: "Select Item",
    47             items: [{identifier: 17, text: "One"}, {identifier: 18, text: "Two"}]}},
    48   {command: "d081fd8103012400820281828581ed5468652053494d207368616c6c20737570706c79206120736574206f66206974656d732066726f6d207768696368207468652075736572206d61792063686f6f7365206f6e652e2045616368206974656d20636f6d70726973657320612073686f7274206964656e74696669657220287573656420746f20696e646963617465207468652073656c656374696f6e2920616e642061207465787420737472696e672e204f7074696f6e616c6c79207468652053494d206d617920696e636c75646520616e20616c706861206964656e7469666965722e2054686520616c706861206964656e74696669657220698f020159",
    49    func: testSelectItem,
    50    expect: {name: "select_item_cmd_5",
    51             commandQualifier: 0x00,
    52             title: "The SIM shall supply a set of items from which the user may choose one. Each item comprises a short identifier (used to indicate the selection) and a text string. Optionally the SIM may include an alpha identifier. The alpha identifier i",
    53             items: [{identifier: 1, text: "Y"}]}},
    54   {command: "d081f3810301240082028182850a304c617267654d656e758f1dff312043616c6c20466f727761726420556e636f6e646974696f6e616c8f1cfe322043616c6c20466f7277617264204f6e205573657220427573798f1bfd332043616c6c20466f7277617264204f6e204e6f205265706c798f25fc342043616c6c20466f7277617264204f6e2055736572204e6f7420526561636861626c658f20fb352042617272696e67204f6620416c6c204f7574676f696e672043616c6c738f24fa362042617272696e67204f6620416c6c204f7574676f696e6720496e742043616c6c738f13f93720434c492050726573656e746174696f6e",
    55    func: testSelectItem,
    56    expect: {name: "select_item_cmd_6",
    57             commandQualifier: 0x00,
    58             title: "0LargeMenu",
    59             items: [{identifier: 255, text: "1 Call Forward Unconditional"}, {identifier: 254, text: "2 Call Forward On User Busy"}, {identifier: 253, text: "3 Call Forward On No Reply"}, {identifier: 252, text: "4 Call Forward On User Not Reachable"}, {identifier: 251, text: "5 Barring Of All Outgoing Calls"}, {identifier: 250, text: "6 Barring Of All Outgoing Int Calls"}, {identifier: 249, text: "7 CLI Presentation"}]}},
    60   {command: "d039810301240082028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d20331803131026",
    61    func: testSelectItem,
    62    expect: {name: "select_item_cmd_7",
    63             commandQualifier: 0x00,
    64             title: "Toolkit Select",
    65             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}],
    66             nextActionList: [iccManager.STK_CMD_SEND_SMS, iccManager.STK_CMD_SET_UP_CALL, iccManager.STK_CMD_PROVIDE_LOCAL_INFO]}},
    67   {command: "d037810301240082028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d2033900102",
    68    func: testSelectItem,
    69    expect: {name: "select_item_cmd_8",
    70             commandQualifier: 0x00,
    71             title: "Toolkit Select",
    72             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}]}},
    73   {command: "d034810301248082028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d2033",
    74    func: testSelectItem,
    75    expect: {name: "select_item_cmd_9",
    76             commandQualifier: 0x80,
    77             title: "Toolkit Select",
    78             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}]}},
    79   {command: "d03e810301240082028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d20339e0201019f0401050505",
    80    func: testSelectItem,
    81    expect: {name: "select_item_cmd_10",
    82             commandQualifier: 0x00,
    83             title: "Toolkit Select",
    84             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}]}},
    85   {command: "d03e810301240082028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d20339e0200019f0400050505",
    86    func: testSelectItem,
    87    expect: {name: "select_item_cmd_11",
    88             commandQualifier: 0x00,
    89             title: "Toolkit Select",
    90             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}]}},
    91   {command: "d034810301240382028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d2033",
    92    func: testSelectItem,
    93    expect: {name: "select_item_cmd_12",
    94             commandQualifier: 0x03,
    95             title: "Toolkit Select",
    96             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}]}},
    97   {command: "d034810301240182028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d2033",
    98    func: testSelectItem,
    99    expect: {name: "select_item_cmd_13",
   100             commandQualifier: 0x01,
   101             title: "Toolkit Select",
   102             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}]}},
   103   {command: "d02b810301240482028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d2032",
   104    func: testSelectItem,
   105    expect: {name: "select_item_cmd_14",
   106             commandQualifier: 0x04,
   107             title: "Toolkit Select",
   108             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   109   {command: "d030810301240082028182850a3c54494d452d4f55543e8f07014974656d20318f07024974656d20328f07034974656d2033",
   110    func: testSelectItem,
   111    expect: {name: "select_item_cmd_15",
   112             commandQualifier: 0x00,
   113             title: "<TIME-OUT>",
   114             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}]}},
   115   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001000b4d108000600b4000600b4",
   116    func: testSelectItem,
   117    expect: {name: "select_item_cmd_16",
   118             commandQualifier: 0x00,
   119             title: "Toolkit Select 1",
   120             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   121   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034",
   122    func: testSelectItem,
   123    expect: {name: "select_item_cmd_17",
   124             commandQualifier: 0x00,
   125             title: "Toolkit Select 2",
   126             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   127   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001001b4d108000601b4000601b4",
   128    func: testSelectItem,
   129    expect: {name: "select_item_cmd_18",
   130             commandQualifier: 0x00,
   131             title: "Toolkit Select 1",
   132             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   133   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034",
   134    func: testSelectItem,
   135    expect: {name: "select_item_cmd_19",
   136             commandQualifier: 0x00,
   137             title: "Toolkit Select 2",
   138             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   139   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001002b4d108000602b4000602b4",
   140    func: testSelectItem,
   141    expect: {name: "select_item_cmd_20",
   142             commandQualifier: 0x00,
   143             title: "Toolkit Select 1",
   144             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   145   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034",
   146    func: testSelectItem,
   147    expect: {name: "select_item_cmd_21",
   148             commandQualifier: 0x00,
   149             title: "Toolkit Select 2",
   150             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   151   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001004b4d108000604b4000604b4",
   152    func: testSelectItem,
   153    expect: {name: "select_item_cmd_22",
   154             commandQualifier: 0x00,
   155             title: "Toolkit Select 1",
   156             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   157   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034d004001000b4d108000600b4000600b4",
   158    func: testSelectItem,
   159    expect: {name: "select_item_cmd_23",
   160             commandQualifier: 0x00,
   161             title: "Toolkit Select 2",
   162             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   163   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420338f07014974656d20358f07024974656d2036",
   164    func: testSelectItem,
   165    expect: {name: "select_item_cmd_24",
   166             commandQualifier: 0x00,
   167             title: "Toolkit Select 3",
   168             items: [{identifier: 1, text: "Item 5"}, {identifier: 2, text: "Item 6"}]}},
   169   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001008b4d108000608b4000608b4",
   170    func: testSelectItem,
   171    expect: {name: "select_item_cmd_25",
   172             commandQualifier: 0x00,
   173             title: "Toolkit Select 1",
   174             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   175   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034d004001000b4d108000600b4000600b4",
   176    func: testSelectItem,
   177    expect: {name: "select_item_cmd_26",
   178             commandQualifier: 0x00,
   179             title: "Toolkit Select 2",
   180             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   181   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420338f07014974656d20358f07024974656d2036",
   182    func: testSelectItem,
   183    expect: {name: "select_item_cmd_27",
   184             commandQualifier: 0x00,
   185             title: "Toolkit Select 3",
   186             items: [{identifier: 1, text: "Item 5"}, {identifier: 2, text: "Item 6"}]}},
   187   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001010b4d108000610b4000610b4",
   188    func: testSelectItem,
   189    expect: {name: "select_item_cmd_28",
   190             commandQualifier: 0x00,
   191             title: "Toolkit Select 1",
   192             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   193   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034d004001000b4d108000600b4000600b4",
   194    func: testSelectItem,
   195    expect: {name: "select_item_cmd_29",
   196             commandQualifier: 0x00,
   197             title: "Toolkit Select 2",
   198             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   199   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420338f07014974656d20358f07024974656d2036",
   200    func: testSelectItem,
   201    expect: {name: "select_item_cmd_30",
   202             commandQualifier: 0x00,
   203             title: "Toolkit Select 3",
   204             items: [{identifier: 1, text: "Item 5"}, {identifier: 2, text: "Item 6"}]}},
   205   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001020b4d108000620b4000620b4",
   206    func: testSelectItem,
   207    expect: {name: "select_item_cmd_31",
   208             commandQualifier: 0x00,
   209             title: "Toolkit Select 1",
   210             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   211   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034d004001000b4d108000600b4000600b4",
   212    func: testSelectItem,
   213    expect: {name: "select_item_cmd_32",
   214             commandQualifier: 0x00,
   215             title: "Toolkit Select 2",
   216             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   217   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420338f07014974656d20358f07024974656d2036",
   218    func: testSelectItem,
   219    expect: {name: "select_item_cmd_33",
   220             commandQualifier: 0x00,
   221             title: "Toolkit Select 3",
   222             items: [{identifier: 1, text: "Item 5"}, {identifier: 2, text: "Item 6"}]}},
   223   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001040b4d108000640b4000640b4",
   224    func: testSelectItem,
   225    expect: {name: "select_item_cmd_34",
   226             commandQualifier: 0x00,
   227             title: "Toolkit Select 1",
   228             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   229   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034d004001000b4d108000600b4000600b4",
   230    func: testSelectItem,
   231    expect: {name: "select_item_cmd_35",
   232             commandQualifier: 0x00,
   233             title: "Toolkit Select 2",
   234             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   235   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420338f07014974656d20358f07024974656d2036",
   236    func: testSelectItem,
   237    expect: {name: "select_item_cmd_36",
   238             commandQualifier: 0x00,
   239             title: "Toolkit Select 3",
   240             items: [{identifier: 1, text: "Item 5"}, {identifier: 2, text: "Item 6"}]}},
   241   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001080b4d108000680b4000680b4",
   242    func: testSelectItem,
   243    expect: {name: "select_item_cmd_37",
   244             commandQualifier: 0x00,
   245             title: "Toolkit Select 1",
   246             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   247   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034d004001000b4d108000600b4000600b4",
   248    func: testSelectItem,
   249    expect: {name: "select_item_cmd_38",
   250             commandQualifier: 0x00,
   251             title: "Toolkit Select 2",
   252             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   253   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420338f07014974656d20358f07024974656d2036",
   254    func: testSelectItem,
   255    expect: {name: "select_item_cmd_39",
   256             commandQualifier: 0x00,
   257             title: "Toolkit Select 3",
   258             items: [{identifier: 1, text: "Item 5"}, {identifier: 2, text: "Item 6"}]}},
   259   {command: "d03d8103012400820281828510546f6f6c6b69742053656c65637420318f07014974656d20318f07024974656d2032d004001000b4d108000600b4000600b4",
   260    func: testSelectItem,
   261    expect: {name: "select_item_cmd_40",
   262             commandQualifier: 0x00,
   263             title: "Toolkit Select 1",
   264             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}]}},
   265   {command: "d02d8103012400820281828510546f6f6c6b69742053656c65637420328f07014974656d20338f07024974656d2034",
   266    func: testSelectItem,
   267    expect: {name: "select_item_cmd_41",
   268             commandQualifier: 0x00,
   269             title: "Toolkit Select 2",
   270             items: [{identifier: 1, text: "Item 3"}, {identifier: 2, text: "Item 4"}]}},
   271   {command: "d07e8103012400820281828519800417041404200410041204210422041204230419042204158f1c018004170414042004100412042104220412042304190422041500318f1c028004170414042004100412042104220412042304190422041500328f1c03800417041404200410041204210422041204230419042204150033",
   272    func: testSelectItem,
   273    expect: {name: "select_item_cmd_42",
   274             commandQualifier: 0x00,
   275             title: "ЗДРАВСТВУЙТЕ",
   276             items: [{identifier: 1, text: "ЗДРАВСТВУЙТЕ1"}, {identifier: 2, text: "ЗДРАВСТВУЙТЕ2"}, {identifier: 3, text: "ЗДРАВСТВУЙТЕ3"}]}},
   277   {command: "d053810301240082028182850f810c089794a09092a1a292a399a2958f1101810d089794a09092a1a292a399a295318f1102810d089794a09092a1a292a399a295328f1103810d089794a09092a1a292a399a29533",
   278    func: testSelectItem,
   279    expect: {name: "select_item_cmd_43",
   280             commandQualifier: 0x00,
   281             title: "ЗДРАВСТВУЙТЕ",
   282             items: [{identifier: 1, text: "ЗДРАВСТВУЙТЕ1"}, {identifier: 2, text: "ЗДРАВСТВУЙТЕ2"}, {identifier: 3, text: "ЗДРАВСТВУЙТЕ3"}]}},
   283   {command: "d0578103012400820281828510820c04108784908082919282938992858f1201820d0410878490808291928293899285318f1202820d0410878490808291928293899285328f1203820d041087849080829192829389928533",
   284    func: testSelectItem,
   285    expect: {name: "select_item_cmd_44",
   286             commandQualifier: 0x00,
   287             title: "ЗДРАВСТВУЙТЕ",
   288             items: [{identifier: 1, text: "ЗДРАВСТВУЙТЕ1"}, {identifier: 2, text: "ЗДРАВСТВУЙТЕ2"}, {identifier: 3, text: "ЗДРАВСТВУЙТЕ3"}]}},
   289   {command: "d03e810301240082028182850b805de551777bb1900962e98f080180987976ee4e008f080280987976ee4e8c8f080380987976ee4e098f080480987976ee56db",
   290    func: testSelectItem,
   291    expect: {name: "select_item_cmd_45",
   292             commandQualifier: 0x00,
   293             title: "工具箱选择",
   294             items: [{identifier: 1, text: "项目一"}, {identifier: 2, text: "项目二"}, {identifier: 3, text: "项目三"}, {identifier: 4, text: "项目四"}]}},
   295   {command: "d0388103012400820281828509800038003030eb00308f0a01800038003030eb00318f0a02800038003030eb00328f0a03800038003030eb0033",
   296    func: testSelectItem,
   297    expect: {name: "select_item_cmd_46",
   298             commandQualifier: 0x00,
   299             title: "80ル0",
   300             items: [{identifier: 1, text: "80ル1"}, {identifier: 2, text: "80ル2"}, {identifier: 3, text: "80ル3"}]}},
   301   {command: "d03081030124008202818285078104613831eb308f08018104613831eb318f08028104613831eb328f08038104613831eb33",
   302    func: testSelectItem,
   303    expect: {name: "select_item_cmd_47",
   304             commandQualifier: 0x00,
   305             title: "81ル0",
   306             items: [{identifier: 1, text: "81ル1"}, {identifier: 2, text: "81ル2"}, {identifier: 3, text: "81ル3"}]}},
   307   {command: "d0348103012400820281828508820430a03832cb308f0901820430a03832cb318f0902820430a03832cb328f0903820430a03832cb33",
   308    func: testSelectItem,
   309    expect: {name: "select_item_cmd_48",
   310             commandQualifier: 0x00,
   311             title: "82ル0",
   312             items: [{identifier: 1, text: "82ル1"}, {identifier: 2, text: "82ル2"}, {identifier: 3, text: "82ル3"}]}},
   313   {command: "d039810301240082028182850e546f6f6c6b69742053656c6563748f07014974656d20318f07024974656d20328f07034974656d20331803000081",
   314    func: testSelectItem,
   315    expect: {name: "select_item_cmd_49",
   316             commandQualifier: 0x00,
   317             title: "Toolkit Select",
   318             items: [{identifier: 1, text: "Item 1"}, {identifier: 2, text: "Item 2"}, {identifier: 3, text: "Item 3"}],
   319             nextActionList: [iccManager.STK_NEXT_ACTION_NULL, iccManager.STK_NEXT_ACTION_NULL, iccManager.STK_NEXT_ACTION_END_PROACTIVE_SESSION]}},
   320 ];
   322 runNextTest();

mercurial