summaryrefslogtreecommitdiffstats
path: root/mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json')
-rw-r--r--mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json308
1 files changed, 308 insertions, 0 deletions
diff --git a/mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json b/mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json
new file mode 100644
index 0000000000..94e4b3bd9b
--- /dev/null
+++ b/mobile/android/geckoview/src/androidTest/assets/web_extensions/test-support/test-schema.json
@@ -0,0 +1,308 @@
+[
+ {
+ "namespace": "test",
+ "description": "Additional APIs for test support in GeckoView.",
+ "functions": [
+ {
+ "name": "setPrefs",
+ "type": "function",
+ "async": true,
+ "description": "Set prefs and return a set of saved prefs",
+ "parameters": [
+ {
+ "name": "oldPrefs",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" }
+ },
+ {
+ "name": "newPrefs",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" }
+ }
+ ]
+ },
+ {
+ "name": "restorePrefs",
+ "type": "function",
+ "async": true,
+ "description": "Restore prefs to old value",
+ "parameters": [
+ {
+ "type": "any",
+ "name": "oldPrefs"
+ }
+ ]
+ },
+ {
+ "name": "getPrefs",
+ "type": "function",
+ "async": true,
+ "description": "Get pref values.",
+ "parameters": [
+ {
+ "name": "prefs",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ },
+ {
+ "name": "getLinkColor",
+ "type": "function",
+ "async": true,
+ "description": "Get resolved color for the link resolved by a given selector.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ },
+ {
+ "type": "string",
+ "name": "selector"
+ }
+ ]
+ },
+ {
+ "name": "getRequestedLocales",
+ "type": "function",
+ "async": true,
+ "description": "Gets the requested locales.",
+ "parameters": []
+ },
+ {
+ "name": "addHistogram",
+ "type": "function",
+ "async": true,
+ "description": "Add a sample with the given value to the histogram with the given id.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "id"
+ },
+ {
+ "type": "any",
+ "name": "value"
+ }
+ ]
+ },
+ {
+ "name": "removeAllCertOverrides",
+ "type": "function",
+ "async": true,
+ "description": "Revokes SSL certificate overrides.",
+ "parameters": []
+ },
+ {
+ "name": "setScalar",
+ "type": "function",
+ "async": true,
+ "description": "Set the given value to the scalar with the given id.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "id"
+ },
+ {
+ "type": "any",
+ "name": "value"
+ }
+ ]
+ },
+ {
+ "name": "setResolutionAndScaleTo",
+ "type": "function",
+ "async": true,
+ "description": "Invokes nsIDOMWindowUtils.setResolutionAndScaleTo.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ },
+ {
+ "type": "number",
+ "name": "resolution"
+ }
+ ]
+ },
+ {
+ "name": "getActive",
+ "type": "function",
+ "async": true,
+ "description": "Returns true if the docShell is active for given tab.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+ {
+ "name": "getPidForTab",
+ "type": "function",
+ "async": true,
+ "description": "Gets the top-level pid belonging to tabId.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+ {
+ "name": "waitForContentTransformsReceived",
+ "type": "function",
+ "async": true,
+ "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",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+ {
+ "name": "getAllBrowserPids",
+ "type": "function",
+ "async": true,
+ "description": "Gets the list of pids of the running browser processes",
+ "parameters": []
+ },
+ {
+ "name": "getProfilePath",
+ "type": "function",
+ "async": true,
+ "description": "Gets the path of the current profile",
+ "parameters": []
+ },
+ {
+ "name": "killContentProcess",
+ "type": "function",
+ "async": true,
+ "description": "Crash all content processes",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "pid"
+ }
+ ]
+ },
+ {
+ "name": "flushApzRepaints",
+ "type": "function",
+ "async": true,
+ "description": "Invokes nsIDOMWindowUtils.flushApzRepaints for the document of the tabId.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+ {
+ "name": "promiseAllPaintsDone",
+ "type": "function",
+ "async": true,
+ "description": "A simplified version of promiseAllPaintsDone in paint_listeners.js.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+ {
+ "name": "usingGpuProcess",
+ "type": "function",
+ "async": true,
+ "description": "Returns true if Gecko is using a GPU process.",
+ "parameters": []
+ },
+
+ {
+ "name": "killGpuProcess",
+ "type": "function",
+ "async": true,
+ "description": "Kills the GPU process cleanly without generating a crash report.",
+ "parameters": []
+ },
+
+ {
+ "name": "crashGpuProcess",
+ "type": "function",
+ "async": true,
+ "description": "Causes the GPU process to crash.",
+ "parameters": []
+ },
+
+ {
+ "name": "clearHSTSState",
+ "type": "function",
+ "async": true,
+ "description": "Clears the sites on the HSTS list.",
+ "parameters": []
+ },
+
+ {
+ "name": "triggerCookieBannerDetected",
+ "type": "function",
+ "async": true,
+ "description": "Simulates a cookie banner detection",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+
+ {
+ "name": "triggerCookieBannerHandled",
+ "type": "function",
+ "async": true,
+ "description": "Simulates a cookie banner handling",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+
+ {
+ "name": "triggerTranslationsOffer",
+ "type": "function",
+ "async": true,
+ "description": "Simulates offering a translation.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ }
+ ]
+ },
+
+ {
+ "name": "triggerLanguageStateChange",
+ "type": "function",
+ "async": true,
+ "description": "Simulates expecting a translation.",
+ "parameters": [
+ {
+ "type": "number",
+ "name": "tabId"
+ },
+ {
+ "name": "languageState",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" }
+ }
+ ]
+ }
+ ]
+ }
+]