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

Side by Side Diff: net/quic/chromium/quic_stream_factory_test.cc

Issue 2421383003: Add operator==(const GURL&, const StringPiece&) to gurl.h (Closed)
Patch Set: remove comment Created 4 years, 2 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 | « extensions/renderer/script_injection_manager.cc ('k') | url/gurl.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/quic/chromium/quic_stream_factory.h" 5 #include "net/quic/chromium/quic_stream_factory.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 5196 matching lines...) Expand 10 before | Expand all | Expand 10 after
5207 5207
5208 QuicServerId server_id; 5208 QuicServerId server_id;
5209 QuicCryptoClientConfig::CachedState* state; 5209 QuicCryptoClientConfig::CachedState* state;
5210 } test_cases[] = { 5210 } test_cases[] = {
5211 TestCase("www.google.com", 443, privacy_mode_, crypto_config), 5211 TestCase("www.google.com", 443, privacy_mode_, crypto_config),
5212 TestCase("www.example.com", 443, privacy_mode_, crypto_config), 5212 TestCase("www.example.com", 443, privacy_mode_, crypto_config),
5213 TestCase("www.example.com", 4433, privacy_mode_, crypto_config)}; 5213 TestCase("www.example.com", 4433, privacy_mode_, crypto_config)};
5214 5214
5215 // Clear cached states for the origin https://www.example.com:4433. 5215 // Clear cached states for the origin https://www.example.com:4433.
5216 GURL origin("https://www.example.com:4433"); 5216 GURL origin("https://www.example.com:4433");
5217 factory_->ClearCachedStatesInCryptoConfig( 5217 factory_->ClearCachedStatesInCryptoConfig(base::Bind(
5218 base::Bind(&GURL::operator==, base::Unretained(&origin))); 5218 static_cast<bool (*)(const GURL&, const GURL&)>(::operator==), origin));
5219 EXPECT_FALSE(test_cases[0].state->certs().empty()); 5219 EXPECT_FALSE(test_cases[0].state->certs().empty());
5220 EXPECT_FALSE(test_cases[1].state->certs().empty()); 5220 EXPECT_FALSE(test_cases[1].state->certs().empty());
5221 EXPECT_TRUE(test_cases[2].state->certs().empty()); 5221 EXPECT_TRUE(test_cases[2].state->certs().empty());
5222 5222
5223 // Clear all cached states. 5223 // Clear all cached states.
5224 factory_->ClearCachedStatesInCryptoConfig( 5224 factory_->ClearCachedStatesInCryptoConfig(
5225 base::Callback<bool(const GURL&)>()); 5225 base::Callback<bool(const GURL&)>());
5226 EXPECT_TRUE(test_cases[0].state->certs().empty()); 5226 EXPECT_TRUE(test_cases[0].state->certs().empty());
5227 EXPECT_TRUE(test_cases[1].state->certs().empty()); 5227 EXPECT_TRUE(test_cases[1].state->certs().empty());
5228 EXPECT_TRUE(test_cases[2].state->certs().empty()); 5228 EXPECT_TRUE(test_cases[2].state->certs().empty());
5229 } 5229 }
5230 5230
5231 } // namespace test 5231 } // namespace test
5232 } // namespace net 5232 } // namespace net
OLDNEW
« no previous file with comments | « extensions/renderer/script_injection_manager.cc ('k') | url/gurl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698