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 testSetupIdleModeText(command, expect) { |
michael@0 | 7 | log("STK CMD " + JSON.stringify(command)); |
michael@0 | 8 | is(command.typeOfCommand, iccManager.STK_CMD_SET_UP_IDLE_MODE_TEXT, expect.name); |
michael@0 | 9 | is(command.commandQualifier, expect.commandQualifier, expect.name); |
michael@0 | 10 | is(command.options.text, expect.text, expect.name); |
michael@0 | 11 | |
michael@0 | 12 | runNextTest(); |
michael@0 | 13 | } |
michael@0 | 14 | |
michael@0 | 15 | let tests = [ |
michael@0 | 16 | {command: "d01a8103012800820281828d0f0449646c65204d6f64652054657874", |
michael@0 | 17 | func: testSetupIdleModeText, |
michael@0 | 18 | expect: {name: "setup_idle_mode_text_cmd_1", |
michael@0 | 19 | commandQualifier: 0x00, |
michael@0 | 20 | text: "Idle Mode Text"}}, |
michael@0 | 21 | {command: "d0188103012800820281828d0d04546f6f6c6b69742054657374", |
michael@0 | 22 | func: testSetupIdleModeText, |
michael@0 | 23 | expect: {name: "setup_idle_mode_text_cmd_2", |
michael@0 | 24 | commandQualifier: 0x00, |
michael@0 | 25 | text: "Toolkit Test"}}, |
michael@0 | 26 | {command: "d081fd8103012800820281828d81f100547419344d3641737498cd06cdeb70383b0f0a83e8653c1d34a7cbd3ee330b7447a7c768d01c1d66b341e232889c9ec3d9e17c990c12e741747419d42c82c27350d80d4a93d96550fb4d2e83e8653c1d943683e8e832a85904a5e7a0b0985d06d1df20f21b94a6bba8e832082e2fcfcb6e7a989e7ebb41737a9e5d06a5e72076d94c0785e7a0b01b946ec3d9e576d94d0fd3d36f37885c1ea7e7e9b71b447f83e8e832a85904b5c3eeba393ca6d7e565b90b444597416932bb0c6abfc96510bd8ca783e6e8309b0d129741e4f41cce0ee7cb6450da0d0a83da61b7bb2c07d1d1613aa8ec9ed7e5e539888e0ed341ee32", |
michael@0 | 27 | func: testSetupIdleModeText, |
michael@0 | 28 | expect: {name: "setup_idle_mode_text_cmd_3", |
michael@0 | 29 | commandQualifier: 0x00, |
michael@0 | 30 | text: "The SIM shall supply a text string, which shall be displayed by the ME as an idle mode text if the ME is able to do it.The presentation style is left as an implementation decision to the ME manufacturer. The idle mode text shall be displayed in a manner that ensures that ne"}}, |
michael@0 | 31 | {command: "d0198103012800820281828d0a0449646c6520746578749e020001", |
michael@0 | 32 | func: testSetupIdleModeText, |
michael@0 | 33 | expect: {name: "setup_idle_mode_text_cmd_4", |
michael@0 | 34 | commandQualifier: 0x00, |
michael@0 | 35 | text: "Idle text"}}, |
michael@0 | 36 | {command: "d0198103012800820281828d0a0449646c6520746578749e020101", |
michael@0 | 37 | func: testSetupIdleModeText, |
michael@0 | 38 | expect: {name: "setup_idle_mode_text_cmd_5", |
michael@0 | 39 | commandQualifier: 0x00, |
michael@0 | 40 | text: "Idle text"}}, |
michael@0 | 41 | {command: "d0198103012800820281828d0a0449646c6520746578749e020002", |
michael@0 | 42 | func: testSetupIdleModeText, |
michael@0 | 43 | expect: {name: "setup_idle_mode_text_cmd_6", |
michael@0 | 44 | commandQualifier: 0x00, |
michael@0 | 45 | text: "Idle text"}}, |
michael@0 | 46 | {command: "d0248103012800820281828d1908041704140420041004120421042204120423041904220415", |
michael@0 | 47 | func: testSetupIdleModeText, |
michael@0 | 48 | expect: {name: "setup_idle_mode_text_cmd_7", |
michael@0 | 49 | commandQualifier: 0x00, |
michael@0 | 50 | text: "ЗДРАВСТВУЙТЕ"}}, |
michael@0 | 51 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001000b4", |
michael@0 | 52 | func: testSetupIdleModeText, |
michael@0 | 53 | expect: {name: "setup_idle_mode_text_cmd_8", |
michael@0 | 54 | commandQualifier: 0x00, |
michael@0 | 55 | text: "Idle Mode Text 1"}}, |
michael@0 | 56 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742032", |
michael@0 | 57 | func: testSetupIdleModeText, |
michael@0 | 58 | expect: {name: "setup_idle_mode_text_cmd_9", |
michael@0 | 59 | commandQualifier: 0x00, |
michael@0 | 60 | text: "Idle Mode Text 2"}}, |
michael@0 | 61 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001001b4", |
michael@0 | 62 | func: testSetupIdleModeText, |
michael@0 | 63 | expect: {name: "setup_idle_mode_text_cmd_10", |
michael@0 | 64 | commandQualifier: 0x00, |
michael@0 | 65 | text: "Idle Mode Text 1"}}, |
michael@0 | 66 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742032", |
michael@0 | 67 | func: testSetupIdleModeText, |
michael@0 | 68 | expect: {name: "setup_idle_mode_text_cmd_11", |
michael@0 | 69 | commandQualifier: 0x00, |
michael@0 | 70 | text: "Idle Mode Text 2"}}, |
michael@0 | 71 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001002b4", |
michael@0 | 72 | func: testSetupIdleModeText, |
michael@0 | 73 | expect: {name: "setup_idle_mode_text_cmd_12", |
michael@0 | 74 | commandQualifier: 0x00, |
michael@0 | 75 | text: "Idle Mode Text 1"}}, |
michael@0 | 76 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742032", |
michael@0 | 77 | func: testSetupIdleModeText, |
michael@0 | 78 | expect: {name: "setup_idle_mode_text_cmd_13", |
michael@0 | 79 | commandQualifier: 0x00, |
michael@0 | 80 | text: "Idle Mode Text 2"}}, |
michael@0 | 81 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001004b4", |
michael@0 | 82 | func: testSetupIdleModeText, |
michael@0 | 83 | expect: {name: "setup_idle_mode_text_cmd_14", |
michael@0 | 84 | commandQualifier: 0x00, |
michael@0 | 85 | text: "Idle Mode Text 1"}}, |
michael@0 | 86 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742032d004001000b4", |
michael@0 | 87 | func: testSetupIdleModeText, |
michael@0 | 88 | expect: {name: "setup_idle_mode_text_cmd_15", |
michael@0 | 89 | commandQualifier: 0x00, |
michael@0 | 90 | text: "Idle Mode Text 2"}}, |
michael@0 | 91 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742033", |
michael@0 | 92 | func: testSetupIdleModeText, |
michael@0 | 93 | expect: {name: "setup_idle_mode_text_cmd_16", |
michael@0 | 94 | commandQualifier: 0x00, |
michael@0 | 95 | text: "Idle Mode Text 3"}}, |
michael@0 | 96 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001008b4", |
michael@0 | 97 | func: testSetupIdleModeText, |
michael@0 | 98 | expect: {name: "setup_idle_mode_text_cmd_17", |
michael@0 | 99 | commandQualifier: 0x00, |
michael@0 | 100 | text: "Idle Mode Text 1"}}, |
michael@0 | 101 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742032d004001000b4", |
michael@0 | 102 | func: testSetupIdleModeText, |
michael@0 | 103 | expect: {name: "setup_idle_mode_text_cmd_18", |
michael@0 | 104 | commandQualifier: 0x00, |
michael@0 | 105 | text: "Idle Mode Text 2"}}, |
michael@0 | 106 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742033", |
michael@0 | 107 | func: testSetupIdleModeText, |
michael@0 | 108 | expect: {name: "setup_idle_mode_text_cmd_19", |
michael@0 | 109 | commandQualifier: 0x00, |
michael@0 | 110 | text: "Idle Mode Text 3"}}, |
michael@0 | 111 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001010b4", |
michael@0 | 112 | func: testSetupIdleModeText, |
michael@0 | 113 | expect: {name: "setup_idle_mode_text_cmd_20", |
michael@0 | 114 | commandQualifier: 0x00, |
michael@0 | 115 | text: "Idle Mode Text 1"}}, |
michael@0 | 116 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742032d004001000b4", |
michael@0 | 117 | func: testSetupIdleModeText, |
michael@0 | 118 | expect: {name: "setup_idle_mode_text_cmd_21", |
michael@0 | 119 | commandQualifier: 0x00, |
michael@0 | 120 | text: "Idle Mode Text 2"}}, |
michael@0 | 121 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742033", |
michael@0 | 122 | func: testSetupIdleModeText, |
michael@0 | 123 | expect: {name: "setup_idle_mode_text_cmd_22", |
michael@0 | 124 | commandQualifier: 0x00, |
michael@0 | 125 | text: "Idle Mode Text 3"}}, |
michael@0 | 126 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001020b4", |
michael@0 | 127 | func: testSetupIdleModeText, |
michael@0 | 128 | expect: {name: "setup_idle_mode_text_cmd_23", |
michael@0 | 129 | commandQualifier: 0x00, |
michael@0 | 130 | text: "Idle Mode Text 1"}}, |
michael@0 | 131 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742032d004001000b4", |
michael@0 | 132 | func: testSetupIdleModeText, |
michael@0 | 133 | expect: {name: "setup_idle_mode_text_cmd_24", |
michael@0 | 134 | commandQualifier: 0x00, |
michael@0 | 135 | text: "Idle Mode Text 2"}}, |
michael@0 | 136 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742033", |
michael@0 | 137 | func: testSetupIdleModeText, |
michael@0 | 138 | expect: {name: "setup_idle_mode_text_cmd_25", |
michael@0 | 139 | commandQualifier: 0x00, |
michael@0 | 140 | text: "Idle Mode Text 3"}}, |
michael@0 | 141 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001040b4", |
michael@0 | 142 | func: testSetupIdleModeText, |
michael@0 | 143 | expect: {name: "setup_idle_mode_text_cmd_26", |
michael@0 | 144 | commandQualifier: 0x00, |
michael@0 | 145 | text: "Idle Mode Text 1"}}, |
michael@0 | 146 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742032d004001000b4", |
michael@0 | 147 | func: testSetupIdleModeText, |
michael@0 | 148 | expect: {name: "setup_idle_mode_text_cmd_27", |
michael@0 | 149 | commandQualifier: 0x00, |
michael@0 | 150 | text: "Idle Mode Text 2"}}, |
michael@0 | 151 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742033", |
michael@0 | 152 | func: testSetupIdleModeText, |
michael@0 | 153 | expect: {name: "setup_idle_mode_text_cmd_28", |
michael@0 | 154 | commandQualifier: 0x00, |
michael@0 | 155 | text: "Idle Mode Text 3"}}, |
michael@0 | 156 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001080b4", |
michael@0 | 157 | func: testSetupIdleModeText, |
michael@0 | 158 | expect: {name: "setup_idle_mode_text_cmd_29", |
michael@0 | 159 | commandQualifier: 0x00, |
michael@0 | 160 | text: "Idle Mode Text 1"}}, |
michael@0 | 161 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742032d004001000b4", |
michael@0 | 162 | func: testSetupIdleModeText, |
michael@0 | 163 | expect: {name: "setup_idle_mode_text_cmd_30", |
michael@0 | 164 | commandQualifier: 0x00, |
michael@0 | 165 | text: "Idle Mode Text 2"}}, |
michael@0 | 166 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742033", |
michael@0 | 167 | func: testSetupIdleModeText, |
michael@0 | 168 | expect: {name: "setup_idle_mode_text_cmd_31", |
michael@0 | 169 | commandQualifier: 0x00, |
michael@0 | 170 | text: "Idle Mode Text 3"}}, |
michael@0 | 171 | {command: "d0228103012800820281828d110449646c65204d6f646520546578742031d004001000b4", |
michael@0 | 172 | func: testSetupIdleModeText, |
michael@0 | 173 | expect: {name: "setup_idle_mode_text_cmd_32", |
michael@0 | 174 | commandQualifier: 0x00, |
michael@0 | 175 | text: "Idle Mode Text 1"}}, |
michael@0 | 176 | {command: "d01c8103012800820281828d110449646c65204d6f646520546578742032", |
michael@0 | 177 | func: testSetupIdleModeText, |
michael@0 | 178 | expect: {name: "setup_idle_mode_text_cmd_33", |
michael@0 | 179 | commandQualifier: 0x00, |
michael@0 | 180 | text: "Idle Mode Text 2"}}, |
michael@0 | 181 | {command: "d0108103012800820281828d05084f60597d", |
michael@0 | 182 | func: testSetupIdleModeText, |
michael@0 | 183 | expect: {name: "setup_idle_mode_text_cmd_34", |
michael@0 | 184 | commandQualifier: 0x00, |
michael@0 | 185 | text: "你好"}}, |
michael@0 | 186 | {command: "d0148103012800820281828d09080038003030eb0030", |
michael@0 | 187 | func: testSetupIdleModeText, |
michael@0 | 188 | expect: {name: "setup_idle_mode_text_cmd_35", |
michael@0 | 189 | commandQualifier: 0x00, |
michael@0 | 190 | text: "80ル0"}}, |
michael@0 | 191 | ]; |
michael@0 | 192 | |
michael@0 | 193 | runNextTest(); |