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

Side by Side Diff: third_party/WebKit/Source/platform/network/NetworkUtilsTest.cpp

Issue 2799593002: Rewrite references to "wtf/" to "platform/wtf/" in platform/network. (Closed)
Patch Set: Created 3 years, 8 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 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 #include "platform/network/NetworkUtils.h" 5 #include "platform/network/NetworkUtils.h"
6 6
7 #include "net/base/ip_address.h" 7 #include "net/base/ip_address.h"
8 #include "platform/wtf/text/WTFString.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 #include "wtf/text/WTFString.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 TEST(NetworkUtilsTest, IsReservedIPAddress) { 13 TEST(NetworkUtilsTest, IsReservedIPAddress) {
14 // Unreserved IPv4 addresses (in various forms). 14 // Unreserved IPv4 addresses (in various forms).
15 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("8.8.8.8")); 15 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("8.8.8.8"));
16 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("99.64.0.0")); 16 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("99.64.0.0"));
17 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("212.15.0.0")); 17 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("212.15.0.0"));
18 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("212.15")); 18 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("212.15"));
19 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("212.15.0")); 19 EXPECT_FALSE(NetworkUtils::isReservedIPAddress("212.15.0"));
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 "www.foo.appspot.com", NetworkUtils::ExcludePrivateRegistries)); 103 "www.foo.appspot.com", NetworkUtils::ExcludePrivateRegistries));
104 104
105 // Verify that unknown registries are included. 105 // Verify that unknown registries are included.
106 EXPECT_EQ("example.notarealregistry", 106 EXPECT_EQ("example.notarealregistry",
107 NetworkUtils::getDomainAndRegistry( 107 NetworkUtils::getDomainAndRegistry(
108 "www.example.notarealregistry", 108 "www.example.notarealregistry",
109 NetworkUtils::IncludePrivateRegistries)); 109 NetworkUtils::IncludePrivateRegistries));
110 } 110 }
111 111
112 } // namespace blink 112 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698