| Index: remoting/webapp/unittests/sinon_helpers.js
|
| diff --git a/remoting/webapp/unittests/sinon_helpers.js b/remoting/webapp/unittests/sinon_helpers.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..763a9391f370cab96d5c1f987fa67c55ab112ba6
|
| --- /dev/null
|
| +++ b/remoting/webapp/unittests/sinon_helpers.js
|
| @@ -0,0 +1,21 @@
|
| +// Copyright 2015 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.
|
| +
|
| +var sinonHelpers = {};
|
| +
|
| +sinonHelpers.reset = function() {
|
| +
|
| +/**
|
| + * @param {Object} obj
|
| + * @param {string} method
|
| + * @return {sinon.TestStub}
|
| + * @suppress {reportUnknownTypes}
|
| + */
|
| +sinon.$setupStub = function(obj, method) {
|
| + sinon.stub(obj, method);
|
| + obj[method].$testStub = /** @type {sinon.TestStub} */ (obj[method]);
|
| + return obj[method].$testStub;
|
| +};
|
| +
|
| +};
|
|
|