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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/** @fileoverview Externs generated from namespace: test */
/**
* @const
*/
chrome.test = {};
/**
* Gives configuration options set by the test.
* @param {Function} callback
*/
chrome.test.getConfig = function(callback) {};
/**
* Notifies the browser process that test code running in the extension failed.
* This is only used for internal unit testing.
* @param {string} message
*/
chrome.test.notifyFail = function(message) {};
/**
* Notifies the browser process that test code running in the extension passed.
* This is only used for internal unit testing.
* @param {string=} message
*/
chrome.test.notifyPass = function(message) {};
/**
* Logs a message during internal unit testing.
* @param {string} message
*/
chrome.test.log = function(message) {};
/**
* Sends a string message to the browser process, generating a Notification
* that C++ test code can wait for.
* @param {string} message
* @param {Function=} callback
*/
chrome.test.sendMessage = function(message, callback) {};
/**
*/
chrome.test.callbackAdded = function() {};
/**
*/
chrome.test.runNextTest = function() {};
/**
* @param {?=} message
*/
chrome.test.fail = function(message) {};
/**
* @param {?=} message
*/
chrome.test.succeed = function(message) {};
/**
* Gets a module system suitable for use in the context of a test.
* @param {Function} callback
*/
chrome.test.runWithModuleSystem = function(callback) {};
/**
* @param {?} test
* @param {string=} message
*/
chrome.test.assertTrue = function(test, message) {};
/**
* @param {?} test
* @param {string=} message
*/
chrome.test.assertFalse = function(test, message) {};
/**
* @param {?} test
* @param {boolean} expected
* @param {string=} message
*/
chrome.test.assertBool = function(test, expected, message) {};
/**
* @param {?=} expected
* @param {?=} actual
*/
chrome.test.checkDeepEq = function(expected, actual) {};
/**
* @param {?=} expected
* @param {?=} actual
* @param {string=} message
*/
chrome.test.assertEq = function(expected, actual, message) {};
/**
*/
chrome.test.assertNoLastError = function() {};
/**
* @param {string} expectedError
*/
chrome.test.assertLastError = function(expectedError) {};
/**
* @param {Object} self
* @param {Array} args
* @param {?} message
* @param {Function} fn
*/
chrome.test.assertThrows = function(self, args, message, fn) {};
/**
* @param {string=} expectedError
* @param {Function=} func
*/
chrome.test.callback = function(expectedError, func) {};
/**
* @param {?} event
* @param {Function} func
*/
chrome.test.listenOnce = function(event, func) {};
/**
* @param {?} event
* @param {Function} func
*/
chrome.test.listenForever = function(event, func) {};
/**
* @param {Function=} func
*/
chrome.test.callbackPass = function(func) {};
/**
* @param {string} expectedError
* @param {Function=} func
*/
chrome.test.callbackFail = function(expectedError, func) {};
/**
* @param {Array} tests
*/
chrome.test.runTests = function(tests) {};
/**
*/
chrome.test.getApiFeatures = function() {};
/**
* @param {Array=} apiNames
*/
chrome.test.getApiDefinitions = function(apiNames) {};
/**
*/
chrome.test.isProcessingUserGesture = function() {};
/**
* Runs the callback in the context of a user gesture.
* @param {Function} callback
*/
chrome.test.runWithUserGesture = function(callback) {};
/**
* @param {Function} callback
*/
chrome.test.runWithoutUserGesture = function(callback) {};
/**
* Sends a string message one round trip from the renderer to the browser
* process and back.
* @param {string} message
* @param {Function} callback
*/
chrome.test.waitForRoundTrip = function(message, callback) {};
/**
* Sets the function to be called when an exception occurs. By default this is
* a function which fails the test. This is reset for every test run through
* $ref:test.runTests.
* @param {Function} callback
*/
chrome.test.setExceptionHandler = function(callback) {};
/** @type {!ChromeEvent} */
chrome.test.onMessage;
|