#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ref_counted.h"
#include "base/run_loop.h"
#include "base/scoped_observation.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/scoped_run_loop_timeout.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/service_worker/service_worker_fetch_dispatcher.h"
#include "content/browser/service_worker/service_worker_test_utils.h"
#include "content/browser/service_worker/service_worker_version.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/service_worker_context_observer.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
#include "third_party/blink/public/common/service_worker/service_worker_type_converters.h"
namespace content {
namespace {
struct FetchResult { … };
const FetchResult kNetworkCompleted = …;
const FetchResult kTimeout = …;
}
class WorkerRunningStatusObserver : public ServiceWorkerContextObserver { … };
class NoWorkObserver : public ServiceWorkerVersion::Observer { … };
class ServiceWorkerFetchDispatcherBrowserTest : public ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(ServiceWorkerFetchDispatcherBrowserTest, FetchEvent) { … }
IN_PROC_BROWSER_TEST_F(ServiceWorkerFetchDispatcherBrowserTest,
FetchEventTimeout) { … }
}