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

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

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 4 years, 11 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
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_cache.h" 5 #include "net/http/http_cache.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 IPEndPoint remote_endpoint; 2015 IPEndPoint remote_endpoint;
2016 RunTransactionTestAndGetTimingAndConnectedSocketAddress( 2016 RunTransactionTestAndGetTimingAndConnectedSocketAddress(
2017 cache.http_cache(), transaction, log.bound(), &load_timing_info, 2017 cache.http_cache(), transaction, log.bound(), &load_timing_info,
2018 &remote_endpoint); 2018 &remote_endpoint);
2019 2019
2020 EXPECT_EQ(2, cache.network_layer()->transaction_count()); 2020 EXPECT_EQ(2, cache.network_layer()->transaction_count());
2021 EXPECT_EQ(1, cache.disk_cache()->open_count()); 2021 EXPECT_EQ(1, cache.disk_cache()->open_count());
2022 EXPECT_EQ(1, cache.disk_cache()->create_count()); 2022 EXPECT_EQ(1, cache.disk_cache()->create_count());
2023 TestLoadTimingNetworkRequest(load_timing_info); 2023 TestLoadTimingNetworkRequest(load_timing_info);
2024 2024
2025 EXPECT_FALSE(remote_endpoint.address().empty()); 2025 EXPECT_FALSE(remote_endpoint.address_number().empty());
2026 } 2026 }
2027 2027
2028 class RevalidationServer { 2028 class RevalidationServer {
2029 public: 2029 public:
2030 RevalidationServer() { 2030 RevalidationServer() {
2031 s_etag_used_ = false; 2031 s_etag_used_ = false;
2032 s_last_modified_used_ = false; 2032 s_last_modified_used_ = false;
2033 } 2033 }
2034 2034
2035 bool EtagUsed() { return s_etag_used_; } 2035 bool EtagUsed() { return s_etag_used_; }
(...skipping 5696 matching lines...) Expand 10 before | Expand all | Expand 10 after
7732 EXPECT_EQ(1, cache.disk_cache()->open_count()); 7732 EXPECT_EQ(1, cache.disk_cache()->open_count());
7733 EXPECT_EQ(1, cache.disk_cache()->create_count()); 7733 EXPECT_EQ(1, cache.disk_cache()->create_count());
7734 EXPECT_TRUE(response_info.was_cached); 7734 EXPECT_TRUE(response_info.was_cached);
7735 7735
7736 // The new SSL state is reported. 7736 // The new SSL state is reported.
7737 EXPECT_EQ(status2, response_info.ssl_info.connection_status); 7737 EXPECT_EQ(status2, response_info.ssl_info.connection_status);
7738 EXPECT_TRUE(cert2->Equals(response_info.ssl_info.cert.get())); 7738 EXPECT_TRUE(cert2->Equals(response_info.ssl_info.cert.get()));
7739 } 7739 }
7740 7740
7741 } // namespace net 7741 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698