[Content Extensions] Test regular expression parse failures.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 22:37:35 +0000 (22:37 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2015 22:37:35 +0000 (22:37 +0000)
commit35a24b12a385cbbe1c34cbed2742130c94781e35
tree5668b712dacb42c25f7855e4c7b9520d3cc34f35
parent3ff3015c1d821d09873b3b0ca678e1cc4b97d793
[Content Extensions] Test regular expression parse failures.
https://bugs.webkit.org/show_bug.cgi?id=142872

Reviewed by Benjamin Poulain.

Source/WebCore:

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::URLFilterParser::statusString):
* contentextensions/URLFilterParser.h:
Changed failures that can never happen to assertions.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testPatternStatus):
(TestWebKitAPI::TEST_F):
Added tests for each parsing status.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/contentextensions/URLFilterParser.cpp
Source/WebCore/contentextensions/URLFilterParser.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp