#include "third_party/blink/public/common/loader/mime_sniffing_throttle.h"
#include <memory>
#include <string_view>
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/data_pipe_utils.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "services/network/test/test_url_loader_client.h"
#include "services/network/test/test_url_loader_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/loader/mime_sniffing_url_loader.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
#include "url/gurl.h"
namespace blink {
namespace {
class MojoDataPipeSender { … };
class MockDelegate : public blink::URLLoaderThrottle::Delegate { … };
}
class MimeSniffingThrottleTest : public testing::Test { … };
TEST_F(MimeSniffingThrottleTest, NoMimeTypeWithSniffableScheme) { … }
TEST_F(MimeSniffingThrottleTest, SniffableMimeTypeWithSniffableScheme) { … }
TEST_F(MimeSniffingThrottleTest, NotSniffableMimeTypeWithSniffableScheme) { … }
TEST_F(MimeSniffingThrottleTest, NoMimeTypeWithNotSniffableScheme) { … }
TEST_F(MimeSniffingThrottleTest, SniffableMimeTypeWithNotSniffableScheme) { … }
TEST_F(MimeSniffingThrottleTest, NotSniffableMimeTypeWithNotSniffableScheme) { … }
TEST_F(MimeSniffingThrottleTest, SniffableButAlreadySniffed) { … }
TEST_F(MimeSniffingThrottleTest, NoBody) { … }
TEST_F(MimeSniffingThrottleTest, EmptyBody) { … }
TEST_F(MimeSniffingThrottleTest, Body_PlainText) { … }
TEST_F(MimeSniffingThrottleTest, Body_Docx) { … }
TEST_F(MimeSniffingThrottleTest, Body_PNG) { … }
TEST_F(MimeSniffingThrottleTest, Body_LongPlainText) { … }
TEST_F(MimeSniffingThrottleTest, Abort_NoBodyPipe) { … }
}