chromium/extensions/renderer/extension_localization_throttle_unittest.cc

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

#include "extensions/renderer/extension_localization_throttle.h"

#include <string_view>

#include "base/test/task_environment.h"
#include "extensions/renderer/shared_l10n_map.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/data_pipe_utils.h"
#include "mojo/public/cpp/system/string_data_source.h"
#include "net/base/request_priority.h"
#include "services/network/test/test_url_loader_client.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
#include "third_party/blink/public/platform/web_url.h"

namespace extensions {
namespace {

class FakeURLLoader final : public network::mojom::URLLoader {};

class FakeDelegate : public blink::URLLoaderThrottle::Delegate {};

class ExtensionLocalizationThrottleTest : public testing::Test {};

TEST_F(ExtensionLocalizationThrottleTest, DoNotCreate) {}

TEST_F(ExtensionLocalizationThrottleTest, DoNotIntercept) {}

TEST_F(ExtensionLocalizationThrottleTest, OneMessage) {}

TEST_F(ExtensionLocalizationThrottleTest, TwoMessages) {}

TEST_F(ExtensionLocalizationThrottleTest, EmptyData) {}

// Regression test for https://crbug.com/1475798
TEST_F(ExtensionLocalizationThrottleTest, Cancel) {}

TEST_F(ExtensionLocalizationThrottleTest, SourceSideError) {}

TEST_F(ExtensionLocalizationThrottleTest, WriteError) {}

TEST_F(ExtensionLocalizationThrottleTest, CreateDataPipeError) {}

TEST_F(ExtensionLocalizationThrottleTest, URLLoaderChain) {}

TEST_F(ExtensionLocalizationThrottleTest,
       URLLoaderClientOnTransferSizeUpdated) {}

}  // namespace
}  // namespace extensions