diff options
-rw-r--r-- | webkit/tools/webcore_unit_tests/GKURL_unittest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp b/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp index 1482909..6de1553 100644 --- a/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp +++ b/webkit/tools/webcore_unit_tests/GKURL_unittest.cpp @@ -599,3 +599,13 @@ TEST(GKURL, DeepCopy) { 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")); +} |