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

Unified Diff: chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc
diff --git a/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc b/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc
index 33b04811bc0446844c64933422ca5a4887f64b72..cadc5f26b54dd33c13fd581c0320ec0fce1ff0ec 100644
--- a/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc
+++ b/chrome/common/extensions/api/identity/extension_manifests_auth_unittest.cc
@@ -38,10 +38,10 @@ TEST_F(OAuth2ManifestTest, OAuth2SectionParsing) {
scoped_refptr<extensions::Extension> extension =
LoadAndExpectSuccess(manifest);
EXPECT_TRUE(extension->install_warnings().empty());
- EXPECT_EQ("client1", OAuth2Info::GetOAuth2Info(extension).client_id);
- EXPECT_EQ(2U, OAuth2Info::GetOAuth2Info(extension).scopes.size());
- EXPECT_EQ("scope1", OAuth2Info::GetOAuth2Info(extension).scopes[0]);
- EXPECT_EQ("scope2", OAuth2Info::GetOAuth2Info(extension).scopes[1]);
+ EXPECT_EQ("client1", OAuth2Info::GetOAuth2Info(extension.get()).client_id);
+ EXPECT_EQ(2U, OAuth2Info::GetOAuth2Info(extension.get()).scopes.size());
+ EXPECT_EQ("scope1", OAuth2Info::GetOAuth2Info(extension.get()).scopes[0]);
+ EXPECT_EQ("scope2", OAuth2Info::GetOAuth2Info(extension.get()).scopes[1]);
}
// OAuth2 section should be parsed for a packaged app.
@@ -54,10 +54,10 @@ TEST_F(OAuth2ManifestTest, OAuth2SectionParsing) {
scoped_refptr<extensions::Extension> extension =
LoadAndExpectSuccess(manifest);
EXPECT_TRUE(extension->install_warnings().empty());
- EXPECT_EQ("client1", OAuth2Info::GetOAuth2Info(extension).client_id);
- EXPECT_EQ(2U, OAuth2Info::GetOAuth2Info(extension).scopes.size());
- EXPECT_EQ("scope1", OAuth2Info::GetOAuth2Info(extension).scopes[0]);
- EXPECT_EQ("scope2", OAuth2Info::GetOAuth2Info(extension).scopes[1]);
+ EXPECT_EQ("client1", OAuth2Info::GetOAuth2Info(extension.get()).client_id);
+ EXPECT_EQ(2U, OAuth2Info::GetOAuth2Info(extension.get()).scopes.size());
+ EXPECT_EQ("scope1", OAuth2Info::GetOAuth2Info(extension.get()).scopes[0]);
+ EXPECT_EQ("scope2", OAuth2Info::GetOAuth2Info(extension.get()).scopes[1]);
}
// OAuth2 section should NOT be parsed for a hosted app.
@@ -75,8 +75,8 @@ TEST_F(OAuth2ManifestTest, OAuth2SectionParsing) {
EXPECT_EQ("'oauth2' is only allowed for extensions, legacy packaged apps "
"and packaged apps, and this is a hosted app.",
warning.message);
- EXPECT_EQ("", OAuth2Info::GetOAuth2Info(extension).client_id);
- EXPECT_TRUE(OAuth2Info::GetOAuth2Info(extension).scopes.empty());
+ EXPECT_EQ("", OAuth2Info::GetOAuth2Info(extension.get()).client_id);
+ EXPECT_TRUE(OAuth2Info::GetOAuth2Info(extension.get()).scopes.empty());
}
}

Powered by Google App Engine
This is Rietveld 408576698