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

Unified Diff: content/child/blink_platform_impl_unittest.cc

Issue 1036823003: Fix to respect --explicitly-allowed-ports command line option-Chromium Side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698