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

Unified Diff: webkit/fileapi/isolated_file_util_unittest.cc

Issue 10713007: Make isolated file system works for a device root (e.g. X:\\) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 5 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/isolated_file_util.cc ('k') | webkit/fileapi/isolated_mount_point_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/isolated_file_util_unittest.cc
diff --git a/webkit/fileapi/isolated_file_util_unittest.cc b/webkit/fileapi/isolated_file_util_unittest.cc
index dff0baff59c163e5a32865ddecacd58625f884fd..33bf01061d3850eaea166e43f6305b8b26571393 100644
--- a/webkit/fileapi/isolated_file_util_unittest.cc
+++ b/webkit/fileapi/isolated_file_util_unittest.cc
@@ -76,7 +76,7 @@ class IsolatedFileUtilTest : public testing::Test {
}
void TearDown() {
- isolated_context()->RevokeIsolatedFileSystem(filesystem_id_);
+ isolated_context()->RevokeFileSystem(filesystem_id_);
other_file_util_helper_.TearDown();
}
@@ -100,8 +100,8 @@ class IsolatedFileUtilTest : public testing::Test {
}
FileSystemURL GetFileSystemURL(const FilePath& path) const {
- FilePath virtual_path = isolated_context()->CreateVirtualPath(
- filesystem_id(), path);
+ FilePath virtual_path = isolated_context()->CreateVirtualRootPath(
+ filesystem_id()).Append(path);
return FileSystemURL(GURL("http://example.com"),
kFileSystemTypeIsolated,
virtual_path);
@@ -194,7 +194,7 @@ class IsolatedFileUtilTest : public testing::Test {
void SimulateDropFiles() {
size_t root_path_index = 0;
- std::set<FilePath> toplevels;
+ IsolatedContext::FileInfoSet toplevels;
for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) {
const test::TestCaseRecord& test_case = test::kRegularTestCases[i];
FilePath path(test_case.path);
@@ -206,14 +206,14 @@ class IsolatedFileUtilTest : public testing::Test {
FilePath root = root_path().Append(
kRootPaths[(root_path_index++) % arraysize(kRootPaths)]);
toplevel_root_map_[toplevel] = root;
- toplevels.insert(root.Append(path));
+ toplevels.AddPath(root.Append(path));
}
test::SetUpOneTestCase(toplevel_root_map_[toplevel], test_case);
}
// Register the toplevel entries.
- filesystem_id_ = isolated_context()->RegisterIsolatedFileSystem(toplevels);
+ filesystem_id_ = isolated_context()->RegisterFileSystem(toplevels);
}
ScopedTempDir data_dir_;
@@ -354,7 +354,8 @@ TEST_F(IsolatedFileUtilTest, GetLocalFilePathTest) {
FilePath local_file_path;
EXPECT_EQ(base::PLATFORM_FILE_OK,
file_util()->GetLocalFilePath(&context, url, &local_file_path));
- EXPECT_EQ(GetTestCasePlatformPath(test_case.path), local_file_path);
+ EXPECT_EQ(GetTestCasePlatformPath(test_case.path).value(),
+ local_file_path.value());
}
}
« no previous file with comments | « webkit/fileapi/isolated_file_util.cc ('k') | webkit/fileapi/isolated_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698