#include "third_party/blink/renderer/platform/loader/fetch/url_loader/worker_main_script_loader.h"
#include "base/containers/span.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/data_pipe_utils.h"
#include "net/http/http_util.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/loader/resource_load_info_notifier.mojom.h"
#include "third_party/blink/public/mojom/navigation/renderer_eviction_reason.mojom-blink.h"
#include "third_party/blink/renderer/platform/heap/thread_state.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_load_observer.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h"
#include "third_party/blink/renderer/platform/loader/fetch/url_loader/worker_main_script_loader_client.h"
#include "third_party/blink/renderer/platform/loader/testing/fake_resource_load_info_notifier.h"
#include "third_party/blink/renderer/platform/loader/testing/mock_fetch_context.h"
#include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
namespace blink {
namespace {
_;
const char kTopLevelScriptURL[] = …;
const char kHeader[] = …;
const char kFailHeader[] = …;
const std::string kTopLevelScript = …;
class WorkerMainScriptLoaderTest : public testing::Test { … };
TEST_F(WorkerMainScriptLoaderTest, ResponseWithSucessThenOnComplete) { … }
TEST_F(WorkerMainScriptLoaderTest, ResponseWithFailureThenOnComplete) { … }
TEST_F(WorkerMainScriptLoaderTest, DisconnectBeforeOnComplete) { … }
TEST_F(WorkerMainScriptLoaderTest, OnCompleteWithError) { … }
}
}