test-schema.json (9688B)
1 [ 2 { 3 "namespace": "test", 4 "description": "Additional APIs for test support in GeckoView.", 5 "functions": [ 6 { 7 "name": "setPrefs", 8 "type": "function", 9 "async": true, 10 "description": "Set prefs and return a set of saved prefs", 11 "parameters": [ 12 { 13 "name": "oldPrefs", 14 "type": "object", 15 "properties": {}, 16 "additionalProperties": { "type": "any" } 17 }, 18 { 19 "name": "newPrefs", 20 "type": "object", 21 "properties": {}, 22 "additionalProperties": { "type": "any" } 23 } 24 ] 25 }, 26 { 27 "name": "restorePrefs", 28 "type": "function", 29 "async": true, 30 "description": "Restore prefs to old value", 31 "parameters": [ 32 { 33 "type": "any", 34 "name": "oldPrefs" 35 } 36 ] 37 }, 38 { 39 "name": "getPrefs", 40 "type": "function", 41 "async": true, 42 "description": "Get pref values.", 43 "parameters": [ 44 { 45 "name": "prefs", 46 "type": "array", 47 "items": { 48 "type": "string" 49 } 50 } 51 ] 52 }, 53 { 54 "name": "clearUserPref", 55 "type": "function", 56 "async": true, 57 "description": "Clears the user pref.", 58 "parameters": [ 59 { 60 "name": "pref", 61 "type": "string" 62 } 63 ] 64 }, 65 { 66 "name": "getLinkColor", 67 "type": "function", 68 "async": true, 69 "description": "Get resolved color for the link resolved by a given selector.", 70 "parameters": [ 71 { 72 "type": "number", 73 "name": "tabId" 74 }, 75 { 76 "type": "string", 77 "name": "selector" 78 } 79 ] 80 }, 81 { 82 "name": "getRequestedLocales", 83 "type": "function", 84 "async": true, 85 "description": "Gets the requested locales.", 86 "parameters": [] 87 }, 88 { 89 "name": "addHistogram", 90 "type": "function", 91 "async": true, 92 "description": "Add a sample with the given value to the histogram with the given id.", 93 "parameters": [ 94 { 95 "type": "string", 96 "name": "id" 97 }, 98 { 99 "type": "any", 100 "name": "value" 101 } 102 ] 103 }, 104 { 105 "name": "removeAllCertOverrides", 106 "type": "function", 107 "async": true, 108 "description": "Revokes SSL certificate overrides.", 109 "parameters": [] 110 }, 111 { 112 "name": "setResolutionAndScaleTo", 113 "type": "function", 114 "async": true, 115 "description": "Invokes nsIDOMWindowUtils.setResolutionAndScaleTo.", 116 "parameters": [ 117 { 118 "type": "number", 119 "name": "tabId" 120 }, 121 { 122 "type": "number", 123 "name": "resolution" 124 } 125 ] 126 }, 127 { 128 "name": "getActive", 129 "type": "function", 130 "async": true, 131 "description": "Returns true if the docShell is active for given tab.", 132 "parameters": [ 133 { 134 "type": "number", 135 "name": "tabId" 136 } 137 ] 138 }, 139 { 140 "name": "getPidForTab", 141 "type": "function", 142 "async": true, 143 "description": "Gets the top-level pid belonging to tabId.", 144 "parameters": [ 145 { 146 "type": "number", 147 "name": "tabId" 148 } 149 ] 150 }, 151 { 152 "name": "waitForContentTransformsReceived", 153 "type": "function", 154 "async": true, 155 "description": "If we want to test screen coordinates, we need to wait for the updated data which is what this function allows us to do", 156 "parameters": [ 157 { 158 "type": "number", 159 "name": "tabId" 160 } 161 ] 162 }, 163 { 164 "name": "getAllBrowserPids", 165 "type": "function", 166 "async": true, 167 "description": "Gets the list of pids of the running browser processes", 168 "parameters": [] 169 }, 170 { 171 "name": "getProfilePath", 172 "type": "function", 173 "async": true, 174 "description": "Gets the path of the current profile", 175 "parameters": [] 176 }, 177 { 178 "name": "killContentProcess", 179 "type": "function", 180 "async": true, 181 "description": "Crash all content processes", 182 "parameters": [ 183 { 184 "type": "number", 185 "name": "pid" 186 } 187 ] 188 }, 189 { 190 "name": "flushApzRepaints", 191 "type": "function", 192 "async": true, 193 "description": "Invokes nsIDOMWindowUtils.flushApzRepaints for the document of the tabId.", 194 "parameters": [ 195 { 196 "type": "number", 197 "name": "tabId" 198 } 199 ] 200 }, 201 { 202 "name": "zoomToFocusedInput", 203 "type": "function", 204 "async": true, 205 "description": "Invokes nsIDOMWindowUtils.zoomToFocusedInput for the document of the tabId.", 206 "parameters": [ 207 { 208 "type": "number", 209 "name": "tabId" 210 } 211 ] 212 }, 213 { 214 "name": "promiseAllPaintsDone", 215 "type": "function", 216 "async": true, 217 "description": "A simplified version of promiseAllPaintsDone in paint_listeners.js.", 218 "parameters": [ 219 { 220 "type": "number", 221 "name": "tabId" 222 } 223 ] 224 }, 225 { 226 "name": "usingGpuProcess", 227 "type": "function", 228 "async": true, 229 "description": "Returns true if Gecko is using a GPU process.", 230 "parameters": [] 231 }, 232 233 { 234 "name": "killGpuProcess", 235 "type": "function", 236 "async": true, 237 "description": "Kills the GPU process cleanly without generating a crash report.", 238 "parameters": [] 239 }, 240 241 { 242 "name": "crashGpuProcess", 243 "type": "function", 244 "async": true, 245 "description": "Causes the GPU process to crash.", 246 "parameters": [] 247 }, 248 249 { 250 "name": "clearHSTSState", 251 "type": "function", 252 "async": true, 253 "description": "Clears the sites on the HSTS list.", 254 "parameters": [] 255 }, 256 { 257 "name": "isSessionHistoryInParentRunning", 258 "type": "function", 259 "async": true, 260 "description": "Checks if session history in parent (SHIP) is running.", 261 "parameters": [] 262 }, 263 264 { 265 "name": "isFissionRunning", 266 "type": "function", 267 "async": true, 268 "description": "Checks if fission is running.", 269 "parameters": [] 270 }, 271 { 272 "name": "triggerCookieBannerDetected", 273 "type": "function", 274 "async": true, 275 "description": "Simulates a cookie banner detection", 276 "parameters": [ 277 { 278 "type": "number", 279 "name": "tabId" 280 } 281 ] 282 }, 283 284 { 285 "name": "triggerCookieBannerHandled", 286 "type": "function", 287 "async": true, 288 "description": "Simulates a cookie banner handling", 289 "parameters": [ 290 { 291 "type": "number", 292 "name": "tabId" 293 } 294 ] 295 }, 296 297 { 298 "name": "triggerTranslationsOffer", 299 "type": "function", 300 "async": true, 301 "description": "Simulates offering a translation.", 302 "parameters": [ 303 { 304 "type": "number", 305 "name": "tabId" 306 } 307 ] 308 }, 309 310 { 311 "name": "triggerLanguageStateChange", 312 "type": "function", 313 "async": true, 314 "description": "Simulates expecting a translation.", 315 "parameters": [ 316 { 317 "type": "number", 318 "name": "tabId" 319 }, 320 { 321 "name": "languageState", 322 "type": "object", 323 "properties": {}, 324 "additionalProperties": { "type": "any" } 325 } 326 ] 327 }, 328 329 { 330 "name": "setHandlingUserInput", 331 "type": "function", 332 "async": true, 333 "description": "Invokes nsIDOMWindowUtils.setHandlingUserInput to simulate user input activation.", 334 "parameters": [ 335 { 336 "type": "number", 337 "name": "tabId" 338 }, 339 { 340 "type": "boolean", 341 "name": "handlingUserInput" 342 } 343 ] 344 }, 345 346 { 347 "name": "getWebExtensionsSchemaPermissionNames", 348 "type": "function", 349 "async": true, 350 "description": "Returns all the permission names defined in the WebExtensions API JSONSchema given an array of type names", 351 "parameters": [ 352 { 353 "type": "array", 354 "minItems": 1, 355 "items": { "type": "string" }, 356 "name": "typeNames" 357 } 358 ] 359 }, 360 361 { 362 "name": "teardownAlertsService", 363 "type": "function", 364 "async": true, 365 "description": "Triggers teardown on Alerts Service so that it can clear all notification information.", 366 "parameters": [] 367 }, 368 369 { 370 "name": "notifyUserGestureActivation", 371 "type": "function", 372 "async": true, 373 "description": "Invokes document.notifyUserGestureActivation to simulate user gesture activation.", 374 "parameters": [ 375 { 376 "type": "number", 377 "name": "tabId" 378 } 379 ] 380 } 381 ] 382 } 383 ]