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

Side by Side Diff: net/http/url_security_manager_unittest.cc

Issue 3155046: Add support for delegated Kerberos tickets during Negotiate authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | « net/http/url_security_manager_posix.cc ('k') | net/http/url_security_manager_win.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "net/http/url_security_manager.h" 5 #include "net/http/url_security_manager.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/http/http_auth_filter.h" 10 #include "net/http/http_auth_filter.h"
(...skipping 26 matching lines...) Expand all
37 { "http://baz", true, true }, 37 { "http://baz", true, true },
38 { "http://www.exampl.com", false, false }, 38 { "http://www.exampl.com", false, false },
39 { "http://example.org", false, false }, 39 { "http://example.org", false, false },
40 { "http://foobar.net", false, false }, 40 { "http://foobar.net", false, false },
41 { "http://boo.fubar.com", false, false }, 41 { "http://boo.fubar.com", false, false },
42 }; 42 };
43 43
44 } // namespace 44 } // namespace
45 45
46 TEST(URLSecurityManager, CreateWhitelist) { 46 TEST(URLSecurityManager, CreateWhitelist) {
47 HttpAuthFilterWhitelist* auth_filter = new HttpAuthFilterWhitelist(); 47 HttpAuthFilterWhitelist* auth_filter = new HttpAuthFilterWhitelist(
48 kTestAuthWhitelist);
48 ASSERT_TRUE(auth_filter); 49 ASSERT_TRUE(auth_filter);
49 auth_filter->SetWhitelist(kTestAuthWhitelist);
50 // The URL security manager takes ownership of |auth_filter|. 50 // The URL security manager takes ownership of |auth_filter|.
51 scoped_ptr<URLSecurityManager> url_security_manager( 51 scoped_ptr<URLSecurityManager> url_security_manager(
52 URLSecurityManager::Create(auth_filter)); 52 URLSecurityManager::Create(auth_filter, NULL));
53 ASSERT_TRUE(url_security_manager.get()); 53 ASSERT_TRUE(url_security_manager.get());
54 54
55 for (size_t i = 0; i < arraysize(kTestDataList); ++i) { 55 for (size_t i = 0; i < arraysize(kTestDataList); ++i) {
56 GURL gurl(kTestDataList[i].url); 56 GURL gurl(kTestDataList[i].url);
57 bool can_use_default = 57 bool can_use_default =
58 url_security_manager->CanUseDefaultCredentials(gurl); 58 url_security_manager->CanUseDefaultCredentials(gurl);
59 59
60 EXPECT_EQ(kTestDataList[i].succeeds_in_whitelist, can_use_default) 60 EXPECT_EQ(kTestDataList[i].succeeds_in_whitelist, can_use_default)
61 << " Run: " << i << " URL: '" << gurl << "'"; 61 << " Run: " << i << " URL: '" << gurl << "'";
62 } 62 }
63 } 63 }
64 64
65 } // namespace net 65 } // namespace net
OLDNEW
« no previous file with comments | « net/http/url_security_manager_posix.cc ('k') | net/http/url_security_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698