OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <ostream> | 5 #include <ostream> |
6 | 6 |
7 | |
8 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
9 #include "net/http/http_auth_filter.h" | 8 #include "net/http/http_auth_filter.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "url/gurl.h" | 10 #include "url/gurl.h" |
12 | 11 |
13 namespace net { | 12 namespace net { |
14 | 13 |
15 namespace { | 14 namespace { |
16 | 15 |
17 static const char* const server_whitelist_array[] = { | 16 static const char* const server_whitelist_array[] = { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 server_whitelist_filter_string += server_whitelist_array[i]; | 89 server_whitelist_filter_string += server_whitelist_array[i]; |
91 } | 90 } |
92 HttpAuthFilterWhitelist filter(server_whitelist_filter_string); | 91 HttpAuthFilterWhitelist filter(server_whitelist_filter_string); |
93 for (size_t i = 0; i < arraysize(urls); i++) { | 92 for (size_t i = 0; i < arraysize(urls); i++) { |
94 EXPECT_EQ(urls[i].matches, filter.IsValid(urls[i].url, urls[i].target)) | 93 EXPECT_EQ(urls[i].matches, filter.IsValid(urls[i].url, urls[i].target)) |
95 << " " << i << ": " << urls[i].url; | 94 << " " << i << ": " << urls[i].url; |
96 } | 95 } |
97 } | 96 } |
98 | 97 |
99 } // namespace net | 98 } // namespace net |
OLD | NEW |