]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - inspector/scripts/tests/commands-with-async-attribute.json
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / inspector / scripts / tests / commands-with-async-attribute.json
diff --git a/inspector/scripts/tests/commands-with-async-attribute.json b/inspector/scripts/tests/commands-with-async-attribute.json
new file mode 100644 (file)
index 0000000..11262e8
--- /dev/null
@@ -0,0 +1,109 @@
+{
+    "domain": "Database",
+    "types": [
+        {
+            "id": "DatabaseId",
+            "type": "integer",
+            "description": "Unique identifier of Database object."
+        },
+        {
+            "id": "PrimaryColors",
+            "type": "string",
+            "enum": ["red", "green", "blue"]
+        },
+        {
+            "id": "ColorList",
+            "type": "array",
+            "items": { "$ref": "PrimaryColors" }
+        },
+        {
+            "id": "Error",
+            "type": "object",
+            "description": "Database error.",
+            "properties": [
+                { "name": "message", "type": "string", "description": "Error message." },
+                { "name": "code", "type": "integer", "description": "Error code." }
+            ]
+        }
+    ],
+    "commands": [
+        {
+            "name": "executeSQLSyncOptionalReturnValues",
+            "parameters": [
+                { "name": "databaseId", "$ref": "DatabaseId" },
+                { "name": "query", "type": "string" }
+            ],
+            "returns": [
+                { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+                { "name": "notes", "type": "string", "optional": true },
+                { "name": "timestamp", "type": "number", "optional": true },
+                { "name": "values", "type": "object", "optional": true },
+                { "name": "payload", "type": "any", "optional": true },
+                { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
+                { "name": "sqlError", "$ref": "Error", "optional": true },
+                { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
+                { "name": "alternateColors", "$ref": "ColorList", "optional": true },
+                { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
+            ]
+        },
+        {
+            "name": "executeSQLAsyncOptionalReturnValues",
+            "async": true,
+            "parameters": [
+                { "name": "databaseId", "$ref": "DatabaseId" },
+                { "name": "query", "type": "string" }
+            ],
+            "returns": [
+                { "name": "columnNames", "type": "array", "optional": true, "items": { "type": "string" } },
+                { "name": "notes", "type": "string", "optional": true },
+                { "name": "timestamp", "type": "number", "optional": true },
+                { "name": "values", "type": "object", "optional": true },
+                { "name": "payload", "type": "any", "optional": true },
+                { "name": "databaseId", "$ref": "DatabaseId", "optional": true },
+                { "name": "sqlError", "$ref": "Error", "optional": true },
+                { "name": "screenColor", "$ref": "PrimaryColors", "optional": true },
+                { "name": "alternateColors", "$ref": "ColorList", "optional": true },
+                { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"], "optional": true }
+            ]
+        },
+        {
+            "name": "executeSQLSync",
+            "parameters": [
+                { "name": "databaseId", "$ref": "DatabaseId" },
+                { "name": "query", "type": "string" }
+            ],
+            "returns": [
+                { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+                { "name": "notes", "type": "string" },
+                { "name": "timestamp", "type": "number" },
+                { "name": "values", "type": "object" },
+                { "name": "payload", "type": "any" },
+                { "name": "databaseId", "$ref": "DatabaseId" },
+                { "name": "sqlError", "$ref": "Error" },
+                { "name": "alternateColors", "$ref": "ColorList" },
+                { "name": "screenColor", "$ref": "PrimaryColors" },
+                { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
+            ]
+        },
+        {
+            "name": "executeSQLAsync",
+            "async": true,
+            "parameters": [
+                { "name": "databaseId", "$ref": "DatabaseId" },
+                { "name": "query", "type": "string" }
+            ],
+            "returns": [
+                { "name": "columnNames", "type": "array", "items": { "type": "string" } },
+                { "name": "notes", "type": "string" },
+                { "name": "timestamp", "type": "number" },
+                { "name": "values", "type": "object" },
+                { "name": "payload", "type": "any" },
+                { "name": "databaseId", "$ref": "DatabaseId" },
+                { "name": "sqlError", "$ref": "Error" },
+                { "name": "screenColor", "$ref": "PrimaryColors" },
+                { "name": "alternateColors", "$ref": "ColorList" },
+                { "name": "printColor", "type": "string", "enum": ["cyan", "magenta", "yellow", "black"] }
+            ]
+        }
+    ]
+}