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

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
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..5ea8b86400d19aad967c2411c00fdf28cc517d2b 100644
--- a/content/child/blink_platform_impl_unittest.cc
+++ b/content/child/blink_platform_impl_unittest.cc
@@ -9,6 +9,7 @@
#include "net/base/net_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/platform/WebString.h"
+
eroman 2015/04/13 15:55:35 Remove this blank line
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
namespace content {
@@ -120,4 +121,14 @@ TEST(BlinkPlatformTest, IsReservedIPAddress) {
}
}
+TEST(BlinkPlatformTest, portAllowed) {
+ TestBlinkPlatformImpl platform_impl;
tyoshino (SeeGerritForStatus) 2015/04/13 14:28:16 two space indent
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("example.com")));
+ EXPECT_TRUE(platform_impl.portAllowed(GURL("file://example.com")));
eroman 2015/04/13 15:55:35 please also add a test for file:// containing "por
+ 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")));
eroman 2015/04/13 15:55:35 please include tests which contain no explicitly s
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698