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

Side by Side Diff: chrome/test/data/extensions/api_test/identity/test.js

Issue 10178020: Start implementing an auth flow for platform apps to be able to do auth (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var assertEq = chrome.test.assertEq; 5 var assertEq = chrome.test.assertEq;
6 var pass = chrome.test.callbackPass; 6 var pass = chrome.test.callbackPass;
7 7
8 chrome.test.runTests([ 8 chrome.test.runTests([
9 function getAuthToken() { 9 function getAuthToken() {
10 chrome.experimental.identity.getAuthToken(pass(function(token) { 10 chrome.experimental.identity.getAuthToken(pass(function(token) {
11 assertEq("auth_token", token); 11 assertEq("auth_token", token);
12 })); 12 }));
13 },
14
15 function launchAuthFlow() {
16 chrome.experimental.identity.launchAuthFlow(
17 {url: "https://some/url"},
18 pass(function(responseUrl) {
19 assertEq("https://test/url", responseUrl);
20 }));
13 } 21 }
14 ]); 22 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698