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

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

Issue 1634653003: Abstract pref storage from net::SdchOwner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@net_prefs
Patch Set: Fix iOS Created 4 years, 10 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
« no previous file with comments | « ios/crnet/sdch_owner_pref_storage.cc ('k') | net/sdch/sdch_owner.h » ('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) 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 #include "net/http/http_auth_preferences.h" 5 #include "net/http/http_auth_preferences.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/prefs/pref_registry_simple.h"
12 #include "base/prefs/testing_pref_service.h"
13 #include "base/run_loop.h" 11 #include "base/run_loop.h"
14 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
15 #include "base/threading/thread.h" 13 #include "base/threading/thread.h"
16 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
17 15
18 namespace net { 16 namespace net {
19 17
20 TEST(HttpAuthPreferencesTest, AuthSchemes) { 18 TEST(HttpAuthPreferencesTest, AuthSchemes) {
21 const char* const expected_schemes[] = {"scheme1", "scheme2"}; 19 const char* const expected_schemes[] = {"scheme1", "scheme2"};
22 std::vector<std::string> expected_schemes_vector( 20 std::vector<std::string> expected_schemes_vector(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 "" 103 ""
106 #endif 104 #endif
107 ); 105 );
108 // Check initial value 106 // Check initial value
109 EXPECT_FALSE(http_auth_preferences.CanDelegate(GURL("abc"))); 107 EXPECT_FALSE(http_auth_preferences.CanDelegate(GURL("abc")));
110 http_auth_preferences.set_delegate_whitelist("*"); 108 http_auth_preferences.set_delegate_whitelist("*");
111 EXPECT_TRUE(http_auth_preferences.CanDelegate(GURL("abc"))); 109 EXPECT_TRUE(http_auth_preferences.CanDelegate(GURL("abc")));
112 } 110 }
113 111
114 } // namespace net 112 } // namespace net
OLDNEW
« no previous file with comments | « ios/crnet/sdch_owner_pref_storage.cc ('k') | net/sdch/sdch_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698