Make URLParser work with URLs missing URL parts
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2016 23:12:46 +0000 (23:12 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2016 23:12:46 +0000 (23:12 +0000)
commitf91d8e04a131e176a6909b84734f1dcb6b0220ff
tree98f65595ffb05f0d6798bcc26acfaaeb17cbf79c
parent492927002ae8f3b00e2392e31ec2953b88e29216
Make URLParser work with URLs missing URL parts
https://bugs.webkit.org/show_bug.cgi?id=160824

Reviewed by Brady Eidson.

Source/WebCore:

My initial implementation of URLParser didn't work correctly with URLs missing parts,
like a URL with no fragment, or a URL with no query.  This fixes and tests parsing such URLS.
Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):
(WebCore::URLParser::allValuesEqual):
* platform/URLParser.h:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::s):
(TestWebKitAPI::checkURL):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::eq): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/URLParser.cpp
Source/WebCore/platform/URLParser.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp