chromium/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h"

#include <utility>

#include "base/containers/heap_array.h"
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "chrome/browser/extensions/api/image_writer_private/error_constants.h"
#include "chrome/browser/extensions/api/image_writer_private/test_utils.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/test/url_loader_interceptor.h"

namespace extensions {
namespace image_writer {

namespace {

BrowserThread;
_;
AnyNumber;
AtLeast;
Gt;
Lt;

const char kTestImageUrl[] =;

}  // namespace

// This class gives us a generic Operation with the ability to set or inspect
// the current path to the image file.
class WriteFromUrlOperationForTest : public WriteFromUrlOperation {};

class ImageWriterWriteFromUrlOperationTest : public ImageWriterUnitTestBase {};

TEST_F(ImageWriterWriteFromUrlOperationTest, SelectTargetWithoutExtension) {}

TEST_F(ImageWriterWriteFromUrlOperationTest, SelectTargetWithExtension) {}

TEST_F(ImageWriterWriteFromUrlOperationTest, DownloadFile) {}

TEST_F(ImageWriterWriteFromUrlOperationTest, VerifyFile) {}

}  // namespace image_writer
}  // namespace extensions