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

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

Issue 13520005: autotestPrivate.loginStatus returns a dictionary instead of a string. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « chrome/common/extensions/api/autotest_private.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 chrome.test.runTests([ 5 chrome.test.runTests([
6 // logout/restart/shutdown don't do anything as we don't want to kill the 6 // logout/restart/shutdown don't do anything as we don't want to kill the
7 // browser with these tests. 7 // browser with these tests.
8 function logout() { 8 function logout() {
9 chrome.autotestPrivate.logout(); 9 chrome.autotestPrivate.logout();
10 chrome.test.succeed(); 10 chrome.test.succeed();
11 }, 11 },
12 function restart() { 12 function restart() {
13 chrome.autotestPrivate.restart(); 13 chrome.autotestPrivate.restart();
14 chrome.test.succeed(); 14 chrome.test.succeed();
15 }, 15 },
16 function shutdown() { 16 function shutdown() {
17 chrome.autotestPrivate.shutdown(true); 17 chrome.autotestPrivate.shutdown(true);
18 chrome.test.succeed(); 18 chrome.test.succeed();
19 }, 19 },
20 function loginStatus() { 20 function loginStatus() {
21 chrome.autotestPrivate.loginStatus( 21 chrome.autotestPrivate.loginStatus(
22 chrome.test.callbackPass(function(status) { 22 chrome.test.callbackPass(function(status) {
23 chrome.test.assertEq(typeof(status), 'string'); 23 chrome.test.assertEq(typeof(status), 'object');
24 chrome.test.assertTrue(status != ""); 24 chrome.test.assertTrue(status.hasOwnProperty("isLoggedIn"));
25 // TODO(achuith): Add tests for various login states. 25 chrome.test.assertTrue(status.hasOwnProperty("isOwner"));
26 chrome.test.assertTrue(status.hasOwnProperty("isScreenLocked"));
27 chrome.test.assertTrue(status.hasOwnProperty("isRegularUser"));
28 chrome.test.assertTrue(status.hasOwnProperty("isGuest"));
29 chrome.test.assertTrue(status.hasOwnProperty("isKiosk"));
30 chrome.test.assertTrue(status.hasOwnProperty("email"));
31 chrome.test.assertTrue(status.hasOwnProperty("displayEmail"));
32 chrome.test.assertTrue(status.hasOwnProperty("userImage"));
26 })); 33 }));
27 } 34 }
28 ]); 35 ]);
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/autotest_private.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698