1 // Copyright 2014 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.
5 /** @fileoverview Externs generated from namespace: test */
13 * Gives configuration options set by the test.
14 * @param {Function} callback
16 chrome
.test
.getConfig = function(callback
) {};
19 * Notifies the browser process that test code running in the extension failed.
20 * This is only used for internal unit testing.
21 * @param {string} message
23 chrome
.test
.notifyFail = function(message
) {};
26 * Notifies the browser process that test code running in the extension passed.
27 * This is only used for internal unit testing.
28 * @param {string=} message
30 chrome
.test
.notifyPass = function(message
) {};
33 * Logs a message during internal unit testing.
34 * @param {string} message
36 chrome
.test
.log = function(message
) {};
39 * Sends a string message to the browser process, generating a Notification
40 * that C++ test code can wait for.
41 * @param {string} message
42 * @param {Function=} callback
44 chrome
.test
.sendMessage = function(message
, callback
) {};
48 chrome
.test
.callbackAdded = function() {};
52 chrome
.test
.runNextTest = function() {};
57 chrome
.test
.fail = function(message
) {};
62 chrome
.test
.succeed = function(message
) {};
65 * Gets a module system suitable for use in the context of a test.
66 * @param {Function} callback
68 chrome
.test
.runWithModuleSystem = function(callback
) {};
72 * @param {string=} message
74 chrome
.test
.assertTrue = function(test
, message
) {};
78 * @param {string=} message
80 chrome
.test
.assertFalse = function(test
, message
) {};
84 * @param {boolean} expected
85 * @param {string=} message
87 chrome
.test
.assertBool = function(test
, expected
, message
) {};
90 * @param {?=} expected
93 chrome
.test
.checkDeepEq = function(expected
, actual
) {};
96 * @param {?=} expected
98 * @param {string=} message
100 chrome
.test
.assertEq = function(expected
, actual
, message
) {};
104 chrome
.test
.assertNoLastError = function() {};
107 * @param {string} expectedError
109 chrome
.test
.assertLastError = function(expectedError
) {};
112 * @param {Object} self
113 * @param {Array} args
115 * @param {Function} fn
117 chrome
.test
.assertThrows = function(self
, args
, message
, fn
) {};
120 * @param {string=} expectedError
121 * @param {Function=} func
123 chrome
.test
.callback = function(expectedError
, func
) {};
127 * @param {Function} func
129 chrome
.test
.listenOnce = function(event
, func
) {};
133 * @param {Function} func
135 chrome
.test
.listenForever = function(event
, func
) {};
138 * @param {Function=} func
140 chrome
.test
.callbackPass = function(func
) {};
143 * @param {string} expectedError
144 * @param {Function=} func
146 chrome
.test
.callbackFail = function(expectedError
, func
) {};
149 * @param {Array} tests
151 chrome
.test
.runTests = function(tests
) {};
155 chrome
.test
.getApiFeatures = function() {};
158 * @param {Array=} apiNames
160 chrome
.test
.getApiDefinitions = function(apiNames
) {};
164 chrome
.test
.isProcessingUserGesture = function() {};
167 * Runs the callback in the context of a user gesture.
168 * @param {Function} callback
170 chrome
.test
.runWithUserGesture = function(callback
) {};
173 * @param {Function} callback
175 chrome
.test
.runWithoutUserGesture = function(callback
) {};
178 * Sends a string message one round trip from the renderer to the browser
180 * @param {string} message
181 * @param {Function} callback
183 chrome
.test
.waitForRoundTrip = function(message
, callback
) {};
186 * Sets the function to be called when an exception occurs. By default this is
187 * a function which fails the test. This is reset for every test run through
188 * $ref:test.runTests.
189 * @param {Function} callback
191 chrome
.test
.setExceptionHandler = function(callback
) {};
193 /** @type {!ChromeEvent} */
194 chrome
.test
.onMessage
;