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

Side by Side Diff: webkit/browser/fileapi/file_system_mount_point_provider_unittest.cc

Issue 14895013: Move webkit/fileapi/file_system_mount_point_provider.h to webkit/browser/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more rebase Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_mount_point_provider.h ('k') | webkit/browser/fileapi/webkit_browser_fileapi.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698