#include "third_party/blink/renderer/core/fetch/fetch_manager.h"
#include <optional>
#include "base/memory/scoped_refptr.h"
#include "base/strings/strcat.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/time/time.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink.h"
#include "third_party/blink/public/mojom/loader/fetch_later.mojom.h"
#include "third_party/blink/public/platform/url_conversion.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_request_init.h"
#include "third_party/blink/renderer/core/dom/abort_controller.h"
#include "third_party/blink/renderer/core/fetch/fetch_later_result.h"
#include "third_party/blink/renderer/core/fetch/fetch_request_data.h"
#include "third_party/blink/renderer/core/fetch/request.h"
#include "third_party/blink/renderer/core/loader/empty_clients.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_load_priority.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_associated_receiver.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "third_party/blink/renderer/platform/testing/url_loader_mock_factory.h"
#include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
namespace {
_;
Eq;
IsNull;
Not;
MATCHER_P(HasRangeError,
expected_message,
base::StrCat({ … }
MATCHER_P(HasAbortError,
expected_message,
base::StrCat({ … }
MATCHER_P(MatchNetworkResourceRequest,
expected,
base::StrCat({ … }
class MockFetchLaterLoaderFactory
: public blink::mojom::FetchLaterLoaderFactory { … };
class FakeLocalFrameClient : public EmptyLocalFrameClient { … };
}
class FetchLaterTest : public testing::Test { … };
class FetchLaterTestingScope : public V8TestingScope { … };
TEST_F(FetchLaterTest, CreateSameOriginFetchLaterRequest) { … }
TEST_F(FetchLaterTest, NegativeActivateAfterThrowRangeError) { … }
TEST_F(FetchLaterTest, AbortBeforeFetchLater) { … }
TEST_F(FetchLaterTest, AbortAfterFetchLater) { … }
TEST_F(FetchLaterTest, ActivateAfter) { … }
TEST_F(FetchLaterTest, ContextDestroyed) { … }
TEST_F(FetchLaterTest, ForcedSendingWithBackgroundSyncOff) { … }
TEST(FetchLaterLoadPriorityTest, DefaultHigh) { … }
TEST(FetchLaterLoadPriorityTest, WithFetchPriorityHintAuto) { … }
TEST(FetchLaterLoadPriorityTest, WithFetchPriorityHintLow) { … }
TEST(FetchLaterLoadPriorityTest,
WithFetchPriorityHintLowAndRenderBlockingBehaviorBlocking) { … }
}