1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
[
{
"namespace": "test",
"nodoc": true,
"types": [],
"functions": [
{
"name": "getConfig",
"type": "function",
"description": "Gives configuration options set by the test.",
"parameters": [
{
"type": "function", "name": "callback", "parameters": [
{
"type": "object",
"name": "testConfig",
"properties": {
"testServer": {
"type": "object",
"optional": true,
"description": "Details on the test server used to mock network responses. Will be set only if test calls ExtensionApiTest::StartTestServer().",
"properties": {
"port": {
"type": "integer",
"description": "The port on which the test server is listening.",
"minimum": 1024,
"maximum": 65535
}
}
},
"testDataDirectory": {
"type": "string",
"description": "file:/// URL for the API test data directory."
}
}
}
]
}
]
},
{
"name": "notifyFail",
"unprivileged": true,
"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",
"unprivileged": true,
"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": "resetQuota",
"type": "function",
"description": "Resets all accumulated quota state for all extensions. This is only used for internal unit testing.",
"parameters": []
},
{
"name": "log",
"type": "function",
"description": "Logs a message during internal unit testing.",
"parameters": [
{"type": "string", "name": "message"}
]
},
{
"name": "createIncognitoTab",
"type": "function",
"description": "Creates an incognito tab during internal testing. Succeeds even if the extension is not enabled in incognito mode.",
"parameters": [
{"type": "string", "name": "url"}
]
},
{
"name": "sendMessage",
"type": "function",
"description": "Sends a string message to the browser process, generating a Notification that C++ test code can wait for.",
"parameters": [
{"type": "string", "name": "message"},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{"type": "string", "name": "response"}
]
}
]
}
],
"events": [
{
"name": "onMessage",
"type": "function",
"unprivileged": true,
"description": "Used to test sending messages to extensions.",
"parameters": [
{
"type": "object",
"name": "info",
"properties": {
"data": { "type": "string", "description": "Additional information." },
"lastMessage": { "type": "boolean", "description": "True if this was the last message for this test" }
}
}
]
}
]
}
]
|