#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/modules/filesystem/file_writer_base.h"
#include "third_party/blink/renderer/platform/heap/member.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
namespace blink {
namespace {
const int kNoOffset = …;
const int kBasicFileTruncate_Offset = …;
const int kErrorFileTruncate_Offset = …;
const int kCancelFileTruncate_Offset = …;
const int kCancelFailedTruncate_Offset = …;
const int kBasicFileWrite_Offset = …;
const int kErrorFileWrite_Offset = …;
const int kMultiFileWrite_Offset = …;
const int kCancelFileWriteBeforeCompletion_Offset = …;
const int kCancelFileWriteAfterCompletion_Offset = …;
KURL mock_path_as_kurl() { … }
Blob* CreateTestBlob() { … }
}
class TestableFileWriter : public GarbageCollected<TestableFileWriter>,
public FileWriterBase { … };
class FileWriterTest : public testing::Test { … };
TEST_F(FileWriterTest, BasicFileWrite) { … }
TEST_F(FileWriterTest, BasicFileTruncate) { … }
TEST_F(FileWriterTest, ErrorFileWrite) { … }
TEST_F(FileWriterTest, ErrorFileTruncate) { … }
TEST_F(FileWriterTest, MultiFileWrite) { … }
TEST_F(FileWriterTest, CancelFileWriteBeforeCompletion) { … }
TEST_F(FileWriterTest, CancelFileWriteAfterCompletion) { … }
TEST_F(FileWriterTest, CancelFileTruncate) { … }
TEST_F(FileWriterTest, CancelFailedTruncate) { … }
}