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

Unified Diff: webkit/fileapi/file_system_util_unittest.cc

Issue 6833007: More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
« no previous file with comments | « webkit/fileapi/file_system_util.cc ('k') | webkit/fileapi/webfilewriter_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_util_unittest.cc
===================================================================
--- webkit/fileapi/file_system_util_unittest.cc (revision 81454)
+++ webkit/fileapi/file_system_util_unittest.cc (working copy)
@@ -29,7 +29,8 @@
"filesystem:http://chromium.org/persistent/directory/file"));
EXPECT_EQ("http://chromium.org/", origin_url_.spec());
EXPECT_EQ(kFileSystemTypePersistent, type_);
- EXPECT_EQ(FILE_PATH_LITERAL("directory/file"), file_path_.value());
+ EXPECT_EQ(FILE_PATH_LITERAL("file"), file_path_.BaseName().value());
+ EXPECT_EQ(FILE_PATH_LITERAL("directory"), file_path_.DirName().value());
}
TEST_F(FileSystemUtilTest, ParseTemporary) {
@@ -37,7 +38,8 @@
"filesystem:http://chromium.org/temporary/directory/file"));
EXPECT_EQ("http://chromium.org/", origin_url_.spec());
EXPECT_EQ(kFileSystemTypeTemporary, type_);
- EXPECT_EQ(FILE_PATH_LITERAL("directory/file"), file_path_.value());
+ EXPECT_EQ(FILE_PATH_LITERAL("file"), file_path_.BaseName().value());
+ EXPECT_EQ(FILE_PATH_LITERAL("directory"), file_path_.DirName().value());
}
TEST_F(FileSystemUtilTest, EnsureFilePathIsRelative) {
@@ -45,7 +47,8 @@
"filesystem:http://chromium.org/temporary/////directory/file"));
EXPECT_EQ("http://chromium.org/", origin_url_.spec());
EXPECT_EQ(kFileSystemTypeTemporary, type_);
- EXPECT_EQ(FILE_PATH_LITERAL("directory/file"), file_path_.value());
+ EXPECT_EQ(FILE_PATH_LITERAL("file"), file_path_.BaseName().value());
+ EXPECT_EQ(FILE_PATH_LITERAL("directory"), file_path_.DirName().value());
EXPECT_FALSE(file_path_.IsAbsolute());
}
@@ -59,7 +62,8 @@
TEST_F(FileSystemUtilTest, UnescapePath) {
ASSERT_TRUE(CrackFileSystemURL(
"filesystem:http://chromium.org/persistent/%7Echromium/space%20bar"));
- EXPECT_EQ(FILE_PATH_LITERAL("~chromium/space bar"), file_path_.value());
+ EXPECT_EQ(FILE_PATH_LITERAL("space bar"), file_path_.BaseName().value());
+ EXPECT_EQ(FILE_PATH_LITERAL("~chromium"), file_path_.DirName().value());
}
TEST_F(FileSystemUtilTest, RejectBadType) {
« no previous file with comments | « webkit/fileapi/file_system_util.cc ('k') | webkit/fileapi/webfilewriter_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698