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