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

Unified Diff: extensions/shell/browser/api/identity/identity_api_unittest.cc

Issue 804673002: app_shell: Extend identity API stub (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unlimited-storage
Patch Set: (identity-stub) rebase Created 6 years 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 | « extensions/shell/browser/api/identity/identity_api.cc ('k') | extensions/shell/common/api/identity.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/shell/browser/api/identity/identity_api_unittest.cc
diff --git a/extensions/shell/browser/api/identity/identity_api_unittest.cc b/extensions/shell/browser/api/identity/identity_api_unittest.cc
index 26fa49e0908d909230feffee7de09dc82a788b0a..6ed13f9e3513047fb8eae38e2a160864331a80ab 100644
--- a/extensions/shell/browser/api/identity/identity_api_unittest.cc
+++ b/extensions/shell/browser/api/identity/identity_api_unittest.cc
@@ -84,5 +84,16 @@ TEST_F(IdentityApiTest, GetAuthToken) {
EXPECT_EQ("token123", value);
}
+// Verifies that the removeCachedAuthToken function exists and can be called
+// without crashing.
+TEST_F(IdentityApiTest, RemoveCachedAuthToken) {
+ MockShellOAuth2TokenService token_service;
+
+ // Function succeeds and returns nothing (for its callback).
+ scoped_ptr<base::Value> result = RunFunctionAndReturnValue(
+ new IdentityRemoveCachedAuthTokenFunction, "[{}]");
+ EXPECT_FALSE(result.get());
+}
+
} // namespace shell
} // namespace extensions
« no previous file with comments | « extensions/shell/browser/api/identity/identity_api.cc ('k') | extensions/shell/common/api/identity.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698