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

Unified Diff: url/gurl_unittest.cc

Issue 68213017: Fix HTTP protocol scheme debugging checks for WebSockets (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Additional minor #include tweak. Created 7 years, 1 month 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
« net/http/http_auth_handler_digest.cc ('K') | « url/gurl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/gurl_unittest.cc
diff --git a/url/gurl_unittest.cc b/url/gurl_unittest.cc
index 67da8e48259c4d61de6bde061c6beda6185e5b03..767333c6d15f7e582d12b1278d823cd184f03294 100644
--- a/url/gurl_unittest.cc
+++ b/url/gurl_unittest.cc
@@ -529,3 +529,15 @@ TEST(GURLTest, IsStandard) {
GURL c("foo://bar/baz");
EXPECT_FALSE(c.IsStandard());
}
+
+TEST(GURLTest, SchemeIsHTTPOrHTTPS) {
+ EXPECT_TRUE(GURL("http://bar/").SchemeIsHTTPOrHTTPS());
+ EXPECT_TRUE(GURL("HTTPS://BAR").SchemeIsHTTPOrHTTPS());
+ EXPECT_FALSE(GURL("ftp://bar/").SchemeIsHTTPOrHTTPS());
+}
+
+TEST(GURLTest, SchemeIsWSOrWSS) {
+ EXPECT_TRUE(GURL("WS://BAR/").SchemeIsWSOrWSS());
+ EXPECT_TRUE(GURL("wss://bar/").SchemeIsWSOrWSS());
+ EXPECT_FALSE(GURL("http://bar/").SchemeIsWSOrWSS());
+}
« net/http/http_auth_handler_digest.cc ('K') | « url/gurl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698