Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | http://creativecommons.org/publicdomain/zero/1.0/ */ |
michael@0 | 3 | |
michael@0 | 4 | MARIONETTE_HEAD_JS = "stk_helper.js"; |
michael@0 | 5 | |
michael@0 | 6 | function testSendSS(command, expect) { |
michael@0 | 7 | log("STK CMD " + JSON.stringify(command)); |
michael@0 | 8 | is(command.typeOfCommand, iccManager.STK_CMD_SEND_SS, expect.name); |
michael@0 | 9 | is(command.commandQualifier, expect.commandQualifier, expect.name); |
michael@0 | 10 | if (command.options.text) { |
michael@0 | 11 | is(command.options.text, expect.title, expect.name); |
michael@0 | 12 | } |
michael@0 | 13 | |
michael@0 | 14 | runNextTest(); |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | let tests = [ |
michael@0 | 18 | {command: "d029810301110082028183850c43616c6c20466f7277617264891091aa120a214365870921436587a901fb", |
michael@0 | 19 | func: testSendSS, |
michael@0 | 20 | expect: {name: "send_ss_cmd_1", |
michael@0 | 21 | commandQualifier: 0x00, |
michael@0 | 22 | title: "Call Forward"}}, |
michael@0 | 23 | {command: "d02d810301110082028183850c43616c6c20466f7277617264891491aa120a21436587092143658709214365a711fb", |
michael@0 | 24 | func: testSendSS, |
michael@0 | 25 | expect: {name: "send_ss_cmd_2", |
michael@0 | 26 | commandQualifier: 0x00, |
michael@0 | 27 | title: "Call Forward"}}, |
michael@0 | 28 | {command: "d081fd8103011100820281838581eb4576656e20696620746865204669786564204469616c6c696e67204e756d626572207365727669636520697320656e61626c65642c2074686520737570706c656d656e74617279207365727669636520636f6e74726f6c20737472696e6720696e636c7564656420696e207468652053454e442053532070726f61637469766520636f6d6d616e64207368616c6c206e6f7420626520636865636b656420616761696e73742074686f7365206f66207468652046444e206c6973742e2055706f6e20726563656976696e67207468697320636f6d6d616e642c20746865204d45207368616c6c20646563698904ffba13fb", |
michael@0 | 29 | func: testSendSS, |
michael@0 | 30 | expect: {name: "send_ss_cmd_3", |
michael@0 | 31 | commandQualifier: 0x00, |
michael@0 | 32 | title: "Even if the Fixed Dialling Number service is enabled, the supplementary service control string included in the SEND SS proactive command shall not be checked against those of the FDN list. Upon receiving this command, the ME shall deci"}}, |
michael@0 | 33 | {command: "d01d8103011100820281838500891091aa120a214365870921436587a901fb", |
michael@0 | 34 | func: testSendSS, |
michael@0 | 35 | expect: {name: "send_ss_cmd_4", |
michael@0 | 36 | commandQualifier: 0x00, |
michael@0 | 37 | title: ""}}, |
michael@0 | 38 | {command: "d02b810301110082028183850a42617369632049636f6e891091aa120a214365870921436587a901fb9e020001", |
michael@0 | 39 | func: testSendSS, |
michael@0 | 40 | expect: {name: "send_ss_cmd_5", |
michael@0 | 41 | commandQualifier: 0x00, |
michael@0 | 42 | title: "Basic Icon"}}, |
michael@0 | 43 | {command: "d02c810301110082028183850b436f6c6f75722049636f6e891091aa120a214365870921436587a901fb9e020002", |
michael@0 | 44 | func: testSendSS, |
michael@0 | 45 | expect: {name: "send_ss_cmd_6", |
michael@0 | 46 | commandQualifier: 0x00, |
michael@0 | 47 | title: "Colour Icon"}}, |
michael@0 | 48 | {command: "d02b810301110082028183850a42617369632049636f6e891091aa120a214365870921436587a901fb9e020101", |
michael@0 | 49 | func: testSendSS, |
michael@0 | 50 | expect: {name: "send_ss_cmd_7", |
michael@0 | 51 | commandQualifier: 0x00, |
michael@0 | 52 | title: "Basic Icon"}}, |
michael@0 | 53 | {command: "d036810301110082028183851980041704140420041004120421042204120423041904220415891091aa120a214365870921436587a901fb", |
michael@0 | 54 | func: testSendSS, |
michael@0 | 55 | expect: {name: "send_ss_cmd_8", |
michael@0 | 56 | commandQualifier: 0x00, |
michael@0 | 57 | title: "ЗДРАВСТВУЙТЕ"}}, |
michael@0 | 58 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 59 | func: testSendSS, |
michael@0 | 60 | expect: {name: "send_ss_cmd_9", |
michael@0 | 61 | commandQualifier: 0x00, |
michael@0 | 62 | title: "Text Attribute 1"}}, |
michael@0 | 63 | {command: "d02d810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fb", |
michael@0 | 64 | func: testSendSS, |
michael@0 | 65 | expect: {name: "send_ss_cmd_10", |
michael@0 | 66 | commandQualifier: 0x00, |
michael@0 | 67 | title: "Text Attribute 2"}}, |
michael@0 | 68 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001001b4", |
michael@0 | 69 | func: testSendSS, |
michael@0 | 70 | expect: {name: "send_ss_cmd_11", |
michael@0 | 71 | commandQualifier: 0x00, |
michael@0 | 72 | title: "Text Attribute 1"}}, |
michael@0 | 73 | {command: "d02d810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fb", |
michael@0 | 74 | func: testSendSS, |
michael@0 | 75 | expect: {name: "send_ss_cmd_12", |
michael@0 | 76 | commandQualifier: 0x00, |
michael@0 | 77 | title: "Text Attribute 2"}}, |
michael@0 | 78 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001002b4", |
michael@0 | 79 | func: testSendSS, |
michael@0 | 80 | expect: {name: "send_ss_cmd_13", |
michael@0 | 81 | commandQualifier: 0x00, |
michael@0 | 82 | title: "Text Attribute 1"}}, |
michael@0 | 83 | {command: "d02d810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fb", |
michael@0 | 84 | func: testSendSS, |
michael@0 | 85 | expect: {name: "send_ss_cmd_14", |
michael@0 | 86 | commandQualifier: 0x00, |
michael@0 | 87 | title: "Text Attribute 2"}}, |
michael@0 | 88 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001004b4", |
michael@0 | 89 | func: testSendSS, |
michael@0 | 90 | expect: {name: "send_ss_cmd_15", |
michael@0 | 91 | commandQualifier: 0x00, |
michael@0 | 92 | title: "Text Attribute 1"}}, |
michael@0 | 93 | {command: "d033810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 94 | func: testSendSS, |
michael@0 | 95 | expect: {name: "send_ss_cmd_16", |
michael@0 | 96 | commandQualifier: 0x00, |
michael@0 | 97 | title: "Text Attribute 2"}}, |
michael@0 | 98 | {command: "d02d810301110082028183851054657874204174747269627574652033891091aa120a214365870921436587a901fb", |
michael@0 | 99 | func: testSendSS, |
michael@0 | 100 | expect: {name: "send_ss_cmd_17", |
michael@0 | 101 | commandQualifier: 0x00, |
michael@0 | 102 | title: "Text Attribute 3"}}, |
michael@0 | 103 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001008b4", |
michael@0 | 104 | func: testSendSS, |
michael@0 | 105 | expect: {name: "send_ss_cmd_18", |
michael@0 | 106 | commandQualifier: 0x00, |
michael@0 | 107 | title: "Text Attribute 1"}}, |
michael@0 | 108 | {command: "d033810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 109 | func: testSendSS, |
michael@0 | 110 | expect: {name: "send_ss_cmd_19", |
michael@0 | 111 | commandQualifier: 0x00, |
michael@0 | 112 | title: "Text Attribute 2"}}, |
michael@0 | 113 | {command: "d02d810301110082028183851054657874204174747269627574652033891091aa120a214365870921436587a901fb", |
michael@0 | 114 | func: testSendSS, |
michael@0 | 115 | expect: {name: "send_ss_cmd_20", |
michael@0 | 116 | commandQualifier: 0x00, |
michael@0 | 117 | title: "Text Attribute 3"}}, |
michael@0 | 118 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001010b4", |
michael@0 | 119 | func: testSendSS, |
michael@0 | 120 | expect: {name: "send_ss_cmd_21", |
michael@0 | 121 | commandQualifier: 0x00, |
michael@0 | 122 | title: "Text Attribute 1"}}, |
michael@0 | 123 | {command: "d033810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 124 | func: testSendSS, |
michael@0 | 125 | expect: {name: "send_ss_cmd_22", |
michael@0 | 126 | commandQualifier: 0x00, |
michael@0 | 127 | title: "Text Attribute 2"}}, |
michael@0 | 128 | {command: "d02d810301110082028183851054657874204174747269627574652033891091aa120a214365870921436587a901fb", |
michael@0 | 129 | func: testSendSS, |
michael@0 | 130 | expect: {name: "send_ss_cmd_23", |
michael@0 | 131 | commandQualifier: 0x00, |
michael@0 | 132 | title: "Text Attribute 3"}}, |
michael@0 | 133 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001020b4", |
michael@0 | 134 | func: testSendSS, |
michael@0 | 135 | expect: {name: "send_ss_cmd_24", |
michael@0 | 136 | commandQualifier: 0x00, |
michael@0 | 137 | title: "Text Attribute 1"}}, |
michael@0 | 138 | {command: "d033810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 139 | func: testSendSS, |
michael@0 | 140 | expect: {name: "send_ss_cmd_25", |
michael@0 | 141 | commandQualifier: 0x00, |
michael@0 | 142 | title: "Text Attribute 2"}}, |
michael@0 | 143 | {command: "d02d810301110082028183851054657874204174747269627574652033891091aa120a214365870921436587a901fb", |
michael@0 | 144 | func: testSendSS, |
michael@0 | 145 | expect: {name: "send_ss_cmd_26", |
michael@0 | 146 | commandQualifier: 0x00, |
michael@0 | 147 | title: "Text Attribute 3"}}, |
michael@0 | 148 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001040b4", |
michael@0 | 149 | func: testSendSS, |
michael@0 | 150 | expect: {name: "send_ss_cmd_27", |
michael@0 | 151 | commandQualifier: 0x00, |
michael@0 | 152 | title: "Text Attribute 1"}}, |
michael@0 | 153 | {command: "d033810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 154 | func: testSendSS, |
michael@0 | 155 | expect: {name: "send_ss_cmd_28", |
michael@0 | 156 | commandQualifier: 0x00, |
michael@0 | 157 | title: "Text Attribute 2"}}, |
michael@0 | 158 | {command: "d02d810301110082028183851054657874204174747269627574652033891091aa120a214365870921436587a901fb", |
michael@0 | 159 | func: testSendSS, |
michael@0 | 160 | expect: {name: "send_ss_cmd_29", |
michael@0 | 161 | commandQualifier: 0x00, |
michael@0 | 162 | title: "Text Attribute 3"}}, |
michael@0 | 163 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001080b4", |
michael@0 | 164 | func: testSendSS, |
michael@0 | 165 | expect: {name: "send_ss_cmd_30", |
michael@0 | 166 | commandQualifier: 0x00, |
michael@0 | 167 | title: "Text Attribute 1"}}, |
michael@0 | 168 | {command: "d033810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 169 | func: testSendSS, |
michael@0 | 170 | expect: {name: "send_ss_cmd_31", |
michael@0 | 171 | commandQualifier: 0x00, |
michael@0 | 172 | title: "Text Attribute 2"}}, |
michael@0 | 173 | {command: "d02d810301110082028183851054657874204174747269627574652033891091aa120a214365870921436587a901fb", |
michael@0 | 174 | func: testSendSS, |
michael@0 | 175 | expect: {name: "send_ss_cmd_32", |
michael@0 | 176 | commandQualifier: 0x00, |
michael@0 | 177 | title: "Text Attribute 3"}}, |
michael@0 | 178 | {command: "d033810301110082028183851054657874204174747269627574652031891091aa120a214365870921436587a901fbd004001000b4", |
michael@0 | 179 | func: testSendSS, |
michael@0 | 180 | expect: {name: "send_ss_cmd_33", |
michael@0 | 181 | commandQualifier: 0x00, |
michael@0 | 182 | title: "Text Attribute 1"}}, |
michael@0 | 183 | {command: "d02d810301110082028183851054657874204174747269627574652032891091aa120a214365870921436587a901fb", |
michael@0 | 184 | func: testSendSS, |
michael@0 | 185 | expect: {name: "send_ss_cmd_34", |
michael@0 | 186 | commandQualifier: 0x00, |
michael@0 | 187 | title: "Text Attribute 2"}}, |
michael@0 | 188 | {command: "d0228103011100820281838505804f60597d891091aa120a214365870921436587a901fb", |
michael@0 | 189 | func: testSendSS, |
michael@0 | 190 | expect: {name: "send_ss_cmd_35", |
michael@0 | 191 | commandQualifier: 0x00, |
michael@0 | 192 | title: "你好"}}, |
michael@0 | 193 | {command: "d02081030111008202818385038030eb891091aa120a214365870921436587a901fb", |
michael@0 | 194 | func: testSendSS, |
michael@0 | 195 | expect: {name: "send_ss_cmd_36", |
michael@0 | 196 | commandQualifier: 0x00, |
michael@0 | 197 | title: "ル"}} |
michael@0 | 198 | ]; |
michael@0 | 199 | |
michael@0 | 200 | runNextTest(); |