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

Unified Diff: remoting/webapp/unittests/it2me_helpee_channel_unittest.js

Issue 937593002: Changed identity API to use promises instead of callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed bad merge Created 5 years, 10 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
« no previous file with comments | « remoting/webapp/unittests/apps_v2_migration_unittest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/unittests/it2me_helpee_channel_unittest.js
diff --git a/remoting/webapp/unittests/it2me_helpee_channel_unittest.js b/remoting/webapp/unittests/it2me_helpee_channel_unittest.js
index 9c66b49f9b47f10ed528943f0bfd12bae1e80825..85bee2bbeb79d8fcefc70013ae4d7d4228ef2a5e 100644
--- a/remoting/webapp/unittests/it2me_helpee_channel_unittest.js
+++ b/remoting/webapp/unittests/it2me_helpee_channel_unittest.js
@@ -128,10 +128,10 @@ QUnit.asyncTest('connect() should return access code',
});
sinon.stub(chrome.identity, 'getAuthToken')
.callsArgWith(1, 'token');
- sinon.stub(remoting.identity, 'callWithToken')
- .callsArgWith(0, 'token');
+ sinon.stub(remoting.identity, 'getToken')
+ .returns(Promise.resolve('token'));
sinon.stub(remoting.identity, 'getEmail')
- .callsArgWith(0, {token: 'token', email: 'test@chromium.org'});
+ .returns(Promise.resolve('test@chromium.org'));
// Stubs Host behavior.
sinon.stub(host, 'initialized').returns(true);
sinon.stub(host, 'connect')
« no previous file with comments | « remoting/webapp/unittests/apps_v2_migration_unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698