| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include <set> | 5 #include <set> | 
| 6 #include <string> | 6 #include <string> | 
| 7 | 7 | 
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" | 
| 9 #include "base/bind.h" | 9 #include "base/bind.h" | 
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 95   { FILE_PATH_LITERAL("//etc/hosts"), false, }, | 95   { FILE_PATH_LITERAL("//etc/hosts"), false, }, | 
| 96   { FILE_PATH_LITERAL("foo.txt"), true, }, | 96   { FILE_PATH_LITERAL("foo.txt"), true, }, | 
| 97   { FILE_PATH_LITERAL("a/b/c"), true, }, | 97   { FILE_PATH_LITERAL("a/b/c"), true, }, | 
| 98   // Any paths that includes parent references are considered invalid. | 98   // Any paths that includes parent references are considered invalid. | 
| 99   { FILE_PATH_LITERAL(".."), false, }, | 99   { FILE_PATH_LITERAL(".."), false, }, | 
| 100   { FILE_PATH_LITERAL("tmp/.."), false, }, | 100   { FILE_PATH_LITERAL("tmp/.."), false, }, | 
| 101   { FILE_PATH_LITERAL("a/b/../c/.."), false, }, | 101   { FILE_PATH_LITERAL("a/b/../c/.."), false, }, | 
| 102 }; | 102 }; | 
| 103 | 103 | 
| 104 // For External filesystem. | 104 // For External filesystem. | 
| 105 const base::FilePath::CharType kMountPoint[] = FILE_PATH_LITERAL("/tmp/testing")
     ; | 105 const base::FilePath::CharType kMountPoint[] = | 
|  | 106     FILE_PATH_LITERAL("/tmp/testing"); | 
| 106 const base::FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp"); | 107 const base::FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp"); | 
| 107 const base::FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing"); | 108 const base::FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing"); | 
| 108 | 109 | 
| 109 }  // namespace | 110 }  // namespace | 
| 110 | 111 | 
| 111 class FileSystemMountPointProviderTest : public testing::Test { | 112 class FileSystemMountPointProviderTest : public testing::Test { | 
| 112  public: | 113  public: | 
| 113   FileSystemMountPointProviderTest() | 114   FileSystemMountPointProviderTest() | 
| 114       : weak_factory_(this) { | 115       : weak_factory_(this) { | 
| 115   } | 116   } | 
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 298                             kRootPathFileURITestCases[i].type, | 299                             kRootPathFileURITestCases[i].type, | 
| 299                             true /* create */, &root_path)); | 300                             true /* create */, &root_path)); | 
| 300     base::FilePath expected = file_system_path().AppendASCII( | 301     base::FilePath expected = file_system_path().AppendASCII( | 
| 301         kRootPathFileURITestCases[i].expected_path); | 302         kRootPathFileURITestCases[i].expected_path); | 
| 302     EXPECT_EQ(expected.value(), root_path.value()); | 303     EXPECT_EQ(expected.value(), root_path.value()); | 
| 303     EXPECT_TRUE(file_util::DirectoryExists(root_path)); | 304     EXPECT_TRUE(file_util::DirectoryExists(root_path)); | 
| 304   } | 305   } | 
| 305 } | 306 } | 
| 306 | 307 | 
| 307 }  // namespace fileapi | 308 }  // namespace fileapi | 
| OLD | NEW | 
|---|