#ifdef UNSAFE_BUFFERS_BUILD
#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[] = …;
}
class WriteFromUrlOperationForTest : public WriteFromUrlOperation { … };
class ImageWriterWriteFromUrlOperationTest : public ImageWriterUnitTestBase { … };
TEST_F(ImageWriterWriteFromUrlOperationTest, SelectTargetWithoutExtension) { … }
TEST_F(ImageWriterWriteFromUrlOperationTest, SelectTargetWithExtension) { … }
TEST_F(ImageWriterWriteFromUrlOperationTest, DownloadFile) { … }
TEST_F(ImageWriterWriteFromUrlOperationTest, VerifyFile) { … }
}
}