summaryrefslogtreecommitdiff
path: root/chromium/webkit/browser/fileapi/isolated_context_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/webkit/browser/fileapi/isolated_context_unittest.cc')
-rw-r--r--chromium/webkit/browser/fileapi/isolated_context_unittest.cc29
1 files changed, 19 insertions, 10 deletions
diff --git a/chromium/webkit/browser/fileapi/isolated_context_unittest.cc b/chromium/webkit/browser/fileapi/isolated_context_unittest.cc
index 36073ca5f81..156181d6210 100644
--- a/chromium/webkit/browser/fileapi/isolated_context_unittest.cc
+++ b/chromium/webkit/browser/fileapi/isolated_context_unittest.cc
@@ -96,8 +96,10 @@ TEST_F(IsolatedContextTest, RegisterAndRevokeTest) {
std::string cracked_id;
base::FilePath cracked_path;
FileSystemType cracked_type;
+ FileSystemMountOption cracked_option;
ASSERT_TRUE(isolated_context()->CrackVirtualPath(
- virtual_path, &cracked_id, &cracked_type, &cracked_path));
+ virtual_path, &cracked_id, &cracked_type, &cracked_path,
+ &cracked_option));
ASSERT_EQ(kTestPaths[i].NormalizePathSeparators().value(),
cracked_path.value());
ASSERT_EQ(id_, cracked_id);
@@ -186,18 +188,22 @@ TEST_F(IsolatedContextTest, CrackWithRelativePaths) {
for (size_t j = 0; j < ARRAYSIZE_UNSAFE(relatives); ++j) {
SCOPED_TRACE(testing::Message() << "Testing "
<< kTestPaths[i].value() << " " << relatives[j].path);
- base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
- .AppendASCII(names_[i]).Append(relatives[j].path);
+ base::FilePath virtual_path =
+ isolated_context()->CreateVirtualRootPath(id_).AppendASCII(
+ names_[i]).Append(relatives[j].path);
std::string cracked_id;
base::FilePath cracked_path;
FileSystemType cracked_type;
+ FileSystemMountOption cracked_option;
if (!relatives[j].valid) {
ASSERT_FALSE(isolated_context()->CrackVirtualPath(
- virtual_path, &cracked_id, &cracked_type, &cracked_path));
+ virtual_path, &cracked_id, &cracked_type, &cracked_path,
+ &cracked_option));
continue;
}
ASSERT_TRUE(isolated_context()->CrackVirtualPath(
- virtual_path, &cracked_id, &cracked_type, &cracked_path));
+ virtual_path, &cracked_id, &cracked_type, &cracked_path,
+ &cracked_option));
ASSERT_EQ(kTestPaths[i].Append(relatives[j].path)
.NormalizePathSeparators().value(),
cracked_path.value());
@@ -230,8 +236,9 @@ TEST_F(IsolatedContextTest, CrackURLWithRelativePaths) {
for (size_t j = 0; j < ARRAYSIZE_UNSAFE(relatives); ++j) {
SCOPED_TRACE(testing::Message() << "Testing "
<< kTestPaths[i].value() << " " << relatives[j].path);
- base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
- .AppendASCII(names_[i]).Append(relatives[j].path);
+ base::FilePath virtual_path =
+ isolated_context()->CreateVirtualRootPath(id_).AppendASCII(
+ names_[i]).Append(relatives[j].path);
FileSystemURL cracked = isolated_context()->CreateCrackedFileSystemURL(
GURL("http://chromium.org"), kFileSystemTypeIsolated, virtual_path);
@@ -255,13 +262,14 @@ TEST_F(IsolatedContextTest, CrackURLWithRelativePaths) {
TEST_F(IsolatedContextTest, TestWithVirtualRoot) {
std::string cracked_id;
base::FilePath cracked_path;
+ FileSystemMountOption cracked_option;
// Trying to crack virtual root "/" returns true but with empty cracked path
// as "/" of the isolated filesystem is a pure virtual directory
// that has no corresponding platform directory.
base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_);
ASSERT_TRUE(isolated_context()->CrackVirtualPath(
- virtual_path, &cracked_id, NULL, &cracked_path));
+ virtual_path, &cracked_id, NULL, &cracked_path, &cracked_option));
ASSERT_EQ(FPL(""), cracked_path.value());
ASSERT_EQ(id_, cracked_id);
@@ -270,7 +278,7 @@ TEST_F(IsolatedContextTest, TestWithVirtualRoot) {
virtual_path = isolated_context()->CreateVirtualRootPath(
id_).AppendASCII("foo");
ASSERT_FALSE(isolated_context()->CrackVirtualPath(
- virtual_path, &cracked_id, NULL, &cracked_path));
+ virtual_path, &cracked_id, NULL, &cracked_path, &cracked_option));
}
TEST_F(IsolatedContextTest, CanHandleURL) {
@@ -327,8 +335,9 @@ TEST_F(IsolatedContextTest, VirtualFileSystemTests) {
std::string cracked_id;
base::FilePath cracked_path;
+ FileSystemMountOption cracked_option;
ASSERT_TRUE(isolated_context()->CrackVirtualPath(
- whole_virtual_path, &cracked_id, NULL, &cracked_path));
+ whole_virtual_path, &cracked_id, NULL, &cracked_path, &cracked_option));
ASSERT_EQ(database_fsid, cracked_id);
ASSERT_EQ(test_virtual_path, cracked_path);
}