#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <memory>
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/public/web/web_associated_url_loader.h"
#include "third_party/blink/public/web/web_associated_url_loader_client.h"
#include "third_party/blink/public/web/web_associated_url_loader_options.h"
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_view.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread.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/wtf_string.h"
RunPendingTasks;
ToKURL;
namespace blink {
class WebAssociatedURLLoaderTest : public testing::Test,
public WebAssociatedURLLoaderClient { … };
TEST_F(WebAssociatedURLLoaderTest, SameOriginSuccess) { … }
TEST_F(WebAssociatedURLLoaderTest, SameOriginRestriction) { … }
TEST_F(WebAssociatedURLLoaderTest, CrossOriginSuccess) { … }
TEST_F(WebAssociatedURLLoaderTest, RedirectSuccess) { … }
TEST_F(WebAssociatedURLLoaderTest, RedirectCrossOriginFailure) { … }
TEST_F(WebAssociatedURLLoaderTest,
RedirectCrossOriginWithAccessControlSuccess) { … }
TEST_F(WebAssociatedURLLoaderTest, UntrustedCheckMethods) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
#define MAYBE_UntrustedCheckHeaders …
#else
#define MAYBE_UntrustedCheckHeaders …
#endif
TEST_F(WebAssociatedURLLoaderTest, MAYBE_UntrustedCheckHeaders) { … }
TEST_F(WebAssociatedURLLoaderTest, CrossOriginHeaderSafelisting) { … }
TEST_F(WebAssociatedURLLoaderTest, CrossOriginHeaderAllowResponseHeaders) { … }
TEST_F(WebAssociatedURLLoaderTest, AccessCheckForLocalURL) { … }
TEST_F(WebAssociatedURLLoaderTest, BypassAccessCheckForLocalURL) { … }
#undef MAYBE_UntrustedCheckHeaders
}