Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1070)

Unified Diff: remoting/webapp/js_proto/sinon_proto.js

Issue 1003433002: Updated remoting.xhr API to use promises. Removed access to the native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spy-promise
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« remoting/webapp/crd/js/xhr.js ('K') | « remoting/webapp/js_proto/qunit_proto.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/js_proto/sinon_proto.js
diff --git a/remoting/webapp/js_proto/sinon_proto.js b/remoting/webapp/js_proto/sinon_proto.js
index d7e1a2feeb352ca63d3a00891f7d7747d9ce3198..6775e487b463f575cfb6028631a4823f2a8d2465 100644
--- a/remoting/webapp/js_proto/sinon_proto.js
+++ b/remoting/webapp/js_proto/sinon_proto.js
@@ -96,6 +96,60 @@ sinon.Spy.prototype.reset = function() {};
sinon.Spy.prototype.restore = function() {};
+sinon.fakeServer = {};
Jamie 2015/03/18 22:16:17 Namespaces are usually declared immediately before
John Williams 2015/03/19 20:19:43 Done.
+
+/** @return {sinon.FakeXhr} */
+sinon.useFakeXMLHttpRequest = function() {};
+
+/** @interface */
+sinon.FakeXhr = function() {};
+
+/** @type {string} */
+sinon.FakeXhr.prototype.method;
+
+/** @type {string} */
+sinon.FakeXhr.prototype.url;
+
+/** @type {boolean} */
+sinon.FakeXhr.prototype.withCredentials;
+
+/** @type {?string} */
+sinon.FakeXhr.prototype.requestBody;
+
+/** @type {!Object<string,string>} */
+sinon.FakeXhr.prototype.requestHeaders;
+
+/**
+ * @param {number} status
+ * @param {!Object<string,string>} headers
+ * @param {?string} content
+ */
+sinon.FakeXhr.prototype.respond;
+
+/**
+ * @type {?function(!sinon.FakeXhr)}
+ */
+sinon.FakeXhr.prototype.onCreate;
+
+/** @return {sinon.FakeServer} */
+sinon.fakeServer.create = function() {};
+
+/** @interface */
+sinon.FakeServer = function() {};
+
+/**
+ * @param {*} a
+ * @param {*=} opt_b
+ * @param {*=} opt_c
+ * @return {void}
+ */
+sinon.FakeServer.prototype.respondWith = function(a, opt_b, opt_c) {};
+
+/**
+ * @return {void}
+ */
+sinon.FakeServer.prototype.respond = function() {};
+
/**
* @param {Object} obj
* @param {string} method
« remoting/webapp/crd/js/xhr.js ('K') | « remoting/webapp/js_proto/qunit_proto.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698