[Webkit-unassigned] [Bug 180539] ApplicationManifestParser should strip whitespace from the raw input
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 8 10:57:50 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=180539
Joseph Pecoraro <joepeck at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #328824|review? |review+
Flags| |
--- Comment #7 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 328824
--> https://bugs.webkit.org/attachment.cgi?id=328824
Patch v2
View in context: https://bugs.webkit.org/attachment.cgi?id=328824&action=review
> Tools/TestWebKitAPI/Tests/WTF/JSONValue.cpp:645
> + }
I'd suggest another section to test leading/trailing whitespace permutations:
{
RefPtr<JSON::Value> value;
EXPECT_TRUE(JSON::Value::parseJSON(" 1", value));
EXPECT_TRUE(JSON::Value::parseJSON("\t1", value));
EXPECT_TRUE(JSON::Value::parseJSON("\n1", value));
EXPECT_TRUE(JSON::Value::parseJSON("1 ", value));
EXPECT_TRUE(JSON::Value::parseJSON("1\t", value));
EXPECT_TRUE(JSON::Value::parseJSON("1\n", value));
EXPECT_TRUE(JSON::Value::parseJSON(" 1 ", value));
EXPECT_TRUE(JSON::Value::parseJSON(" {} ", value));
EXPECT_TRUE(JSON::Value::parseJSON(" [] ", value));
EXPECT_FALSE(JSON::Value::parseJSON("1 1", value));
EXPECT_FALSE(JSON::Value::parseJSON("{} {}", value));
EXPECT_FALSE(JSON::Value::parseJSON("[] []", value));
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171208/82a075e1/attachment.html>
More information about the webkit-unassigned
mailing list