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

Side by Side Diff: net/nqe/network_quality_estimator_test_util.h

Issue 2486033002: NQE: Use ResponseHeaders to get the HTTP status code (Closed)
Patch Set: Add redirect test Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_
6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 NetworkChangeNotifier::ConnectionType new_connection_type, 57 NetworkChangeNotifier::ConnectionType new_connection_type,
58 const std::string& network_id); 58 const std::string& network_id);
59 59
60 // Called by the embedded server when an HTTP request is received. 60 // Called by the embedded server when an HTTP request is received.
61 std::unique_ptr<test_server::HttpResponse> HandleRequest( 61 std::unique_ptr<test_server::HttpResponse> HandleRequest(
62 const test_server::HttpRequest& request); 62 const test_server::HttpRequest& request);
63 63
64 // Returns a GURL hosted at the embedded test server. 64 // Returns a GURL hosted at the embedded test server.
65 const GURL GetEchoURL() const; 65 const GURL GetEchoURL() const;
66 66
67 // Returns a GURL hosted at the embedded test server which contains redirect
68 // to another HTTPS URL.
69 const GURL GetRedirectURL() const;
70
67 void set_effective_connection_type(EffectiveConnectionType type) { 71 void set_effective_connection_type(EffectiveConnectionType type) {
68 // Callers should not set effective connection type along with the 72 // Callers should not set effective connection type along with the
69 // lower-layer metrics. 73 // lower-layer metrics.
70 DCHECK(!start_time_null_http_rtt_ && !recent_http_rtt_ && 74 DCHECK(!start_time_null_http_rtt_ && !recent_http_rtt_ &&
71 !start_time_null_transport_rtt_ && !recent_transport_rtt_ && 75 !start_time_null_transport_rtt_ && !recent_transport_rtt_ &&
72 !start_time_null_downlink_throughput_kbps_ && 76 !start_time_null_downlink_throughput_kbps_ &&
73 !recent_downlink_throughput_kbps_); 77 !recent_downlink_throughput_kbps_);
74 effective_connection_type_ = type; 78 effective_connection_type_ = type;
75 } 79 }
76 80
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 double rand_double_; 222 double rand_double_;
219 223
220 EmbeddedTestServer embedded_test_server_; 224 EmbeddedTestServer embedded_test_server_;
221 225
222 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator); 226 DISALLOW_COPY_AND_ASSIGN(TestNetworkQualityEstimator);
223 }; 227 };
224 228
225 } // namespace net 229 } // namespace net
226 230
227 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_ 231 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698