diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 11:47:08 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-10 11:47:08 +0000 |
commit | 824aed36d5544c2a52e03d3560bbe3ff16ac0c4f (patch) | |
tree | ef6549c6029bea82d170bc863ae570d08d382a8d /extensions/browser/verified_contents_unittest.cc | |
parent | 8e09c7af875d86eb8174c5fb5a12ddec9ac8c38e (diff) | |
download | chromium_src-824aed36d5544c2a52e03d3560bbe3ff16ac0c4f.zip chromium_src-824aed36d5544c2a52e03d3560bbe3ff16ac0c4f.tar.gz chromium_src-824aed36d5544c2a52e03d3560bbe3ff16ac0c4f.tar.bz2 |
Fix content verifier handling of paths with subdirectories on windows
Any path with a subdirectory was failing on windows because we weren't
translating to use windows path separators.
BUG=382638
Review URL: https://codereview.chromium.org/321893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275989 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/verified_contents_unittest.cc')
-rw-r--r-- | extensions/browser/verified_contents_unittest.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/extensions/browser/verified_contents_unittest.cc b/extensions/browser/verified_contents_unittest.cc index b4f2ecf..f52b74b 100644 --- a/extensions/browser/verified_contents_unittest.cc +++ b/extensions/browser/verified_contents_unittest.cc @@ -76,10 +76,13 @@ TEST(VerifiedContents, Simple) { "txHiG5KQvNoPOSH5FbQo9Zb5gJ23j3oFB0Ru9DOnziw", contents.GetTreeHashRoot( base::FilePath::FromUTF8Unsafe("background.js")))); - EXPECT_TRUE(Base64UrlStringEquals( - "L37LFbT_hmtxRL7AfGZN9YTpW6yoz_ZiQ1opLJn1NZU", - contents.GetTreeHashRoot( - base::FilePath::FromUTF8Unsafe("foo/bar.html")))); + + base::FilePath foo_bar_html = + base::FilePath(FILE_PATH_LITERAL("foo")).AppendASCII("bar.html"); + EXPECT_FALSE(foo_bar_html.IsAbsolute()); + EXPECT_TRUE( + Base64UrlStringEquals("L37LFbT_hmtxRL7AfGZN9YTpW6yoz_ZiQ1opLJn1NZU", + contents.GetTreeHashRoot(foo_bar_html))); base::FilePath nonexistent = base::FilePath::FromUTF8Unsafe("nonexistent"); EXPECT_TRUE(contents.GetTreeHashRoot(nonexistent) == NULL); |