michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: MARIONETTE_HEAD_JS = "stk_helper.js"; michael@0: michael@0: function testSendUSSD(command, expect) { michael@0: log("STK CMD " + JSON.stringify(command)); michael@0: is(command.typeOfCommand, iccManager.STK_CMD_SEND_USSD, expect.name); michael@0: is(command.commandQualifier, expect.commandQualifier, expect.name); michael@0: if (command.options.text) { michael@0: is(command.options.text, expect.title, expect.name); michael@0: } michael@0: michael@0: runNextTest(); michael@0: } michael@0: michael@0: let tests = [ michael@0: {command: "d050810301120082028183850a372d62697420555353448a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_1", michael@0: commandQualifier: 0x00, michael@0: title: "7-bit USSD"}}, michael@0: {command: "d058810301120082028183850a382d62697420555353448a41444142434445464748494a4b4c4d4e4f505152535455565758595a2d6162636465666768696a6b6c6d6e6f707172737475767778797a2d31323334353637383930", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_2", michael@0: commandQualifier: 0x00, michael@0: title: "8-bit USSD"}}, michael@0: {command: "d02f81030112008202818385095543533220555353448a1948041704140420041004120421042204120423041904220415", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_3", michael@0: commandQualifier: 0x00, michael@0: title: "UCS2 USSD"}}, michael@0: {command: "d081fd8103011200820281838581b66f6e636520612052454c4541534520434f4d504c455445206d65737361676520636f6e7461696e696e672074686520555353442052657475726e20526573756c74206d657373616765206e6f7420636f6e7461696e696e6720616e206572726f7220686173206265656e2072656365697665642066726f6d20746865206e6574776f726b2c20746865204d45207368616c6c20696e666f726d207468652053494d20746861742074686520636f6d6d616e64206861738a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_4", michael@0: commandQualifier: 0x00, michael@0: title: "once a RELEASE COMPLETE message containing the USSD Return Result message not containing an error has been received from the network, the ME shall inform the SIM that the command has"}}, michael@0: {command: "d04681030112008202818385008a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_5", michael@0: commandQualifier: 0x00, michael@0: title: ""}}, michael@0: {command: "d054810301120082028183850a42617369632049636f6e8a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e5609e020001", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_6", michael@0: commandQualifier: 0x00, michael@0: title: "Basic Icon"}}, michael@0: {command: "d054810301120082028183850a436f6c6f722049636f6e8a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e5609e020002", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_7", michael@0: commandQualifier: 0x00, michael@0: title: "Color Icon"}}, michael@0: {command: "d054810301120082028183850a42617369632049636f6e8a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e5609e020101", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_8", michael@0: commandQualifier: 0x00, michael@0: title: "Basic Icon"}}, michael@0: {command: "d05f8103011200820281838519800417041404200410041204210422041204230419042204158a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_9", michael@0: commandQualifier: 0x00, michael@0: title: "ЗДРАВСТВУЙТЕ"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_10", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_11", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001001b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_12", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_13", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001002b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_14", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_15", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001004b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_16", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_17", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520338a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_18", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 3"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001008b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_19", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_20", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520338a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_21", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 3"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001010b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_22", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_23", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520338a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_24", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 3"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001020b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_25", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_26", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520338a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_27", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 3"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001040b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_28", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_29", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520338a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_30", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 3"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001080b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_31", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_32", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520338a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_33", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 3"}}, michael@0: {command: "d05c8103011200820281838510546578742041747472696275746520318a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560d004001000b4", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_34", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 1"}}, michael@0: {command: "d0568103011200820281838510546578742041747472696275746520328a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_35", michael@0: commandQualifier: 0x00, michael@0: title: "Text Attribute 2"}}, michael@0: {command: "d04b8103011200820281838505804f60597d8a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_36", michael@0: commandQualifier: 0x00, michael@0: title: "你好"}}, michael@0: {command: "d04981030112008202818385038030eb8a39f041e19058341e9149e592d9743ea151e9945ab55eb1596d2b2c1e93cbe6333aad5eb3dbee373c2e9fd3ebf63b3eaf6fc564335acd76c3e560", michael@0: func: testSendUSSD, michael@0: expect: {name: "send_ussd_cmd_37", michael@0: commandQualifier: 0x00, michael@0: title: "ル"}} michael@0: ]; michael@0: michael@0: runNextTest();