summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authormartijn <martijn@martijnc.be>2016-02-24 10:46:20 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-24 18:47:36 +0000
commit21968ea54a412821a1d4ba23f9f9442aae52275e (patch)
tree70124bc5c81db6692877b270b5b0e2ddafaadb18 /net/http
parentd653a56065a012f08bd197514e06efe7baafd1b1 (diff)
downloadchromium_src-21968ea54a412821a1d4ba23f9f9442aae52275e.zip
chromium_src-21968ea54a412821a1d4ba23f9f9442aae52275e.tar.gz
chromium_src-21968ea54a412821a1d4ba23f9f9442aae52275e.tar.bz2
Add a constructor that makes IPv4 IPAddress given 4 octets.
BUG=496258 Review URL: https://codereview.chromium.org/1724943002 Cr-Commit-Position: refs/heads/master@{#377328}
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_server_properties_impl_unittest.cc3
-rw-r--r--net/http/http_server_properties_manager_unittest.cc9
-rw-r--r--net/http/http_transaction_test_util.cc3
3 files changed, 5 insertions, 10 deletions
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc
index 73c5c39..d06574f 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -1283,8 +1283,7 @@ TEST_F(SupportsQuicServerPropertiesTest, SetSupportsQuic) {
EXPECT_FALSE(impl_.GetSupportsQuic(&address));
EXPECT_TRUE(address.empty());
- IPAddress actual_address;
- CHECK(actual_address.AssignFromIPLiteral("127.0.0.1"));
+ IPAddress actual_address(127, 0, 0, 1);
impl_.SetSupportsQuic(true, actual_address);
EXPECT_TRUE(impl_.GetSupportsQuic(&address));
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
index 3d6f6c7..5471fd1 100644
--- a/net/http/http_server_properties_manager_unittest.cc
+++ b/net/http/http_server_properties_manager_unittest.cc
@@ -820,8 +820,7 @@ TEST_P(HttpServerPropertiesManagerTest, SupportsQuic) {
IPAddress address;
EXPECT_FALSE(http_server_props_manager_->GetSupportsQuic(&address));
- IPAddress actual_address;
- CHECK(actual_address.AssignFromIPLiteral("127.0.0.1"));
+ IPAddress actual_address(127, 0, 0, 1);
http_server_props_manager_->SetSupportsQuic(true, actual_address);
// ExpectScheduleUpdatePrefsOnNetworkThread() should be called only once.
http_server_props_manager_->SetSupportsQuic(true, actual_address);
@@ -888,8 +887,7 @@ TEST_P(HttpServerPropertiesManagerTest, Clear) {
AlternativeService alternative_service(NPN_HTTP_2, "mail.google.com", 1234);
http_server_props_manager_->SetAlternativeService(
spdy_server_mail, alternative_service, 1.0, one_day_from_now_);
- IPAddress actual_address;
- CHECK(actual_address.AssignFromIPLiteral("127.0.0.1"));
+ IPAddress actual_address(127, 0, 0, 1);
http_server_props_manager_->SetSupportsQuic(true, actual_address);
ServerNetworkStats stats;
stats.srtt = base::TimeDelta::FromMicroseconds(10);
@@ -1078,8 +1076,7 @@ TEST_P(HttpServerPropertiesManagerTest, UpdateCacheWithPrefs) {
quic_server_info1);
// Set SupportsQuic.
- IPAddress actual_address;
- CHECK(actual_address.AssignFromIPLiteral("127.0.0.1"));
+ IPAddress actual_address(127, 0, 0, 1);
http_server_props_manager_->SetSupportsQuic(true, actual_address);
// Update cache.
diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc
index 0e027a2..2298efd 100644
--- a/net/http/http_transaction_test_util.cc
+++ b/net/http/http_transaction_test_util.cc
@@ -390,8 +390,7 @@ bool MockNetworkTransaction::GetLoadTimingInfo(
}
bool MockNetworkTransaction::GetRemoteEndpoint(IPEndPoint* endpoint) const {
- IPAddress ip_address;
- CHECK(ip_address.AssignFromIPLiteral("127.0.0.1"));
+ IPAddress ip_address(127, 0, 0, 1);
*endpoint = IPEndPoint(ip_address, 80);
return true;
}