Commit 1bf72284 authored by mlamouri's avatar mlamouri Committed by Commit bot

Revert of Modify test case to support streaming operation in sandbox file...

Revert of Modify test case to support streaming operation in sandbox file system. (patchset #6 of https://codereview.chromium.org/491813002/)

Reason for revert:
This is breaking fast/filesystem/op-copy.html in Blink:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=%40ToT%20Blink&tests=fast/filesystem/op-copy.html

Original issue's description:
> Modify test case to support streaming operation in sandbox file system.
>
> BUG=360088
> TEST=content_unittests passed
>
> Committed: https://chromium.googlesource.com/chromium/src/+/2332db94ec6c42aaa3d66f5226a4c17b85c1553e

TBR=tzik@chromium.org,iseki@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=360088

Review URL: https://codereview.chromium.org/510323003

Cr-Commit-Position: refs/heads/master@{#292367}
parent f996a062
......@@ -277,7 +277,7 @@ class FileSystemOperationImplTest
}
private:
base::MessageLoopForIO message_loop_;
base::MessageLoop message_loop_;
scoped_refptr<QuotaManager> quota_manager_;
scoped_refptr<QuotaManagerProxy> quota_manager_proxy_;
......@@ -553,11 +553,7 @@ TEST_F(FileSystemOperationImplTest, TestCopyFailureSrcFileExistsDestDir) {
FileSystemOperationRunner::CopyProgressCallback(),
RecordStatusCallback());
base::RunLoop().RunUntilIdle();
EXPECT_EQ(3, quota_manager_proxy()->notify_storage_accessed_count());
EXPECT_EQ(1, change_observer()->get_and_reset_create_directory_count());
EXPECT_EQ(1, change_observer()->get_and_reset_remove_directory_count());
EXPECT_EQ(base::File::FILE_ERROR_NOT_A_DIRECTORY, status());
EXPECT_EQ(base::File::FILE_ERROR_INVALID_OPERATION, status());
EXPECT_TRUE(change_observer()->HasNoChange());
}
......@@ -608,8 +604,9 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcFileAndOverwrite) {
base::RunLoop().RunUntilIdle();
EXPECT_EQ(base::File::FILE_OK, status());
EXPECT_TRUE(FileExists("dest"));
EXPECT_EQ(4, quota_manager_proxy()->notify_storage_accessed_count());
EXPECT_EQ(2, quota_manager_proxy()->notify_storage_accessed_count());
EXPECT_EQ(1, change_observer()->get_and_reset_modify_file_count());
EXPECT_TRUE(change_observer()->HasNoChange());
}
......@@ -623,9 +620,9 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcFileAndNew) {
base::RunLoop().RunUntilIdle();
EXPECT_EQ(base::File::FILE_OK, status());
EXPECT_TRUE(FileExists("new"));
EXPECT_EQ(4, quota_manager_proxy()->notify_storage_accessed_count());
EXPECT_EQ(2, quota_manager_proxy()->notify_storage_accessed_count());
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_count());
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_from_count());
EXPECT_TRUE(change_observer()->HasNoChange());
}
......@@ -645,8 +642,8 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcDirAndOverwrite) {
EXPECT_FALSE(DirectoryExists("dest/src"));
EXPECT_GE(quota_manager_proxy()->notify_storage_accessed_count(), 3);
EXPECT_EQ(1, change_observer()->get_and_reset_create_directory_count());
EXPECT_EQ(1, change_observer()->get_and_reset_remove_directory_count());
EXPECT_EQ(1, change_observer()->get_and_reset_create_directory_count());
EXPECT_TRUE(change_observer()->HasNoChange());
}
......@@ -687,9 +684,9 @@ TEST_F(FileSystemOperationImplTest, TestCopySuccessSrcDirRecursive) {
// For recursive copy we may record multiple read access.
EXPECT_GE(quota_manager_proxy()->notify_storage_accessed_count(), 1);
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_count());
EXPECT_EQ(2, change_observer()->get_and_reset_create_directory_count());
EXPECT_EQ(1, change_observer()->get_and_reset_remove_directory_count());
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_from_count());
EXPECT_TRUE(change_observer()->HasNoChange());
}
......
......@@ -144,8 +144,7 @@ bool HasFileSystemType(ObfuscatedFileUtil::AbstractOriginEnumerator* enumerator,
class ObfuscatedFileUtilTest : public testing::Test {
public:
ObfuscatedFileUtilTest()
: message_loop_(base::MessageLoop::TYPE_IO),
origin_(GURL("http://www.example.com")),
: origin_(GURL("http://www.example.com")),
type_(storage::kFileSystemTypeTemporary),
weak_factory_(this),
sandbox_file_system_(origin_, type_),
......
......@@ -128,7 +128,7 @@ bool SandboxFileSystemBackend::SupportsStreaming(
bool SandboxFileSystemBackend::HasInplaceCopyImplementation(
storage::FileSystemType type) const {
return false;
return true;
}
scoped_ptr<storage::FileStreamReader>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment