#include "content/browser/loader/file_url_loader_factory.h"
#include <memory>
#include <string>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "base/test/bind.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "components/file_access/scoped_file_access.h"
#include "components/file_access/scoped_file_access_delegate.h"
#include "components/file_access/test/mock_scoped_file_access_delegate.h"
#include "content/public/browser/file_url_loader.h"
#include "content/public/browser/shared_cors_origin_access_list.h"
#include "content/public/common/content_paths.h"
#include "content/public/test/simple_url_loader_test_helper.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "net/base/filename_util.h"
#include "net/base/net_errors.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "services/network/public/cpp/cors/origin_access_list.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/cpp/url_loader_completion_status.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/test/mock_url_loader_client.h"
#include "services/network/test/test_url_loader_client.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace content {
_;
namespace {
class SharedCorsOriginAccessListForTesting : public SharedCorsOriginAccessList { … };
GURL GetTestURL(const std::string& filename) { … }
class FileURLLoaderFactoryTest : public testing::Test { … };
TEST_F(FileURLLoaderFactoryTest, LastModified) { … }
TEST_F(FileURLLoaderFactoryTest, Status) { … }
TEST_F(FileURLLoaderFactoryTest, MissedRequestInitiator) { … }
TEST_F(FileURLLoaderFactoryTest, Allowlist) { … }
TEST_F(FileURLLoaderFactoryTest, ResponseTypeForDirectoryListings) { … }
}
TEST_F(FileURLLoaderFactoryTest, DlpInitiatorAllow) { … }
TEST_F(FileURLLoaderFactoryTest, DlpNoInitiatorAllow) { … }
TEST_F(FileURLLoaderFactoryTest, DlpInitiatorDeny) { … }
TEST_F(FileURLLoaderFactoryTest, DlpNoInitiatorDeny) { … }
TEST_F(FileURLLoaderFactoryTest, DlpRemoteValidFileUrl) { … }
TEST_F(FileURLLoaderFactoryTest, DlpRemoteInvalidFileUrl) { … }
}