#include "components/url_rewrite/common/url_loader_throttle.h"
#include <string>
#include <string_view>
#include <utility>
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "services/network/public/cpp/resource_request.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
namespace url_rewrite {
namespace {
constexpr char kMixedCaseCorsExemptHeader[] = …;
constexpr char kUpperCaseCorsExemptHeader[] = …;
constexpr char kMixedCaseCorsExemptHeader2[] = …;
constexpr char kUpperCaseCorsExemptHeader2[] = …;
constexpr char kRequiresCorsHeader[] = …;
}
class URLLoaderThrottleTest : public testing::Test { … };
TEST_F(URLLoaderThrottleTest, WildcardHosts) { … }
TEST_F(URLLoaderThrottleTest, CorsAwareHeaders) { … }
TEST_F(URLLoaderThrottleTest, DataReplacementUrl) { … }
TEST_F(URLLoaderThrottleTest, RedirectsToSameHost) { … }
TEST_F(URLLoaderThrottleTest, RedirectsFromDifferentHost) { … }
TEST_F(URLLoaderThrottleTest, RedirectsToDifferentHost) { … }
class TestThrottleDelegate : public blink::URLLoaderThrottle::Delegate { … };
TEST_F(URLLoaderThrottleTest, AllowAndDeny) { … }
}