chromium/third_party/blink/renderer/modules/filesystem/file_writer_test.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// We use particular offsets to trigger particular behaviors
// in the TestableFileWriter.
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() {}

}  // namespace

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) {}

}  // namespace blink