Index: content/child/blink_platform_impl_unittest.cc |
diff --git a/content/child/blink_platform_impl_unittest.cc b/content/child/blink_platform_impl_unittest.cc |
index 7217227832d16a4c416211aa7d76980e27e7df73..c1b6a8e405e2bb5a9e5e07dfcb2d6749cc1bdf2d 100644 |
--- a/content/child/blink_platform_impl_unittest.cc |
+++ b/content/child/blink_platform_impl_unittest.cc |
@@ -120,4 +120,16 @@ TEST(BlinkPlatformTest, IsReservedIPAddress) { |
} |
} |
+TEST(BlinkPlatformTest, portAllowed) { |
+ TestBlinkPlatformImpl platform_impl; |
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("http://example.com"))); |
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("file://example.com"))); |
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("file://example.com:87"))); |
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("ftp://example.com:21"))); |
+ EXPECT_FALSE(platform_impl.portAllowed(GURL("ftp://example.com:87"))); |
+ EXPECT_FALSE(platform_impl.portAllowed(GURL("ws://example.com:21"))); |
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("http://example.com:80"))); |
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("http://example.com:8889"))); |
+} |
+ |
} // namespace content |