summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/test.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /toolkit/components/extensions/schemas/test.json
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/schemas/test.json')
-rw-r--r--toolkit/components/extensions/schemas/test.json206
1 files changed, 206 insertions, 0 deletions
diff --git a/toolkit/components/extensions/schemas/test.json b/toolkit/components/extensions/schemas/test.json
new file mode 100644
index 0000000000..d0327a9e63
--- /dev/null
+++ b/toolkit/components/extensions/schemas/test.json
@@ -0,0 +1,206 @@
+[
+ {
+ "namespace": "test",
+ "allowedContexts": ["content", "devtools"],
+ "defaultContexts": ["content", "devtools"],
+ "description": "none",
+ "functions": [
+ {
+ "name": "withHandlingUserInput",
+ "type": "function",
+ "description": "Calls the callback function wrapped with user input set. This is only used for internal unit testing.",
+ "parameters": [{ "type": "function", "name": "callback" }]
+ },
+ {
+ "name": "notifyFail",
+ "type": "function",
+ "description": "Notifies the browser process that test code running in the extension failed. This is only used for internal unit testing.",
+ "parameters": [{ "type": "string", "name": "message" }]
+ },
+ {
+ "name": "notifyPass",
+ "type": "function",
+ "description": "Notifies the browser process that test code running in the extension passed. This is only used for internal unit testing.",
+ "parameters": [
+ { "type": "string", "name": "message", "optional": true }
+ ]
+ },
+ {
+ "name": "log",
+ "type": "function",
+ "description": "Logs a message during internal unit testing.",
+ "parameters": [{ "type": "string", "name": "message" }]
+ },
+ {
+ "name": "sendMessage",
+ "type": "function",
+ "description": "Sends a string message to the browser process, generating a Notification that C++ test code can wait for.",
+ "allowAmbiguousOptionalArguments": true,
+ "parameters": [
+ { "type": "any", "name": "arg1", "optional": true },
+ { "type": "any", "name": "arg2", "optional": true }
+ ]
+ },
+ {
+ "name": "fail",
+ "type": "function",
+ "parameters": [{ "type": "any", "name": "message", "optional": true }]
+ },
+ {
+ "name": "succeed",
+ "type": "function",
+ "parameters": [{ "type": "any", "name": "message", "optional": true }]
+ },
+ {
+ "name": "assertTrue",
+ "type": "function",
+ "allowAmbiguousOptionalArguments": true,
+ "parameters": [
+ { "name": "test", "type": "any", "optional": true },
+ { "type": "string", "name": "message", "optional": true }
+ ]
+ },
+ {
+ "name": "assertFalse",
+ "type": "function",
+ "allowAmbiguousOptionalArguments": true,
+ "parameters": [
+ { "name": "test", "type": "any", "optional": true },
+ { "type": "string", "name": "message", "optional": true }
+ ]
+ },
+ {
+ "name": "assertBool",
+ "type": "function",
+ "unsupported": true,
+ "parameters": [
+ {
+ "name": "test",
+ "choices": [{ "type": "string" }, { "type": "boolean" }]
+ },
+ { "type": "boolean", "name": "expected" },
+ { "type": "string", "name": "message", "optional": true }
+ ]
+ },
+ {
+ "name": "assertDeepEq",
+ "type": "function",
+ "allowAmbiguousOptionalArguments": true,
+ "parameters": [
+ { "type": "any", "name": "expected" },
+ { "type": "any", "name": "actual" },
+ { "type": "string", "name": "message", "optional": true }
+ ]
+ },
+ {
+ "name": "assertEq",
+ "type": "function",
+ "allowAmbiguousOptionalArguments": true,
+ "parameters": [
+ { "type": "any", "name": "expected", "optional": true },
+ { "type": "any", "name": "actual", "optional": true },
+ { "type": "string", "name": "message", "optional": true }
+ ]
+ },
+ {
+ "name": "assertNoLastError",
+ "type": "function",
+ "unsupported": true,
+ "parameters": []
+ },
+ {
+ "name": "assertLastError",
+ "type": "function",
+ "unsupported": true,
+ "parameters": [{ "type": "string", "name": "expectedError" }]
+ },
+ {
+ "name": "assertRejects",
+ "type": "function",
+ "async": true,
+ "parameters": [
+ {
+ "name": "promise",
+ "$ref": "Promise"
+ },
+ {
+ "name": "expectedError",
+ "$ref": "ExpectedError"
+ },
+ {
+ "name": "message",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ },
+ {
+ "name": "assertThrows",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "func",
+ "type": "function"
+ },
+ {
+ "name": "expectedError",
+ "$ref": "ExpectedError"
+ },
+ {
+ "name": "message",
+ "type": "string",
+ "optional": true
+ }
+ ]
+ }
+ ],
+ "types": [
+ {
+ "id": "ExpectedError",
+ "choices": [
+ { "type": "string" },
+ {
+ "type": "object",
+ "isInstanceOf": "RegExp",
+ "additionalProperties": true
+ },
+ { "type": "function" }
+ ]
+ },
+ {
+ "id": "Promise",
+ "choices": [
+ {
+ "type": "object",
+ "properties": {
+ "then": { "type": "function" }
+ },
+ "additionalProperties": true
+ },
+ {
+ "type": "object",
+ "isInstanceOf": "Promise",
+ "additionalProperties": true
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "onMessage",
+ "type": "function",
+ "description": "Used to test sending messages to extensions.",
+ "parameters": [
+ {
+ "type": "string",
+ "name": "message"
+ },
+ {
+ "type": "any",
+ "name": "argument"
+ }
+ ]
+ }
+ ]
+ }
+]