diff options
author | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-25 06:42:05 +0000 |
---|---|---|
committer | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-25 06:42:05 +0000 |
commit | 69fb877f00e219b2200348e2f8ffc75efdd46f2d (patch) | |
tree | 8eb7fc787a4a4cd576fcb82d3f1ef37e696dcc77 /webkit/fileapi/file_system_operation_unittest.cc | |
parent | 39a78fdcf1c474632d23ee1481e0752f9d0aea97 (diff) | |
download | chromium_src-69fb877f00e219b2200348e2f8ffc75efdd46f2d.zip chromium_src-69fb877f00e219b2200348e2f8ffc75efdd46f2d.tar.gz chromium_src-69fb877f00e219b2200348e2f8ffc75efdd46f2d.tar.bz2 |
On windows filepaths need \\?\ prefix to allow extended file path names. Fix to bug 63574.
BUG=63574
TEST=file_system_operation_unittest.cc and manually tested on FAT32.
Review URL: http://codereview.chromium.org/5259003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67385 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation_unittest.cc')
-rw-r--r-- | webkit/fileapi/file_system_operation_unittest.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/webkit/fileapi/file_system_operation_unittest.cc b/webkit/fileapi/file_system_operation_unittest.cc index 370d95c..e5c25ad 100644 --- a/webkit/fileapi/file_system_operation_unittest.cc +++ b/webkit/fileapi/file_system_operation_unittest.cc @@ -463,6 +463,34 @@ TEST_F(FileSystemOperationTest, TestCreateFileFailure) { EXPECT_EQ(request_id_, mock_dispatcher_->request_id()); } +TEST_F(FileSystemOperationTest, TestCreateVeryLongName) { + ScopedTempDir dir; + ASSERT_TRUE(dir.CreateUniqueTempDir()); + +#if defined(OS_WIN) + FilePath dir_path(FILE_PATH_LITERAL("\\\\?\\") + dir.path().value()); +#else + FilePath dir_path = dir.path(); +#endif + + // TODO(kkanetkar): Once each platform's limitations have been enforced + // consider that in this test. Currently this test is for + // windows primarily. + FilePath dir1 = dir_path.AppendASCII( + "012345678901234567890123456789012345678901234567890123456789" + "012345678901234567890123456789012345678901234567890123456789" + "0123456789012345678901234567890123456789"); + FilePath file = dir1.AppendASCII( + "012345678901234567890123456789012345678901234567890123456789" + "012345678901234567890123456789012345678901234567890123456789" + "0123456789012345678901234567890123456789"); + operation()->CreateDirectory(dir1, false, true); + MessageLoop::current()->RunAllPending(); + operation()->CreateFile(file, true); + MessageLoop::current()->RunAllPending(); + EXPECT_TRUE(file_util::PathExists(file)); +} + TEST_F(FileSystemOperationTest, TestCreateFileSuccessFileExists) { // Already existing file and exclusive false. ScopedTempDir dir; |