diff options
author | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 20:11:07 +0000 |
---|---|---|
committer | michaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-16 20:11:07 +0000 |
commit | 578d748527882756aaf1c04ac76175ede8baed50 (patch) | |
tree | 6b7496abf60e88ae48a9d9c3c4191fb5f9293b06 /webkit/appcache/manifest_parser_unittest.cc | |
parent | 3b2638125f5702251315b70840301995de7dcd93 (diff) | |
download | chromium_src-578d748527882756aaf1c04ac76175ede8baed50.zip chromium_src-578d748527882756aaf1c04ac76175ede8baed50.tar.gz chromium_src-578d748527882756aaf1c04ac76175ede8baed50.tar.bz2 |
Fix a simple manifest parsing bug.
TEST=manifest_parser_unittest.cc
BUG=none
Review URL: http://codereview.chromium.org/400003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/appcache/manifest_parser_unittest.cc')
-rw-r--r-- | webkit/appcache/manifest_parser_unittest.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/webkit/appcache/manifest_parser_unittest.cc b/webkit/appcache/manifest_parser_unittest.cc index 9fb42e0..e3e0ead 100644 --- a/webkit/appcache/manifest_parser_unittest.cc +++ b/webkit/appcache/manifest_parser_unittest.cc @@ -301,5 +301,17 @@ TEST(ManifestParserTest, UnusualUtf8) { EXPECT_TRUE(urls.find("http://bad.com/nonbmp%F1%84%AB%BC") != urls.end()); } +TEST(ManifestParserTest, IgnoreAfterSpace) { + Manifest manifest; + const GURL kUrl("http://smorg.borg"); + const std::string kData( + "CACHE MANIFEST\r" + "resource.txt this stuff after the white space should be ignored\r"); + EXPECT_TRUE(ParseManifest(kUrl, kData.c_str(), kData.length(), manifest)); + + base::hash_set<std::string> urls = manifest.explicit_urls; + EXPECT_TRUE(urls.find("http://smorg.borg/resource.txt") != urls.end()); +} + } // namespace appcache |