dom/icc/tests/marionette/test_stk_launch_browser.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.

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 testLaunchBrowser(command, expect) {
michael@0 7 log("STK CMD " + JSON.stringify(command));
michael@0 8 is(command.typeOfCommand, iccManager.STK_CMD_LAUNCH_BROWSER, expect.name);
michael@0 9 is(command.commandQualifier, expect.commandQualifier, expect.name);
michael@0 10 is(command.options.url, expect.url, expect.name);
michael@0 11 if (command.options.confirmMessage) {
michael@0 12 is(command.options.confirmMessage, expect.text, expect.name);
michael@0 13 }
michael@0 14
michael@0 15 runNextTest();
michael@0 16 }
michael@0 17
michael@0 18 let tests = [
michael@0 19 {command: "d0188103011500820281823100050b44656661756c742055524c",
michael@0 20 func: testLaunchBrowser,
michael@0 21 expect: {name: "launch_browser_cmd_1",
michael@0 22 commandQualifier: 0x00,
michael@0 23 url: "",
michael@0 24 text: "Default URL"}},
michael@0 25 {command: "d01f8103011500820281823112687474703a2f2f7878782e7979792e7a7a7a0500",
michael@0 26 func: testLaunchBrowser,
michael@0 27 expect: {name: "launch_browser_cmd_2",
michael@0 28 commandQualifier: 0x00,
michael@0 29 url: "http://xxx.yyy.zzz",
michael@0 30 text: ""}},
michael@0 31 {command: "d00e8103011500820281823001003100",
michael@0 32 func: testLaunchBrowser,
michael@0 33 expect: {name: "launch_browser_cmd_3",
michael@0 34 commandQualifier: 0x00,
michael@0 35 url: "",
michael@0 36 text: ""}},
michael@0 37 {command: "d02081030115008202818231003201030d10046162632e6465662e6768692e6a6b6c",
michael@0 38 func: testLaunchBrowser,
michael@0 39 expect: {name: "launch_browser_cmd_4",
michael@0 40 commandQualifier: 0x00,
michael@0 41 url: "",
michael@0 42 text: ""}},
michael@0 43 {command: "d0188103011502820281823100050b44656661756c742055524c",
michael@0 44 func: testLaunchBrowser,
michael@0 45 expect: {name: "launch_browser_cmd_5",
michael@0 46 commandQualifier: 0x02,
michael@0 47 url: "",
michael@0 48 text: "Default URL"}},
michael@0 49 {command: "d0188103011503820281823100050b44656661756c742055524c",
michael@0 50 func: testLaunchBrowser,
michael@0 51 expect: {name: "launch_browser_cmd_6",
michael@0 52 commandQualifier: 0x03,
michael@0 53 url: "",
michael@0 54 text: "Default URL"}},
michael@0 55 {command: "d00b8103011500820281823100",
michael@0 56 func: testLaunchBrowser,
michael@0 57 expect: {name: "launch_browser_cmd_7",
michael@0 58 commandQualifier: 0x00,
michael@0 59 url: "",
michael@0 60 text: ""}},
michael@0 61 {command: "d0268103011502820281823100051980041704140420041004120421042204120423041904220415",
michael@0 62 func: testLaunchBrowser,
michael@0 63 expect: {name: "launch_browser_cmd_8",
michael@0 64 commandQualifier: 0x02,
michael@0 65 url: "",
michael@0 66 text: "ЗДРАВСТВУЙТЕ"}},
michael@0 67 {command: "d021810301150282028182310005104e6f742073656c66206578706c616e2e1e020101",
michael@0 68 func: testLaunchBrowser,
michael@0 69 expect: {name: "launch_browser_cmd_9",
michael@0 70 commandQualifier: 0x02,
michael@0 71 url: "",
michael@0 72 text: "Not self explan."}},
michael@0 73 {command: "d01d8103011502820281823100050c53656c66206578706c616e2e1e020001",
michael@0 74 func: testLaunchBrowser,
michael@0 75 expect: {name: "launch_browser_cmd_10",
michael@0 76 commandQualifier: 0x02,
michael@0 77 url: "",
michael@0 78 text: "Self explan."}},
michael@0 79 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d00b4",
michael@0 80 func: testLaunchBrowser,
michael@0 81 expect: {name: "launch_browser_cmd_11",
michael@0 82 commandQualifier: 0x00,
michael@0 83 url: "",
michael@0 84 text: "Default URL 1"}},
michael@0 85 {command: "d01a8103011500820281823100050d44656661756c742055524c2032",
michael@0 86 func: testLaunchBrowser,
michael@0 87 expect: {name: "launch_browser_cmd_12",
michael@0 88 commandQualifier: 0x00,
michael@0 89 url: "",
michael@0 90 text: "Default URL 2"}},
michael@0 91 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d01b4",
michael@0 92 func: testLaunchBrowser,
michael@0 93 expect: {name: "launch_browser_cmd_13",
michael@0 94 commandQualifier: 0x00,
michael@0 95 url: "",
michael@0 96 text: "Default URL 1"}},
michael@0 97 {command: "d01a8103011500820281823100050d44656661756c742055524c2032",
michael@0 98 func: testLaunchBrowser,
michael@0 99 expect: {name: "launch_browser_cmd_14",
michael@0 100 commandQualifier: 0x00,
michael@0 101 url: "",
michael@0 102 text: "Default URL 2"}},
michael@0 103 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d02b4",
michael@0 104 func: testLaunchBrowser,
michael@0 105 expect: {name: "launch_browser_cmd_15",
michael@0 106 commandQualifier: 0x00,
michael@0 107 url: "",
michael@0 108 text: "Default URL 1"}},
michael@0 109 {command: "d01a8103011500820281823100050d44656661756c742055524c2032",
michael@0 110 func: testLaunchBrowser,
michael@0 111 expect: {name: "launch_browser_cmd_16",
michael@0 112 commandQualifier: 0x00,
michael@0 113 url: "",
michael@0 114 text: "Default URL 2"}},
michael@0 115 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d04b4",
michael@0 116 func: testLaunchBrowser,
michael@0 117 expect: {name: "launch_browser_cmd_17",
michael@0 118 commandQualifier: 0x00,
michael@0 119 url: "",
michael@0 120 text: "Default URL 1"}},
michael@0 121 {command: "d0208103011500820281823100050d44656661756c742055524c2032d004000d00b4",
michael@0 122 func: testLaunchBrowser,
michael@0 123 expect: {name: "launch_browser_cmd_18",
michael@0 124 commandQualifier: 0x00,
michael@0 125 url: "",
michael@0 126 text: "Default URL 2"}},
michael@0 127 {command: "d01a8103011500820281823100050d44656661756c742055524c2033",
michael@0 128 func: testLaunchBrowser,
michael@0 129 expect: {name: "launch_browser_cmd_19",
michael@0 130 commandQualifier: 0x00,
michael@0 131 url: "",
michael@0 132 text: "Default URL 3"}},
michael@0 133 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d08b4",
michael@0 134 func: testLaunchBrowser,
michael@0 135 expect: {name: "launch_browser_cmd_20",
michael@0 136 commandQualifier: 0x00,
michael@0 137 url: "",
michael@0 138 text: "Default URL 1"}},
michael@0 139 {command: "d0208103011500820281823100050d44656661756c742055524c2032d004000d00b4",
michael@0 140 func: testLaunchBrowser,
michael@0 141 expect: {name: "launch_browser_cmd_21",
michael@0 142 commandQualifier: 0x00,
michael@0 143 url: "",
michael@0 144 text: "Default URL 2"}},
michael@0 145 {command: "d01a8103011500820281823100050d44656661756c742055524c2033",
michael@0 146 func: testLaunchBrowser,
michael@0 147 expect: {name: "launch_browser_cmd_22",
michael@0 148 commandQualifier: 0x00,
michael@0 149 url: "",
michael@0 150 text: "Default URL 3"}},
michael@0 151 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d10b4",
michael@0 152 func: testLaunchBrowser,
michael@0 153 expect: {name: "launch_browser_cmd_23",
michael@0 154 commandQualifier: 0x00,
michael@0 155 url: "",
michael@0 156 text: "Default URL 1"}},
michael@0 157 {command: "d0208103011500820281823100050d44656661756c742055524c2032d004000d00b4",
michael@0 158 func: testLaunchBrowser,
michael@0 159 expect: {name: "launch_browser_cmd_24",
michael@0 160 commandQualifier: 0x00,
michael@0 161 url: "",
michael@0 162 text: "Default URL 2"}},
michael@0 163 {command: "d01a8103011500820281823100050d44656661756c742055524c2033",
michael@0 164 func: testLaunchBrowser,
michael@0 165 expect: {name: "launch_browser_cmd_25",
michael@0 166 commandQualifier: 0x00,
michael@0 167 url: "",
michael@0 168 text: "Default URL 3"}},
michael@0 169 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d20b4",
michael@0 170 func: testLaunchBrowser,
michael@0 171 expect: {name: "launch_browser_cmd_26",
michael@0 172 commandQualifier: 0x00,
michael@0 173 url: "",
michael@0 174 text: "Default URL 1"}},
michael@0 175 {command: "d0208103011500820281823100050d44656661756c742055524c2032d004000d00b4",
michael@0 176 func: testLaunchBrowser,
michael@0 177 expect: {name: "launch_browser_cmd_27",
michael@0 178 commandQualifier: 0x00,
michael@0 179 url: "",
michael@0 180 text: "Default URL 2"}},
michael@0 181 {command: "d01a8103011500820281823100050d44656661756c742055524c2033",
michael@0 182 func: testLaunchBrowser,
michael@0 183 expect: {name: "launch_browser_cmd_28",
michael@0 184 commandQualifier: 0x00,
michael@0 185 url: "",
michael@0 186 text: "Default URL 3"}},
michael@0 187 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d40b4",
michael@0 188 func: testLaunchBrowser,
michael@0 189 expect: {name: "launch_browser_cmd_29",
michael@0 190 commandQualifier: 0x00,
michael@0 191 url: "",
michael@0 192 text: "Default URL 1"}},
michael@0 193 {command: "d0208103011500820281823100050d44656661756c742055524c2032d004000d00b4",
michael@0 194 func: testLaunchBrowser,
michael@0 195 expect: {name: "launch_browser_cmd_30",
michael@0 196 commandQualifier: 0x00,
michael@0 197 url: "",
michael@0 198 text: "Default URL 2"}},
michael@0 199 {command: "d01a8103011500820281823100050d44656661756c742055524c2033",
michael@0 200 func: testLaunchBrowser,
michael@0 201 expect: {name: "launch_browser_cmd_31",
michael@0 202 commandQualifier: 0x00,
michael@0 203 url: "",
michael@0 204 text: "Default URL 3"}},
michael@0 205 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d80b4",
michael@0 206 func: testLaunchBrowser,
michael@0 207 expect: {name: "launch_browser_cmd_32",
michael@0 208 commandQualifier: 0x00,
michael@0 209 url: "",
michael@0 210 text: "Default URL 1"}},
michael@0 211 {command: "d0208103011500820281823100050d44656661756c742055524c2032d004000d00b4",
michael@0 212 func: testLaunchBrowser,
michael@0 213 expect: {name: "launch_browser_cmd_33",
michael@0 214 commandQualifier: 0x00,
michael@0 215 url: "",
michael@0 216 text: "Default URL 2"}},
michael@0 217 {command: "d01a8103011500820281823100050d44656661756c742055524c2033",
michael@0 218 func: testLaunchBrowser,
michael@0 219 expect: {name: "launch_browser_cmd_34",
michael@0 220 commandQualifier: 0x00,
michael@0 221 url: "",
michael@0 222 text: "Default URL 3"}},
michael@0 223 {command: "d0208103011500820281823100050d44656661756c742055524c2031d004000d00b4",
michael@0 224 func: testLaunchBrowser,
michael@0 225 expect: {name: "launch_browser_cmd_35",
michael@0 226 commandQualifier: 0x00,
michael@0 227 url: "",
michael@0 228 text: "Default URL 1"}},
michael@0 229 {command: "d01a8103011500820281823100050d44656661756c742055524c2032",
michael@0 230 func: testLaunchBrowser,
michael@0 231 expect: {name: "launch_browser_cmd_36",
michael@0 232 commandQualifier: 0x00,
michael@0 233 url: "",
michael@0 234 text: "Default URL 2"}},
michael@0 235 {command: "d01281030115028202818231000505804f60597d",
michael@0 236 func: testLaunchBrowser,
michael@0 237 expect: {name: "launch_browser_cmd_37",
michael@0 238 commandQualifier: 0x02,
michael@0 239 url: "",
michael@0 240 text: "你好"}},
michael@0 241 {command: "d010810301150282028182310005038030eb",
michael@0 242 func: testLaunchBrowser,
michael@0 243 expect: {name: "launch_browser_cmd_38",
michael@0 244 commandQualifier: 0x02,
michael@0 245 url: "",
michael@0 246 text: "ル"}}
michael@0 247 ];
michael@0 248
michael@0 249 runNextTest();

mercurial