Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: net/base/net_util_unittest.cc

Issue 23464037: Net: make IsSafePortableRelativePath look for reserved names on all components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« net/base/net_util.h ('K') | « net/base/net_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util_unittest.cc
diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc
index 22bcba16edc4cbce3c01fbf33436451b61c306f2..b1429368c144d6120e2e07bcc7e7ec0d507ce4fc 100644
--- a/net/base/net_util_unittest.cc
+++ b/net/base/net_util_unittest.cc
@@ -3458,17 +3458,17 @@ static const base::FilePath::CharType* kSafePortableRelativePaths[] = {
#endif
};
-TEST(NetUtilTest, IsSafePortableBasename) {
+TEST(NetUtilTest, IsSafePortablePathComponent) {
for (size_t i = 0 ; i < arraysize(kSafePortableBasenames); ++i) {
- EXPECT_TRUE(IsSafePortableBasename(base::FilePath(
+ EXPECT_TRUE(IsSafePortablePathComponent(base::FilePath(
kSafePortableBasenames[i]))) << kSafePortableBasenames[i];
}
for (size_t i = 0 ; i < arraysize(kUnsafePortableBasenames); ++i) {
- EXPECT_FALSE(IsSafePortableBasename(base::FilePath(
+ EXPECT_FALSE(IsSafePortablePathComponent(base::FilePath(
kUnsafePortableBasenames[i]))) << kUnsafePortableBasenames[i];
}
for (size_t i = 0 ; i < arraysize(kSafePortableRelativePaths); ++i) {
- EXPECT_FALSE(IsSafePortableBasename(base::FilePath(
+ EXPECT_FALSE(IsSafePortablePathComponent(base::FilePath(
kSafePortableRelativePaths[i]))) << kSafePortableRelativePaths[i];
}
}
« net/base/net_util.h ('K') | « net/base/net_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698