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

Unified Diff: webkit/tools/webcore_unit_tests/GKURL_unittest.cpp

Issue 261058: Unit test for https://bugs.webkit.org/show_bug.cgi?id=30262... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/webcore_unit_tests/GKURL_unittest.cpp
===================================================================
--- webkit/tools/webcore_unit_tests/GKURL_unittest.cpp (revision 28588)
+++ webkit/tools/webcore_unit_tests/GKURL_unittest.cpp (working copy)
@@ -599,3 +599,13 @@
EXPECT_NE(dest.string().characters(), src.string().characters());
EXPECT_NE(dest.utf8String().data(), src.utf8String().data());
}
+
+TEST(GKURL, ProtocolIs) {
+ WebCore::KURL url1(WebCore::ParsedURLString,"foo://bar");
+ EXPECT_TRUE(url1.protocolIs("foo"));
+ EXPECT_FALSE(url1.protocolIs("foo-bar"));
+
+ WebCore::KURL url2(WebCore::ParsedURLString,"foo-bar:");
+ EXPECT_TRUE(url2.protocolIs("foo-bar"));
+ EXPECT_FALSE(url2.protocolIs("foo"));
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698