[MacViews] Show comboboxes with a native NSMenu
[chromium-blink-merge.git] / remoting / webapp / js_proto / sinon_proto.js
blob7679b9caaa7ab0e2bdaac3d61668e862b303ed6c
1 // Copyright 2015 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 var sinon = sinon || {};
7 /** @type {Object} */
8 sinon.assert = {};
10 /**
11 * @param {(sinon.Spy|Function)} f
13 sinon.assert.called = function(f) {};
15 /**
16 * @param {(sinon.Spy|Function)} f
18 sinon.assert.calledOnce = function(f) {};
20 /**
21 * @param {(sinon.Spy|Function)} f
22 * @param {...} data
24 sinon.assert.calledWith = function(f, data) {};
26 /**
27 * @param {*} value
28 * @return {Object}
30 sinon.match = function(value) {};
31 /**
32 * @param {(sinon.Spy|Function)} f
34 sinon.assert.notCalled = function(f) {};
36 /** @constructor */
37 sinon.Clock = function() {};
39 /** @param {number} ms */
40 sinon.Clock.prototype.tick = function(ms) {};
42 /** @return {void} */
43 sinon.Clock.prototype.restore = function() {};
45 /**
46 * @param {number=} opt_now
47 * @return {sinon.Clock}
49 sinon.useFakeTimers = function(opt_now) {};
51 /** @constructor */
52 sinon.Expectation = function() {};
54 /** @return {sinon.Expectation} */
55 sinon.Expectation.prototype.once = function() {};
57 /** @return {sinon.Expectation} */
58 sinon.Expectation.prototype.never = function() {};
60 /**
61 * @param {number} times
62 * @return {sinon.Expectation}
64 sinon.Expectation.prototype.exactly = function(times) {};
66 /**
67 * @param {...} data
68 * @return {sinon.Expectation}
70 sinon.Expectation.prototype.withArgs = function(data) {};
72 /** @return {boolean} */
73 sinon.Expectation.prototype.verify = function() {};
75 /** @param {...} data */
76 sinon.Expectation.prototype.returns = function(data) {};
78 /**
79 * @param {Object} obj
80 * @return {sinon.Mock}
82 sinon.mock = function(obj) {};
84 /** @constructor */
85 sinon.Mock = function() {};
87 /**
88 * @param {string} method
89 * @return {sinon.Expectation}
91 sinon.Mock.prototype.expects = function(method) {};
93 /**
94 * @return {void}
96 sinon.Mock.prototype.restore = function() {};
98 /**
99 * @return {boolean}
101 sinon.Mock.prototype.verify = function() {};
103 /** @type {function(...):Function} */
104 sinon.spy = function() {};
107 * This is a jscompile type that can be OR'ed with the actual type to make
108 * jscompile aware of the sinon.spy functions that are added to the base
109 * type.
110 * Example: Instead of specifying a type of
111 * {function():void}
112 * the following can be used to add the sinon.spy functions:
113 * {(sinon.Spy|function():void)}
115 * @interface
117 sinon.Spy = function() {};
119 /** @type {number} */
120 sinon.Spy.prototype.callCount;
122 /** @type {boolean} */
123 sinon.Spy.prototype.called;
125 /** @type {boolean} */
126 sinon.Spy.prototype.calledOnce;
128 /** @type {boolean} */
129 sinon.Spy.prototype.calledTwice;
131 /** @type {function(...):boolean} */
132 sinon.Spy.prototype.calledWith = function() {};
134 /** @type {function(number):{args:Array}} */
135 sinon.Spy.prototype.getCall = function(index) {};
137 sinon.Spy.prototype.reset = function() {};
139 sinon.Spy.prototype.restore = function() {};
141 /** @type {Array<Array<*>>} */
142 sinon.Spy.prototype.args;
145 * @param {Object=} opt_obj
146 * @param {string=} opt_method
147 * @param {Function=} opt_stubFunction
148 * @return {sinon.TestStub}
150 sinon.stub = function(opt_obj, opt_method, opt_stubFunction) {};
153 * TODO(jrw): rename to |sinon.Stub| for consistency
154 * @interface
155 * @extends {sinon.Spy}
157 sinon.TestStub = function() {};
159 /** @type {function(number):{args:Array}} */
160 sinon.TestStub.prototype.getCall = function(index) {};
162 sinon.TestStub.prototype.restore = function() {};
164 /** @param {*} a */
165 sinon.TestStub.prototype.returns = function(a) {};
167 /** @type {function(...):sinon.Expectation} */
168 sinon.TestStub.prototype.withArgs = function() {};
170 /** @type {function(...):sinon.Expectation} */
171 sinon.TestStub.prototype.onFirstCall = function() {};
173 /** @type {function(...):sinon.Expectation} */
174 sinon.TestStub.prototype.callsArgWith = function() {};
176 /** @returns {Object} */
177 sinon.createStubInstance = function (/** * */ constructor) {};
179 /** @interface */
180 sinon.FakeXhrCtrl = function() {};
183 * @type {?function(!sinon.FakeXhr)}
185 sinon.FakeXhrCtrl.prototype.onCreate;
188 * @type {function():void}
190 sinon.FakeXhrCtrl.prototype.restore;
192 /** @return {sinon.FakeXhrCtrl} */
193 sinon.useFakeXMLHttpRequest = function() {};
195 /** @interface */
196 sinon.FakeXhr = function() {};
198 /** @type {number} */
199 sinon.FakeXhr.prototype.readyState;
201 /** @type {string} */
202 sinon.FakeXhr.prototype.method;
204 /** @type {string} */
205 sinon.FakeXhr.prototype.url;
207 /** @type {boolean} */
208 sinon.FakeXhr.prototype.withCredentials;
210 /** @type {?string} */
211 sinon.FakeXhr.prototype.requestBody;
213 /** @type {!Object<string>} */
214 sinon.FakeXhr.prototype.requestHeaders;
217 * @param {number} status
218 * @param {!Object<string>} headers
219 * @param {?string} content
221 sinon.FakeXhr.prototype.respond;
224 * @param {string} event
225 * @param {Function} handler
227 sinon.FakeXhr.prototype.addEventListener;