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

Unified Diff: net/http/http_auth_preferences_unittest.cc

Issue 2826273004: Enable loading gssapi library for Chromad. (Closed)
Patch Set: Enable loading gssapi library for Chromad. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_preferences.cc ('k') | net/http/mock_allow_http_auth_preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_preferences_unittest.cc
diff --git a/net/http/http_auth_preferences_unittest.cc b/net/http/http_auth_preferences_unittest.cc
index e975b0c951468581dad9568d090b3f81fa864149..f59f00f58924def0c5770eb3763f6f24b64b8fe8 100644
--- a/net/http/http_auth_preferences_unittest.cc
+++ b/net/http/http_auth_preferences_unittest.cc
@@ -24,6 +24,10 @@ TEST(HttpAuthPreferencesTest, AuthSchemes) {
,
""
#endif
+#if defined(OS_CHROMEOS)
+ ,
+ true
+#endif
);
EXPECT_TRUE(http_auth_preferences.IsSupportedScheme("scheme1"));
EXPECT_TRUE(http_auth_preferences.IsSupportedScheme("scheme2"));
@@ -37,6 +41,10 @@ TEST(HttpAuthPreferencesTest, DisableCnameLookup) {
,
""
#endif
+#if defined(OS_CHROMEOS)
+ ,
+ true
+#endif
);
EXPECT_FALSE(http_auth_preferences.NegotiateDisableCnameLookup());
http_auth_preferences.set_negotiate_disable_cname_lookup(true);
@@ -50,6 +58,10 @@ TEST(HttpAuthPreferencesTest, NegotiateEnablePort) {
,
""
#endif
+#if defined(OS_CHROMEOS)
+ ,
+ true
+#endif
);
EXPECT_FALSE(http_auth_preferences.NegotiateEnablePort());
http_auth_preferences.set_negotiate_enable_port(true);
@@ -64,6 +76,10 @@ TEST(HttpAuthPreferencesTest, AuthAndroidhNegotiateAccountType) {
,
""
#endif
+#if defined(OS_CHROMEOS)
+ ,
+ true
+#endif
);
EXPECT_EQ(std::string(),
http_auth_preferences.AuthAndroidNegotiateAccountType());
@@ -76,11 +92,32 @@ TEST(HttpAuthPreferencesTest, AuthAndroidhNegotiateAccountType) {
#if defined(OS_POSIX) && !defined(OS_ANDROID)
TEST(HttpAuthPreferencesTest, GssApiLibraryName) {
std::vector<std::string> AuthSchemes;
- HttpAuthPreferences http_auth_preferences(AuthSchemes, "bar");
+ HttpAuthPreferences http_auth_preferences(AuthSchemes, "bar"
+#if defined(OS_CHROMEOS)
+ ,
+ true
+#endif
+ );
EXPECT_EQ(std::string("bar"), http_auth_preferences.GssapiLibraryName());
}
#endif
+#if defined(OS_CHROMEOS)
+TEST(HttpAuthPreferencesTest, AllowGssapiLibraryLoadTrue) {
+ std::vector<std::string> AuthSchemes;
+ HttpAuthPreferences http_auth_preferences(AuthSchemes, "foo", true);
+ EXPECT_TRUE(http_auth_preferences.AllowGssapiLibraryLoad());
+}
+#endif
+
+#if defined(OS_CHROMEOS)
+TEST(HttpAuthPreferencesTest, AllowGssapiLibraryLoadFalse) {
+ std::vector<std::string> AuthSchemes;
+ HttpAuthPreferences http_auth_preferences(AuthSchemes, "foo", false);
+ EXPECT_FALSE(http_auth_preferences.AllowGssapiLibraryLoad());
+}
+#endif
+
TEST(HttpAuthPreferencesTest, AuthServerWhitelist) {
std::vector<std::string> auth_schemes;
HttpAuthPreferences http_auth_preferences(auth_schemes
@@ -88,6 +125,10 @@ TEST(HttpAuthPreferencesTest, AuthServerWhitelist) {
,
""
#endif
+#if defined(OS_CHROMEOS)
+ ,
+ true
+#endif
);
// Check initial value
EXPECT_FALSE(http_auth_preferences.CanUseDefaultCredentials(GURL("abc")));
@@ -102,6 +143,10 @@ TEST(HttpAuthPreferencesTest, AuthDelegateWhitelist) {
,
""
#endif
+#if defined(OS_CHROMEOS)
+ ,
+ true
+#endif
);
// Check initial value
EXPECT_FALSE(http_auth_preferences.CanDelegate(GURL("abc")));
« no previous file with comments | « net/http/http_auth_preferences.cc ('k') | net/http/mock_allow_http_auth_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698